diff --git a/tests/e2e/tests/policyfilter/policyfilter_test.go b/tests/e2e/tests/policyfilter/policyfilter_test.go index f3b831fcfb9..2dc3e4a45e4 100644 --- a/tests/e2e/tests/policyfilter/policyfilter_test.go +++ b/tests/e2e/tests/policyfilter/policyfilter_test.go @@ -118,6 +118,14 @@ func TestNamespacedPolicy(t *testing.T) { } return ctx }). + Assess("Uninstall policy", func(ctx context.Context, _ *testing.T, c *envconf.Config) context.Context { + ctx, err := helpers.UnloadCRDString(policyNamespace, namespacedPolicy, false)(ctx, c) + if err != nil { + klog.ErrorS(err, "failed to uninstall policy") + t.Fail() + } + return ctx + }). Feature() runner.TestInParallel(t, runWorkload, runEventChecker) @@ -241,6 +249,14 @@ func TestPodLabelFilters(t *testing.T) { } return ctx }). + Assess("Uninstall policy", func(ctx context.Context, _ *testing.T, c *envconf.Config) context.Context { + ctx, err := helpers.UnloadCRDString(podlblNamespace, podlblPolicy, false)(ctx, c) + if err != nil { + klog.ErrorS(err, "failed to uninstall policy") + t.Fail() + } + return ctx + }). Feature() runner.TestInParallel(t, runWorkload, runEventChecker) diff --git a/tests/e2e/tests/skeleton/skeleton_test.go b/tests/e2e/tests/skeleton/skeleton_test.go index 76a45f48d4f..f72f9f3fe9f 100644 --- a/tests/e2e/tests/skeleton/skeleton_test.go +++ b/tests/e2e/tests/skeleton/skeleton_test.go @@ -113,6 +113,14 @@ func TestSkeletonBasic(t *testing.T) { t.Fail() } return ctx + }). + Assess("Uninstall policy", func(ctx context.Context, _ *testing.T, c *envconf.Config) context.Context { + ctx, err := helpers.UnloadCRDString(namespace, curlPod, true)(ctx, c) + if err != nil { + klog.ErrorS(err, "failed to spawn workload") + t.Fail() + } + return ctx }).Feature() // We run our features using testenv.Test() or testenv.TestInParallel(). These take