Skip to content

Commit

Permalink
access-control and operator test suite updates (#953)
Browse files Browse the repository at this point in the history
The non-root check test case has been renamed in:
redhat-best-practices-for-k8s/certsuite#2479

Also, four operator test cases have been moved to access-control test
suite. I just removed them for now as they might need more rework in
follow-up PRs.
  • Loading branch information
greyerof authored Oct 15, 2024
1 parent 6fd5d7a commit dec29ec
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 454 deletions.
2 changes: 1 addition & 1 deletion tests/accesscontrol/parameters/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const (
TestCaseNameAccessControlBpfCapability = "access-control-bpf-capability-check"
TestCaseNameAccessControlContainerHostPort = "access-control-container-host-port"
TestCaseNameAccessControlSysAdminCapability = "access-control-sys-admin-capability-check"
TestCaseNameAccessControlNonRootUser = "access-control-security-context-non-root-user-check"
TestCaseNameAccessControlNonRootUserID = "access-control-security-context-non-root-user-id-check"
TestCaseNameAccessControlClusterRoleBindings = "access-control-cluster-role-bindings"
CertsuiteNodePortTcName = "access-control-service-type"
TestCaseNameAccessControlPrivilegeEscalation = "access-control-security-context-privilege-escalation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ var _ = Describe("Access-control non-root user,", func() {

By("Start test")
err = globalhelper.LaunchTests(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalhelper.ConvertSpecNameToFileName(CurrentSpecReport().FullText()), randomReportDir, randomCertsuiteConfigDir)
Expect(err).ToNot(HaveOccurred())

By("Verify test case status in Claim report")
err = globalhelper.ValidateIfReportsAreValid(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalparameters.TestCasePassed, randomReportDir)
Expect(err).ToNot(HaveOccurred())
})
Expand All @@ -85,13 +85,13 @@ var _ = Describe("Access-control non-root user,", func() {

By("Start test")
err = globalhelper.LaunchTests(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalhelper.ConvertSpecNameToFileName(CurrentSpecReport().FullText()), randomReportDir, randomCertsuiteConfigDir)
Expect(err).ToNot(HaveOccurred())

By("Verify test case status in Claim report")
err = globalhelper.ValidateIfReportsAreValid(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalparameters.TestCaseFailed, randomReportDir)
Expect(err).ToNot(HaveOccurred())
})
Expand Down Expand Up @@ -126,13 +126,13 @@ var _ = Describe("Access-control non-root user,", func() {

By("Start test")
err = globalhelper.LaunchTests(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalhelper.ConvertSpecNameToFileName(CurrentSpecReport().FullText()), randomReportDir, randomCertsuiteConfigDir)
Expect(err).ToNot(HaveOccurred())

By("Verify test case status in Claim report")
err = globalhelper.ValidateIfReportsAreValid(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalparameters.TestCasePassed, randomReportDir)
Expect(err).ToNot(HaveOccurred())
})
Expand Down Expand Up @@ -170,13 +170,13 @@ var _ = Describe("Access-control non-root user,", func() {

By("Start test")
err = globalhelper.LaunchTests(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalhelper.ConvertSpecNameToFileName(CurrentSpecReport().FullText()), randomReportDir, randomCertsuiteConfigDir)
Expect(err).ToNot(HaveOccurred())

By("Verify test case status in Claim report")
err = globalhelper.ValidateIfReportsAreValid(
tsparams.TestCaseNameAccessControlNonRootUser,
tsparams.TestCaseNameAccessControlNonRootUserID,
globalparameters.TestCaseFailed, randomReportDir)
Expect(err).ToNot(HaveOccurred())
})
Expand Down
110 changes: 0 additions & 110 deletions tests/operator/tests/operator_non_root.go

This file was deleted.

114 changes: 0 additions & 114 deletions tests/operator/tests/operator_pod_automount_token.go

This file was deleted.

Loading

0 comments on commit dec29ec

Please sign in to comment.