Skip to content

Commit d2f8431

Browse files
Test --entrypoint feature
1 parent 29697b6 commit d2f8431

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

main_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ func TestHelp(t *testing.T) {
2727
assert.Contains(t, output, "Usage:")
2828
}
2929

30+
func TestEntrypoint(t *testing.T) {
31+
var projectDir = dockerized.GetDockerizedRoot() + "/test/test_entrypoint"
32+
defer context().
33+
WithDir(projectDir).
34+
WithCwd(projectDir).
35+
WithFile("foo.txt", "foo").
36+
WithFile("bar.txt", "bar").
37+
Restore()
38+
39+
output := testDockerized(t, []string{"--entrypoint", "ls", "go"})
40+
assert.Contains(t, output, "foo.txt")
41+
assert.Contains(t, output, "bar.txt")
42+
}
43+
3044
func TestOverrideVersionWithEnvVar(t *testing.T) {
3145
defer context().WithEnv("PROTOC_VERSION", "3.6.0").Restore()
3246
var output = testDockerized(t, []string{"protoc", "--version"})

0 commit comments

Comments
 (0)