Skip to content

Commit 6b04cf9

Browse files
committed
add run e2e until it fails mage command
1 parent 4e95cf8 commit 6b04cf9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

magefiles/test.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ func (t Test) Unit() error {
2727

2828
// E2e runs the end-to-end tests against a real apiserver.
2929
func (t Test) E2e() error {
30+
args := append(e2eArgs(), "../e2e")
31+
return RunSh("go", Tool())(args...)
32+
}
33+
34+
// E2eUntilItFails runs the end-to-end tests indefinitely against a real apiserver until it fails.
35+
func (t Test) E2eUntilItFails() error {
36+
args := append(e2eArgs(), "--until-it-fails", "../e2e")
37+
return RunSh("go", Tool())(args...)
38+
}
39+
40+
func e2eArgs() []string {
3041
args := []string{"run", "github.com/onsi/ginkgo/v2/ginkgo"}
3142
args = append(args,
3243
"--tags=e2e,failpoints",
@@ -40,8 +51,6 @@ func (t Test) E2e() error {
4051
"-r",
4152
"-vv",
4253
"--fail-fast",
43-
//"--until-it-fails",
4454
"--randomize-all")
45-
args = append(args, "../e2e")
46-
return RunSh("go", Tool())(args...)
55+
return args
4756
}

0 commit comments

Comments
 (0)