run gcp auth serially after all the other tests to avoid collision with CSI test

pull/12473/head
Sharif Elgamal 2021-09-15 12:25:22 -07:00
parent 88c62ad469
commit ea77a19074
1 changed files with 19 additions and 1 deletions

View File

@ -121,7 +121,6 @@ func TestAddons(t *testing.T) {
{"HelmTiller", validateHelmTillerAddon},
{"Olm", validateOlmAddon},
{"CSI", validateCSIDriverAndSnapshots},
{"GCPAuth", validateGCPAuthAddon},
}
for _, tc := range tests {
tc := tc
@ -135,6 +134,25 @@ func TestAddons(t *testing.T) {
}
})
// Run other tests after to avoid collision
t.Run("serial", func(t *testing.T) {
tests := []struct {
name string
validator validateFunc
}{
{"GCPAuth", validateGCPAuthAddon},
}
for _, tc := range tests {
tc := tc
if ctx.Err() == context.DeadlineExceeded {
t.Fatalf("Unable to run more tests (deadline exceeded)")
}
t.Run(tc.name, func(t *testing.T) {
tc.validator(ctx, t, profile)
})
}
})
t.Run("StoppedEnableDisable", func(t *testing.T) {
// Assert that disable/enable works offline
rr, err := Run(t, exec.CommandContext(ctx, Target(), "stop", "-p", profile))