Skip to content

Commit 7b620cb

Browse files
committed
Merge pull request docker-library#1053 from MBonell/614-test-ruby-hello-world
Closes docker-library#614: Add hello world test for ruby image
2 parents beee170 + 21c8d4f commit 7b620cb

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

test/config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ imageTests+=(
108108
ruby-standard-libs
109109
ruby-gems
110110
ruby-bundler
111+
ruby-hello-world
111112
'
112113
[tomcat]='
113114
'
@@ -137,3 +138,4 @@ globalExcludeTests+=(
137138
[ruby:slim_ruby-bundler]=1
138139
[ruby:slim_ruby-gems]=1
139140
)
141+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello World!
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print 'Hello World!'

test/tests/ruby-hello-world/run.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
image="$1"
5+
dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
6+
dirContainer='/usr/src/ruby'
7+
8+
docker run -it --rm -v "$dirTest":"$dirContainer" -w "$dirContainer" "$image" ruby hello-world.rb

0 commit comments

Comments
 (0)