Procházet zdrojové kódy

Merge pull request #1094 from MBonell/602-test-node-hello-world

Closes #602: Test for Node image
Tianon Gravi před 10 roky
rodič
revize
17e093252b

+ 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