diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index c7c030fb1..c10ee820c 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -66,12 +66,14 @@ func TestSolanaOCRV2Smoke(t *testing.T) { require.NoError(t, err) state.Gauntlet = sg - t.Cleanup(func() { - err = state.Common.Env.Shutdown() - if err != nil { - log.Err(err) - } - }) + if *config.Common.InsideK8s { + t.Cleanup(func() { + err = state.Common.Env.Shutdown() + if err != nil { + log.Err(err) + } + }) + } state.SetupClients() require.NoError(t, err) diff --git a/integration-tests/testconfig/ocr2/ocr2.go b/integration-tests/testconfig/ocr2/ocr2.go index 8444ed795..de2dcfef2 100644 --- a/integration-tests/testconfig/ocr2/ocr2.go +++ b/integration-tests/testconfig/ocr2/ocr2.go @@ -48,14 +48,18 @@ func (o *Config) Validate() error { return errors.New("Only one can be enabled either soak or smoke") } - err = o.Smoke.Validate() - if err != nil { - return err + if *o.Smoke.Enabled { + err = o.Smoke.Validate() + if err != nil { + return err + } } - err = o.Soak.Validate() - if err != nil { - return err + if *o.Soak.Enabled { + err = o.Soak.Validate() + if err != nil { + return err + } } return nil