File tree Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Expand file tree Collapse file tree 3 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ function build() {
46
46
info " Build of ${full_tag} succeeded."
47
47
48
48
info " Testing ${full_tag} "
49
- docker run --rm -v " $PWD /test-image.sh:/usr/local/bin/test.sh" node:" ${full_tag} " test.sh " ${full_version} "
49
+ export full_tag=${full_tag}
50
+ export full_version=${full_version}
51
+ bats test-image.bats
50
52
}
51
53
52
54
cd " $( cd " ${0%/* } " && pwd -P) " || exit
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bats
2
+
3
+ @test " Test for node and version" {
4
+ run docker run --rm -it node:" $full_tag " node -e " process.stdout.write(process.versions.node)"
5
+ [ " $status " -eq 0 ]
6
+ [ " $output " == " ${full_version} " ]
7
+ }
8
+
9
+ @test " Test for npm" {
10
+ run docker run --rm -it node:" $full_tag " npm --version
11
+ [ " $status " -eq 0 ]
12
+ }
13
+
14
+ @test " Test for yarn" {
15
+ run docker run --rm -it node:" $full_tag " yarn --version
16
+ [ " $status " -eq 0 ]
17
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments