diff --git a/pkg/detectors/mailchimp/mailchimp_integration_test.go b/pkg/detectors/mailchimp/mailchimp_integration_test.go index c181fd5674da..d524439ef7f9 100644 --- a/pkg/detectors/mailchimp/mailchimp_integration_test.go +++ b/pkg/detectors/mailchimp/mailchimp_integration_test.go @@ -94,6 +94,7 @@ func TestMailchimp_FromChunk(t *testing.T) { } got[i].Raw = nil got[i].AnalysisInfo = nil + got[i].ExtraData = nil } if diff := pretty.Compare(got, tt.want); diff != "" { t.Errorf("Mailchimp.FromData() %s diff: (-got +want)\n%s", tt.name, diff) diff --git a/pkg/detectors/mailgun/mailgun_integration_test.go b/pkg/detectors/mailgun/mailgun_integration_test.go index 0b887ce2c37e..65f7934ec377 100644 --- a/pkg/detectors/mailgun/mailgun_integration_test.go +++ b/pkg/detectors/mailgun/mailgun_integration_test.go @@ -130,6 +130,7 @@ func TestMailgun_FromChunk(t *testing.T) { } got[i].Raw = nil got[i].AnalysisInfo = nil + got[i].ExtraData = nil } if diff := pretty.Compare(got, tt.want); diff != "" { t.Errorf("Mailgun.FromData() %s diff: (-got +want)\n%s", tt.name, diff) diff --git a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go index b1db37b782a1..26b9605619d0 100644 --- a/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go +++ b/pkg/detectors/mattermostpersonaltoken/mattermostpersonaltoken_integration_test.go @@ -60,7 +60,7 @@ func TestMattermostPersonalToken_FromChunk(t *testing.T) { s: Scanner{}, args: args{ ctx: context.Background(), - data: []byte(fmt.Sprintf("You can find a mattermost secret %s within mattermost server %s but not valid", inactiveSecret, "test323561.cloud.mattermost.com")), // the secret would satisfy the regex but not pass validation + data: []byte(fmt.Sprintf("You can find a mattermost secret %s within mattermost server %s but not valid", inactiveSecret, server)), // the secret would satisfy the regex but not pass validation verify: true, }, want: []detectors.Result{ @@ -96,6 +96,11 @@ func TestMattermostPersonalToken_FromChunk(t *testing.T) { t.Fatalf("no raw secret present: \n %+v", got[i]) } got[i].Raw = nil + + if len(got[i].RawV2) == 0 { + t.Fatalf("no RawV2 secret present: \n %+v", got[i]) + } + got[i].RawV2 = nil } if diff := pretty.Compare(got, tt.want); diff != "" { t.Errorf("MattermostPersonalToken.FromData() %s diff: (-got +want)\n%s", tt.name, diff) diff --git a/pkg/detectors/mux/mux_integration_test.go b/pkg/detectors/mux/mux_integration_test.go index 871b44a7a35d..ec8427b86542 100644 --- a/pkg/detectors/mux/mux_integration_test.go +++ b/pkg/detectors/mux/mux_integration_test.go @@ -97,6 +97,11 @@ func TestMux_FromChunk(t *testing.T) { t.Fatalf("no raw secret present: \n %+v", got[i]) } got[i].Raw = nil + + if len(got[i].RawV2) == 0 { + t.Fatalf("no rawv2 secret present: \n %+v", got[i]) + } + got[i].RawV2 = nil } if diff := pretty.Compare(got, tt.want); diff != "" { t.Errorf("Mux.FromData() %s diff: (-got +want)\n%s", tt.name, diff)