diff --git a/acceptance/tests/config-entries/config_entries_test.go b/acceptance/tests/config-entries/config_entries_test.go index 14f523ac6c..20052b461a 100644 --- a/acceptance/tests/config-entries/config_entries_test.go +++ b/acceptance/tests/config-entries/config_entries_test.go @@ -79,12 +79,15 @@ func TestController(t *testing.T) { // Test creation. { + runner := func() (string, error) { + return k8s.RunKubectlAndGetOutputE(t, ctx.KubectlOptions(t), "apply", "-k", "../fixtures/bases/crds-oss") + } logger.Log(t, "creating custom resources") retry.Run(t, func(r *retry.R) { // Retry the kubectl apply because we've seen sporadic // "connection refused" errors where the mutating webhook // endpoint fails initially. - out, err := k8s.RunKubectlAndGetOutputE(t, ctx.KubectlOptions(t), "apply", "-k", "../fixtures/bases/crds-oss") + out, err := runner() require.NoError(r, err, out) }) helpers.Cleanup(t, cfg.NoCleanupOnFailure, func() {