Skip to content

Find, verify, and analyze leaked credentials

[Fix] detector's integration tests starting with alphabet 'e' & 'f' (#3764)

Abdul Basitb26aa17e6fb5
diff --git a/pkg/detectors/edamam/edamam_integration_test.go b/pkg/detectors/edamam/edamam_integration_test.go
index 016daa6d4..af09b26d7 100644
--- a/pkg/detectors/edamam/edamam_integration_test.go
+++ b/pkg/detectors/edamam/edamam_integration_test.go
@@ -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)
diff --git a/pkg/detectors/ftp/ftp_integration_test.go b/pkg/detectors/ftp/ftp_integration_test.go
index 80982dc07..ce4a3db33 100644
--- a/pkg/detectors/ftp/ftp_integration_test.go
+++ b/pkg/detectors/ftp/ftp_integration_test.go
@@ -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 {