You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Subject defines which CLI the tests are run against, defaults to \"nerdctl\" in the user's PATH.
24
-
varSubject=flag.String("subject", "nerdctl", `which CLI the tests are run against, defaults to "nerdctl" in the user's PATH.`)
25
-
varSubjectPrefix=flag.String("daemon-context-subject-prefix", "", `A string which prefixes the command the tests are run against, defaults to "". This string will be split by spaces.`)
26
-
varPrefixedSubjectEnv=flag.String("daemon-context-subject-env", "", `Environment to add when running a prefixed subject, in the form of a string like "EXAMPLE=foo EXAMPLE2=bar"`)
22
+
const (
23
+
defaultNamespace="finch"
24
+
testE2EEnv="TEST_E2E"
25
+
middlewareE2EEnv="MIDDLEWARE_E2E"
26
+
opaTestDescription="Finch Daemon OPA E2E Tests"
27
+
e2eTestDescription="Finch Daemon Functional test"
28
+
)
29
+
30
+
var (
31
+
Subject=flag.String("subject", "nerdctl", `which CLI the tests are run against, defaults to "nerdctl" in the user's PATH.`)
32
+
SubjectPrefix=flag.String("daemon-context-subject-prefix", "", `A string which prefixes the command the tests are run against, defaults to "". This string will be split by spaces.`)
33
+
PrefixedSubjectEnv=flag.String("daemon-context-subject-env", "", `Environment to add when running a prefixed subject, in the form of a string like "EXAMPLE=foo EXAMPLE2=bar"`)
34
+
)
27
35
28
36
funcTestRun(t*testing.T) {
29
-
ifos.Getenv("MIDDLEWARE_E2E") =="1" {
37
+
switch {
38
+
caseos.Getenv(middlewareE2EEnv) =="1":
30
39
runOPATests(t)
31
-
} elseifos.Getenv("TEST_E2E") =="1" {
40
+
caseos.Getenv(testE2EEnv) =="1":
32
41
runE2ETests(t)
33
-
} else {
42
+
default:
34
43
t.Skip("E2E tests skipped. Set TEST_E2E=1 to run regular E2E tests or MIDDLEWARE_E2E=1 to run OPA middleware tests")
0 commit comments