diff --git a/src/cloud-api-adaptor/test/e2e/azure_test.go b/src/cloud-api-adaptor/test/e2e/azure_test.go index b52c7240b..2db632ada 100644 --- a/src/cloud-api-adaptor/test/e2e/azure_test.go +++ b/src/cloud-api-adaptor/test/e2e/azure_test.go @@ -157,5 +157,5 @@ func TestTrusteeOperatorKeyReleaseForSpecificKey(t *testing.T) { } t.Parallel() kbsEndpoint, _ := keyBrokerService.GetCachedKbsEndpoint() - DoTestTrusteeOperatorKeyReleaseForSpecificKey(t, testEnv, assert, kbsEndpoint) + DoTestKbsKeyRelease(t, testEnv, assert, kbsEndpoint, "default/kbsres1/key1", "res1val1") } diff --git a/src/cloud-api-adaptor/test/e2e/common_suite.go b/src/cloud-api-adaptor/test/e2e/common_suite.go index 0dfa8c05f..a62c7a94e 100644 --- a/src/cloud-api-adaptor/test/e2e/common_suite.go +++ b/src/cloud-api-adaptor/test/e2e/common_suite.go @@ -599,29 +599,6 @@ func DoTestKbsKeyReleaseForFailure(t *testing.T, e env.Environment, assert Cloud NewTestCase(t, e, "DoTestKbsKeyReleaseForFailure", assert, "Kbs key release is failed").WithPod(pod).WithTestCommands(testCommands).Run() } -// Test to check for specific key value from Trustee Operator Deployment -func DoTestTrusteeOperatorKeyReleaseForSpecificKey(t *testing.T, e env.Environment, assert CloudAssert, kbsEndpoint string) { - t.Log("Do test Trustee operator key release for specific key") - pod := NewBusyboxPodWithNameWithInitdata(E2eNamespace, "op-key-release", kbsEndpoint) - testCommands := []TestCommand{ - { - Command: []string{"wget", "-q", "-O-", "http://127.0.0.1:8006/cdh/resource/default/kbsres1/key1"}, - ContainerName: pod.Spec.Containers[0].Name, - TestCommandStdoutFn: func(stdout bytes.Buffer) bool { - if strings.Contains(stdout.String(), "res1val1") { - t.Logf("Success to get key %s", stdout.String()) - return true - } else { - t.Errorf("Failed to access key: %s", stdout.String()) - return false - } - }, - }, - } - - NewTestCase(t, e, "KbsKeyReleasePod", assert, "Kbs key release from Trustee Operator is successful").WithPod(pod).WithTestCommands(testCommands).Run() -} - func DoTestRestrictivePolicyBlocksExec(t *testing.T, e env.Environment, assert CloudAssert) { allowAllExceptExecPolicyFilePath := "fixtures/policies/allow-all-except-exec-process.rego" podName := "policy-exec-rejected"