Skip to content

Commit

Permalink
chore: remove useless detector test
Browse files Browse the repository at this point in the history
  • Loading branch information
rgmz committed Dec 26, 2024
1 parent eedd707 commit d5a0716
Show file tree
Hide file tree
Showing 374 changed files with 649 additions and 2,569 deletions.
5 changes: 0 additions & 5 deletions pkg/detectors/abbysale/abbysale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAbbySale_Pattern(t *testing.T) {
input: fmt.Sprintf("abbysale token = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("abbysale token keyword is not close to the real token = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("abbysale = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/abstract/abstract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAbstract_Pattern(t *testing.T) {
input: fmt.Sprintf("abstract token = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("abstract token keyword is not close to the real token = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("abstract = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/abuseipdb/abuseipdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAbuseipdb_Pattern(t *testing.T) {
input: fmt.Sprintf("abuseipdb token = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("abuseipdb token keyword is not close to the real token = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("abuseipdb = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/accuweather/accuweather_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAccuWeather_Pattern(t *testing.T) {
input: fmt.Sprintf("accuweather token = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("accuweather token keyword is not close to the real token = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("accuweather = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/adobeio/adobeio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAdobeIO_Pattern(t *testing.T) {
input: fmt.Sprintf("adobe = '%s'", validPattern),
want: []string{"zxcv0987mnbv1234poiu6749gtnrfv54WDcv0981Mn.B"},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("adobe keyword is not close to the real id and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("adobe%s", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/adzuna/adzuna_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ func TestAdzuna_Pattern(t *testing.T) {
input: fmt.Sprintf("adzuna = '%s'", validPattern),
want: []string{"asdf0987mnbv1234qsxojb6ygb2wsx0oqsc0f098"},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("adzuna keyword is not close to the real id and secret = '%s'", validPattern),
want: nil,
},
{
name: "valid pattern - only key",
input: fmt.Sprintf("adzuna %s", strings.Split(validPattern, "/")[0]),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/aeroworkflow/aeroworkflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ func TestAeroWorkflow_Pattern(t *testing.T) {
input: fmt.Sprintf("aeroworkflow = '%s'", validPattern),
want: []string{"qscVgy!WdvG;^#O:*?TG806445634"},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("aeroworkflow keyword is not close to the real id and secret = '%s'", validPattern),
want: nil,
},
{
name: "valid pattern - only key",
input: fmt.Sprintf("aeroworkflow %s", strings.Split(validPattern, "/")[0]),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/agora/agora_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ func TestAgora_Pattern(t *testing.T) {
input: fmt.Sprintf("agora data='%s'", complexPattern),
want: []string{validKeyPattern + validSecretPattern},
},
{
name: "valid pattern - out of prefix range",
input: fmt.Sprintf("agora keyword is not close to the real key or secret = '%s|%s'", validKeyPattern, validSecretPattern),
want: nil,
},
{
name: "valid pattern - only key",
input: fmt.Sprintf("agora key%s", validKeyPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/aha/aha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ func TestAha_Pattern(t *testing.T) {
input: fmt.Sprintf("aha.io = '%s\n URL is not close to the keyword but should be detected %s'", key, url),
want: []string{key},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("aha.io keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "valid pattern - only key",
input: fmt.Sprintf("aha.io %s", key),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ func TestAirBrakeProjectKey_Pattern(t *testing.T) {
input: fmt.Sprintf("airbrake = '%s'", validPattern),
want: []string{"qwmnerBv56zxpocvkjqr78afvYUx90Op451298"},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("airbrake keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "valid pattern - only key",
input: fmt.Sprintf("airbrake %s", strings.Split(validPattern, "/")[0]),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAirBrakeUserKey_Pattern(t *testing.T) {
input: fmt.Sprintf("airbrake = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("airbrake keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("airbrake = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/airship/airship_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAirship_Pattern(t *testing.T) {
input: fmt.Sprintf("airship = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("airship keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("airship = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/airvisual/airvisual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAirVisual_Pattern(t *testing.T) {
input: fmt.Sprintf("airvisual = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("airvisual keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("airvisual key: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/aiven/aiven_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAiven_Pattern(t *testing.T) {
input: fmt.Sprintf("aiven = '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("aiven keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("aiven = '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/alconost/alconost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAlconost_Pattern(t *testing.T) {
input: fmt.Sprintf("alconost: '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("alconost keyword is not close to the real key in the data = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("alconost: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/alegra/alegra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ func TestAlegra_Pattern(t *testing.T) {
input: fmt.Sprintf("alegra: %s", validSpecialCharPattern),
want: []string{"wdvn-usa87a-fxp9ioas:[email protected]"},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("alegra keyword is not close to the real key and id = %s", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("alegra: %s", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/aletheiaapi/aletheiaapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAleTheIaAPI_Pattern(t *testing.T) {
input: fmt.Sprintf("aletheiaapi: '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("aletheiaapi keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("aletheiaapi: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/algoliaadminkey/algoliaadminkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAlgoliaAdminKey_Pattern(t *testing.T) {
input: fmt.Sprintf("algolia: '%s'", validPattern),
want: []string{"ADMIN01KEY:AlgoliaAdminKey010TESTINGPlmiOPC"},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("algolia keyword is not close to the real key and secret = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("algolia: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/alienvault/alienvault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAlienVault_Pattern(t *testing.T) {
input: fmt.Sprintf("alienvault: '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("alienvault keyword is not close to the real key in the data\n = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("alienvault: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/allsports/allsports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAllSports_Pattern(t *testing.T) {
input: fmt.Sprintf("allsports: '%s'", validPattern),
want: []string{validPattern},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("allsports keyword is not close to the real key in the data\n = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("allsports: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/amadeus/amadeus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAmadeus_Pattern(t *testing.T) {
input: fmt.Sprintf("amadeus: '%s'", validPattern),
want: []string{"A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6A1b2C3d4E5f6G7ho"},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("amadeus keyword is not close to the real key in the data\n = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("amadeus: '%s'", invalidPattern),
Expand Down
5 changes: 0 additions & 5 deletions pkg/detectors/ambee/ambee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ func TestAmbee_Pattern(t *testing.T) {
input: fmt.Sprintf("ambee: '%s'", validPattern),
want: []string{"a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4"},
},
{
name: "valid pattern - key out of prefix range",
input: fmt.Sprintf("ambee keyword is not close to the real key in the data\n = '%s'", validPattern),
want: nil,
},
{
name: "invalid pattern",
input: fmt.Sprintf("ambee: '%s'", invalidPattern),
Expand Down
Loading

0 comments on commit d5a0716

Please sign in to comment.