Skip to content

Commit

Permalink
test/e2e: trim os.Args for binary
Browse files Browse the repository at this point in the history
It's not possible to use test args with custom FlagSet

Signed-off-by: f41gh7 <[email protected]>
  • Loading branch information
f41gh7 committed Sep 25, 2024
1 parent 6ce88bf commit bba78f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/e2e/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ func Before() {
Expect(os.Setenv("VM_PODWAITREADYINTERVALCHECK", "1s")).To(Succeed())
Expect(os.Setenv("VM_APPREADYTIMEOUT", "50s")).To(Succeed())

// disable metrics server because it fails to listen when running several test packages one after another
// also metrics server isn't very useful in tests
os.Args = append(os.Args, "--metrics-bind-address", "0")

// disable web servers because it fails to listen when running several test packages one after another
// also web servers aren't very useful in tests
os.Args = append(os.Args[:1],
"--metrics-bind-address", "0",
"--pprof-addr", "0",
"--health-probe-bind-address", "0")
ctx, cancel := context.WithCancel(context.Background())
go func(ctx context.Context) {
defer GinkgoRecover()
Expand Down

0 comments on commit bba78f7

Please sign in to comment.