Skip to content

Commit

Permalink
fix: rename snapshot files
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Aug 25, 2023
1 parent 33977ef commit ba8f94a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/report/output/privacy/privacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestBuildCsvString(t *testing.T) {
cupaloy.SnapshotT(t, stringBuilder.String())
}

func TestGetData(t *testing.T) {
func TestAddReportData(t *testing.T) {
config, err := generateConfig(flag.ReportOptions{Report: "privacy"})
config.Rules = map[string]*settings.Rule{
"ruby_third_parties_sentry": config.Rules["ruby_third_parties_sentry"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
DetailedContext: (string) "",
CodeExtract: (string) "",
RawCodeExtract: ([]file.Line) {
}
},
SomeExtraField: (string) ""
}
},
(string) (len=4) "high": ([]types.Finding) (len=1) {
Expand Down Expand Up @@ -101,7 +102,8 @@
DetailedContext: (string) "",
CodeExtract: (string) "",
RawCodeExtract: ([]file.Line) {
}
},
SomeExtraField: (string) ""
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
DetailedContext: (string) "",
CodeExtract: (string) "",
RawCodeExtract: ([]file.Line) {
}
},
SomeExtraField: (string) ""
}
}
}
4 changes: 2 additions & 2 deletions pkg/report/output/security/security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestNoRulesBuildReportString(t *testing.T) {
cupaloy.SnapshotT(t, stringBuilder.String())
}

func AddReportData(t *testing.T) {
func TestAddReportData(t *testing.T) {
config, err := generateConfig(flag.ReportOptions{
Report: "security",
Severity: map[string]bool{
Expand All @@ -136,7 +136,7 @@ func AddReportData(t *testing.T) {
cupaloy.SnapshotT(t, output.FindingsBySeverity)
}

func AddReportDataWithSeverity(t *testing.T) {
func TestAddReportDataWithSeverity(t *testing.T) {
config, err := generateConfig(flag.ReportOptions{
Report: "security",
Severity: map[string]bool{
Expand Down

0 comments on commit ba8f94a

Please sign in to comment.