Skip to content

Commit 44789bd

Browse files
committed
Update scan name assignment in CustomRule tests to use TailoredProfile name.
This change clarifies the expected behavior for TailoredProfiles in the tests, ensuring accurate compliance check results.
1 parent 1b58954 commit 44789bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/e2e/parallel/main_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,8 +2489,8 @@ func TestCustomRuleTailoredProfile(t *testing.T) {
24892489
}
24902490

24912491
// Validate that the CustomRule result is FAIL
2492-
// The scan name should be the same as the suite name for platform scans
2493-
scanName := suiteName
2492+
// For TailoredProfiles, the scan name is the TailoredProfile name
2493+
scanName := tpName
24942494
expectedCheck := compv1alpha1.ComplianceCheckResult{
24952495
ObjectMeta: metav1.ObjectMeta{
24962496
Name: fmt.Sprintf("%s-%s", scanName, customRuleName),
@@ -2665,8 +2665,8 @@ func TestCustomRuleWithMultipleInputs(t *testing.T) {
26652665
}
26662666

26672667
// Validate that the CustomRule result is FAIL
2668-
// The scan name should be the same as the suite name for platform scans
2669-
scanName := suiteName
2668+
// For TailoredProfiles, the scan name is the TailoredProfile name
2669+
scanName := tpName
26702670
expectedCheck := compv1alpha1.ComplianceCheckResult{
26712671
ObjectMeta: metav1.ObjectMeta{
26722672
Name: fmt.Sprintf("%s-%s", scanName, customRuleName),

0 commit comments

Comments
 (0)