@@ -70,14 +70,15 @@ func TestXscAuditViolationsWithIgnoreRule(t *testing.T) {
7070 defer cleanUpWatch ()
7171 // Run the audit command with git repo and verify violations are reported to the platform.
7272 output := testAuditCommand (t , cliToRun , auditCommandTestParams {Format : string (format .SimpleJson ), WithLicense : true , WithVuln : true })
73- validations .VerifySimpleJsonResults (t , output , validations.ValidationParams {Total : & validations.TotalCount {Licenses : 100 , Violations : 100 , Vulnerabilities : 100 }})
73+ validations .VerifySimpleJsonResults (t , output , validations.ValidationParams {Total : & validations.TotalCount {Licenses : 3 , Violations : 26 , Vulnerabilities : 39 }})
7474 // Create an ignore rule for the git repo
75- securityTestUtils .CreateTestIgnoreRule (t , utils.IgnoreFilters {
75+ cleanUpIgnoreRule := securityTestUtils .CreateTestIgnoreRule (t , utils.IgnoreFilters {
7676 GitRepositories : []string {validations .TestMockGitInfo .GitRepoHttpsCloneUrl },
7777 Exposures : []utils.ExposuresFilterName {{Categories : []utils.ExposuresCategories {{Secrets : true , Iac : true }}}},
7878 Sast : []utils.SastFilterName {{Rule : []string {"any" }}},
7979 CVEs : []string {"any" },
8080 })
81+ defer cleanUpIgnoreRule ()
8182 // Run the audit command and verify no issues.
8283 output = testAuditCommand (t , cliToRun , auditCommandTestParams {Format : string (format .SimpleJson )})
8384 validations .VerifySimpleJsonResults (t , output , validations.ValidationParams {ExactResultsMatch : true , Total : & validations.TotalCount {}})
0 commit comments