Skip to content

Commit

Permalink
chore: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
cfabianski committed Nov 15, 2023
1 parent 10018b6 commit 37eeba0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
5 changes: 5 additions & 0 deletions e2e/flags/.snapshots/TestReportFlagsShouldFail-format-jsonv2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{"source":"Bearer","version":"dev","findings":[{"cwe_ids":["42"],"id":"test_ruby_logger","title":"Ruby logger","description":"Ruby logger","documentation_url":"","line_number":1,"full_filename":"e2e/flags/testdata/simple/main.rb","filename":"main.rb","data_type":{"category_uuid":"cef587dd-76db-430b-9e18-7b031e1a193b","name":"Email Address"},"category_groups":["PII","Personal Data"],"source":{"start":1,"end":1,"column":{"start":26,"end":36}},"sink":{"start":1,"end":1,"column":{"start":1,"end":37},"content":"logger.info(\"user info\", user.email)"},"parent_line_number":1,"snippet":"logger.info(\"user info\", user.email)","fingerprint":"fa5e03644738e4c17cbbd04a580506b1_0","old_fingerprint":"8240e1537878783bac845d1163c80555_0","code_extract":"logger.info(\"user info\", user.email)","severity":"critical"}]}

--
Analyzing codebase

5 changes: 0 additions & 5 deletions e2e/flags/.snapshots/TestReportJsonV2Flags-format-jsonv2

This file was deleted.

9 changes: 1 addition & 8 deletions e2e/flags/report_flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ func TestReportFlags(t *testing.T) {
testhelper.RunTests(t, tests)
}

func TestReportJsonV2Flags(t *testing.T) {
tests := []testhelper.TestCase{
newScanTest("format-jsonv2", []string{"--format=jsonv2", "--external-rule-dir=e2e/testdata/rules"}),
}

testhelper.RunTests(t, tests)
}

func TestReportFlagsShouldFail(t *testing.T) {
t.Parallel()
tests := []testhelper.TestCase{
newScanTest("invalid-report-flag", []string{"--report=testing"}),
newScanTest("invalid-format-flag-security", []string{"--format=testing"}),
newScanTest("invalid-format-flag-privacy", []string{"--report=privacy", "--format=testing"}),
newScanTest("invalid-context-flag", []string{"--context=testing"}),
newScanTest("format-jsonv2", []string{"--format=jsonv2", "--external-rule-dir=e2e/testdata/rules"}),
}

for i := range tests {
Expand Down

0 comments on commit 37eeba0

Please sign in to comment.