Skip to content

Commit 33f5d75

Browse files
authored
test: allow overriding the test subject binary (runfinch#199)
Signed-off-by: Justin Alvarez <[email protected]>
1 parent 3dffcbb commit 33f5d75

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

e2e/e2e_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package e2e
55

66
import (
7+
"flag"
78
"os"
89
"testing"
910

@@ -15,13 +16,14 @@ import (
1516
"github.com/runfinch/finch-daemon/e2e/tests"
1617
)
1718

19+
// Subject defines which CLI the tests are run against, defaults to \"nerdctl\" in the user's PATH.
20+
var Subject = flag.String("subject", "nerdctl", `which CLI the tests are run against, defaults to "nerdctl" in the user's PATH.`)
21+
1822
func TestRun(t *testing.T) {
1923
if os.Getenv("TEST_E2E") != "1" {
2024
t.Skip("E2E tests skipped. Set TEST_E2E=1 to run these tests")
2125
}
22-
// TODO : Make this configurable
23-
runtimeExe := "nerdctl"
24-
opt, _ := option.New([]string{runtimeExe, "-n", "finch"})
26+
opt, _ := option.New([]string{*Subject, "--namespace", "finch"})
2527

2628
ginkgo.SynchronizedBeforeSuite(func() []byte {
2729
tests.SetupLocalRegistry(opt)

0 commit comments

Comments
 (0)