Skip to content

Commit 19ae03f

Browse files
committed
Fix defer location (#883)
Fixes the defer location to make sure that all resources are cleaned up properly. Signed-off-by: dtfranz <[email protected]>
1 parent 5278c41 commit 19ae03f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/e2e/cluster_extension_registryV1_limitations_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ import (
1616
func TestClusterExtensionPackagesWithWebhooksAreNotAllowed(t *testing.T) {
1717
ctx := context.Background()
1818
clusterExtension, catalog := testInit(t)
19+
defer testCleanup(t, catalog, clusterExtension)
20+
defer getArtifactsOutput(t)
1921

2022
clusterExtension.Spec = ocv1alpha1.ClusterExtensionSpec{
2123
PackageName: "package-with-webhooks",
2224
Version: "1.0.0",
2325
InstallNamespace: "default",
2426
}
2527
require.NoError(t, c.Create(ctx, clusterExtension))
26-
defer testCleanup(t, catalog, clusterExtension)
27-
defer getArtifactsOutput(t)
28-
2928
require.EventuallyWithT(t, func(ct *assert.CollectT) {
3029
assert.NoError(ct, c.Get(ctx, types.NamespacedName{Name: clusterExtension.Name}, clusterExtension))
3130
cond := apimeta.FindStatusCondition(clusterExtension.Status.Conditions, ocv1alpha1.TypeInstalled)

0 commit comments

Comments
 (0)