Skip to content

Commit

Permalink
test/e2e: docker: Fix KBS test that doesn't compile
Browse files Browse the repository at this point in the history
As part of the work in confidential-containers#1935, EnableKbsCustomizedPolicy was
replaced with EnableKbsCustomizedResourcePolicy and
EnableKbsCustomizedAttestationPolicy, but the docker tests
wasn't updated, so it doesn't compile, so fix this
  • Loading branch information
stevenhorsman authored and wainersm committed Aug 12, 2024
1 parent 5f907e1 commit f57a8a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/test/e2e/common_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func DoTestPodsMTLSCommunication(t *testing.T, e env.Environment, assert CloudAs

}

// DoTestKbsKeyRelease and DoTestKbsKeyReleaseForFailure should be run in a single test case if you're chaning opa in kbs
// DoTestKbsKeyRelease and DoTestKbsKeyReleaseForFailure should be run in a single test case if you're chaining opa in kbs
// as test cases might be run in parallel
func DoTestKbsKeyRelease(t *testing.T, e env.Environment, assert CloudAssert) {
t.Log("Do test kbs key release")
Expand All @@ -598,7 +598,7 @@ func DoTestKbsKeyRelease(t *testing.T, e env.Environment, assert CloudAssert) {
NewTestCase(t, e, "KbsKeyReleasePod", assert, "Kbs key release is successful").WithPod(pod).WithTestCommands(testCommands).Run()
}

// DoTestKbsKeyRelease and DoTestKbsKeyReleaseForFailure should be run in a single test case if you're chaning opa in kbs
// DoTestKbsKeyRelease and DoTestKbsKeyReleaseForFailure should be run in a single test case if you're chaining opa in kbs
// as test cases might be run in parallel
func DoTestKbsKeyReleaseForFailure(t *testing.T, e env.Environment, assert CloudAssert) {
t.Log("Do test kbs key release failure case")
Expand Down
5 changes: 3 additions & 2 deletions src/cloud-api-adaptor/test/e2e/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ func TestDockerKbsKeyRelease(t *testing.T) {
if !isTestWithKbs() {
t.Skip("Skipping kbs related test as kbs is not deployed")
}
_ = keyBrokerService.EnableKbsCustomizedPolicy("deny_all.rego")
keyBrokerService.SetSampleSecretKey()
keyBrokerService.EnableKbsCustomizedResourcePolicy("deny_all.rego")
assert := DockerAssert{}
t.Parallel()
DoTestKbsKeyReleaseForFailure(t, testEnv, assert)
_ = keyBrokerService.EnableKbsCustomizedPolicy("allow_all.rego")
keyBrokerService.EnableKbsCustomizedResourcePolicy("allow_all.rego")
DoTestKbsKeyRelease(t, testEnv, assert)
}

0 comments on commit f57a8a3

Please sign in to comment.