소스 검색

Closes #602: Add node hello world test

Signed-off-by: Marcela Bonell <[email protected]>
Marcela Bonell 10 년 전
부모
커밋
6758cd048c
4개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      test/config.sh
  2. 1 0
      test/tests/node-hello-world/expected-std-out.txt
  3. 1 0
      test/tests/node-hello-world/hello-world.js
  4. 8 0
      test/tests/node-hello-world/run.sh

+ 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