Skip to content

Commit

Permalink
[Fix] detector's integration tests starting with alphabet 'e' & 'f' (#…
Browse files Browse the repository at this point in the history
…3764)

* edamam detector test fixed

* fix ftp detector test
  • Loading branch information
abmussani authored Dec 11, 2024
1 parent 2821fb3 commit b26aa17
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/detectors/edamam/edamam_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ func TestEdamam_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 raw v2 secret present: \n %+v", got[i])
}
got[i].RawV2 = nil
}
if diff := pretty.Compare(got, tt.want); diff != "" {
t.Errorf("Edamam.FromData() %s diff: (-got +want)\n%s", tt.name, diff)
Expand Down
10 changes: 9 additions & 1 deletion pkg/detectors/ftp/ftp_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ func TestFTP_FromChunk(t *testing.T) {
data: []byte("ftp://abc:[email protected]/pub/FreeBSD/doc/tr/articles/explaining-bsd/explaining-bsd_tr.pdf"),
verify: true,
},
wantErr: false,
want: []detectors.Result{
{
DetectorType: detectorspb.DetectorType_FTP,
Verified: false,
Redacted: "ftp://abc:********@ftp.freebsd.org",
},
},
wantErr: false,
wantVerificationErr: true,
},
}
for _, tt := range tests {
Expand Down

0 comments on commit b26aa17

Please sign in to comment.