Skip to content

Commit 44e2221

Browse files
tjungblucursoragent
andcommitted
NO-JIRA: address preflight e2e review feedback
Document why the preflight scenario targets the operand namespace and reuse the shared deploy assertion helper. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 14e2f17 commit 44e2221

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

test/e2e-encryption-kms/encryption_kms_2.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"testing"
66

77
g "github.com/onsi/ginkgo/v2"
8-
"github.com/stretchr/testify/require"
9-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
108
"k8s.io/apimachinery/pkg/runtime"
119
"k8s.io/utils/clock"
1210

@@ -62,6 +60,9 @@ func testKMSEncryptionKMSToKMSMigration(ctx context.Context, t testing.TB) {
6260

6361
func testKMSPreflightDeploy(ctx context.Context, t testing.TB) {
6462
const (
63+
// Preflight deploys into the operand namespace because the library-go
64+
// scenario validates the actual workload pod wiring there, unlike the
65+
// migration scenarios that operate on the rendered encryption config.
6566
operandNS = "openshift-oauth-apiserver"
6667
operatorNS = "openshift-authentication-operator"
6768
)
@@ -79,12 +80,7 @@ func testKMSPreflightDeploy(ctx context.Context, t testing.TB) {
7980
)
8081
},
8182
CreateEncryptionConfigFunc: library.VaultPreflightEncryptionConfigSecret,
82-
AssertDeployFunc: func(ctx context.Context, t testing.TB, cs library.ClientSet, namespace string, deployer *preflight.PodPreflightDeployer) {
83-
library.AssertPreflightDeploy(ctx, t, cs, namespace, deployer)
84-
pod, err := cs.Kube.CoreV1().Pods(namespace).Get(ctx, preflight.PodName, metav1.GetOptions{})
85-
require.NoError(t, err)
86-
require.False(t, pod.Spec.HostNetwork, "non-static preflight should not use hostNetwork")
87-
},
83+
AssertDeployFunc: library.AssertPreflightDeploy,
8884
EncryptionProvider: librarykms.DefaultVaultEncryptionProvider(ctx, t),
8985
})
9086
}

0 commit comments

Comments
 (0)