Kaynağa Gözat

Closes #602: Add node hello world test

Signed-off-by: Marcela Bonell <[email protected]>
Marcela Bonell 10 yıl önce
ebeveyn
işleme
6758cd048c

+ 1 - 0
test/config.sh

@@ -74,6 +74,7 @@ imageTests+=(
 		mysql-initdb
 	'
 	[node]='
+	        node-hello-world
 	'
 	[percona]='
 	'

+ 1 - 0
test/tests/node-hello-world/expected-std-out.txt

@@ -0,0 +1 @@
+Hello World!

+ 1 - 0
test/tests/node-hello-world/hello-world.js

@@ -0,0 +1 @@
+console.log("Hello World!");

+ 8 - 0
test/tests/node-hello-world/run.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+
+image="$1"
+dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+dirContainer='/usr/src/node'
+
+docker run --rm -v "$dirTest":"$dirContainer":ro -w "$dirContainer" "$image" node hello-world.js