CMP-3776: Enhance TestSingleTailoredScanSucceeds to cover 33398 logic
Downstream test case OCP-33398 enables and disables rules as well as set a variable value in a tailored profile. This PR aims to:
- Add rule to disable in TailoredProfile - just for the sake of checking if disabled rule gets referred in CM
- Set value of a variable in TailoredProfile
- Add check to see if the ConfigMap contains the rules and value set in the TailoredProfile
make e2e-parallel E2E_CONTENT_IMAGE_PATH="quay.io/rh-ee-akoudelk/content_repo:testcontent" E2E_BROKEN_CONTENT_IMAGE_PATH="ghcr.io/complianceascode/test-broken-content-ocp" E2E_GO_TEST_FLAGS="-v -timeout 60m -run TestSingleTailoredScanSucceeds" was used on OCP 4.20 cluster to trigger this test case and it has passed when implementing also the changes in PR #960
=== RUN TestSingleTailoredScanSucceeds
=== PAUSE TestSingleTailoredScanSucceeds
=== CONT TestSingleTailoredScanSucceeds
2025/11/25 19:36:45 TailoredProfile ready (READY)
2025/11/25 19:36:50 Waiting for run of test-tailoredprofile-master compliancescan (LAUNCHING)
2025/11/25 19:36:55 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:00 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:05 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:10 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:15 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:22 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:25 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:30 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING)
2025/11/25 19:37:35 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING)
2025/11/25 19:37:40 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING)
2025/11/25 19:37:45 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING)
2025/11/25 19:37:50 ComplianceScan ready (DONE)
2025/11/25 19:37:56 ComplianceScan ready (DONE)
--- PASS: TestSingleTailoredScanSucceeds (76.68s)
PASS
...
ok github.com/ComplianceAsCode/compliance-operator/tests/e2e/parallel 228.963s
@Anna-Koudelkova: This pull request references CMP-3776 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.
In response to this:
Downstream test case OCP-33398 enables and disables rules as well as set a variable value in a tailored profile. This PR aims to:
- Add rule to disable in TailoredProfile
- Set variable rule in TailoredProfile
- Add check to see if the ConfigMap contains the rules and value set in the TailoredProfile
make e2e-parallel E2E_CONTENT_IMAGE_PATH="quay.io/rh-ee-akoudelk/content_repo:testcontent" E2E_BROKEN_CONTENT_IMAGE_PATH="ghcr.io/complianceascode/test-broken-content-ocp" E2E_GO_TEST_FLAGS="-v -timeout 60m -run TestSingleTailoredScanSucceeds"was used on OCP 4.20 cluster to trigger this test case and it has passed when implementing also the changes in PR #960=== RUN TestSingleTailoredScanSucceeds === PAUSE TestSingleTailoredScanSucceeds === CONT TestSingleTailoredScanSucceeds 2025/11/24 20:35:08 TailoredProfile ready (READY) 2025/11/24 20:35:08 In the middle of checking configmap: test-tailoredprofile-tp configmap 2025/11/24 20:35:14 Waiting for run of test-tailoredprofile-master compliancescan (LAUNCHING) 2025/11/24 20:35:19 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:24 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:29 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:34 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:39 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:44 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:49 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:54 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:35:59 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:36:04 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/24 20:36:09 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING) 2025/11/24 20:36:14 ComplianceScan ready (DONE) 2025/11/24 20:36:19 ComplianceScan ready (DONE) --- PASS: TestSingleTailoredScanSucceeds (77.63s) PASS ... ok github.com/ComplianceAsCode/compliance-operator/tests/e2e/parallel 350.232s
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
Hi @Anna-Koudelkova. Thanks for your PR.
I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/ok-to-test
tested on 4.20 and it seems working:
=== RUN TestSingleTailoredScanSucceeds === PAUSE TestSingleTailoredScanSucceeds === CONT TestSingleTailoredScanSucceeds 2025/11/26 15:57:41 TailoredProfile ready (READY) 2025/11/26 15:57:46 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:57:51 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:57:56 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:01 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:06 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:11 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:16 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:21 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:26 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:31 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:36 Waiting for run of test-tailoredprofile-master compliancescan (RUNNING) 2025/11/26 15:58:41 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING) 2025/11/26 15:58:46 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING) 2025/11/26 15:58:51 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING) 2025/11/26 15:58:56 Waiting for run of test-tailoredprofile-master compliancescan (AGGREGATING) 2025/11/26 15:59:01 ComplianceScan ready (DONE) 2025/11/26 15:59:06 ComplianceScan ready (DONE) --- PASS: TestSingleTailoredScanSucceeds (90.92s) PASS
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Anna-Koudelkova, rhmdnd
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [rhmdnd]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment