Skip to content

Commit

Permalink
Mark detector tests with a build flag (#613)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina committed Jul 7, 2022
1 parent 721a33e commit c4ca7d7
Show file tree
Hide file tree
Showing 729 changed files with 2,187 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -28,13 +28,13 @@ test-failing:
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/) | grep FAIL

test:
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/ | grep -v /pkg/detectors)
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep -v /vendor/)

test-race:
CGO_ENABLED=1 go test -timeout=5m -race $(shell go list ./... | grep -v /vendor/ | grep -v /pkg/detectors)
CGO_ENABLED=1 go test -timeout=5m -race $(shell go list ./... | grep -v /vendor/)

test-detectors:
CGO_ENABLED=0 go test -timeout=5m $(shell go list ./... | grep /pkg/detectors)
CGO_ENABLED=0 go test -tags=detectors -timeout=5m $(shell go list ./...)

bench:
CGO_ENABLED=0 go test $(shell go list ./pkg/secrets/... | grep -v /vendor/) -benchmem -run=xxx -bench .
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/abbysale/abbysale_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package abbysale

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/abstract/abstract_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package abstract

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/abuseipdb/abuseipdb_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package abuseipdb

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/accuweather/accuweather_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package accuweather

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/adafruitio/adafruitio_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package adafruitio

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/adobeio/adobeio_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package adobeio

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/adzuna/adzuna_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package adzuna

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/aeroworkflow/aeroworkflow_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package aeroworkflow

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/agora/agora_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package agora

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/aha/aha_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package aha

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/airbrakeprojectkey/airbrakeprojectkey_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package airbrakeprojectkey

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/airbrakeuserkey/airbrakeuserkey_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package airbrakeuserkey

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/airship/airship_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package airship

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/airtableapikey/airtableapikey_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package airtableapikey

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/airvisual/airvisual_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package airvisual

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/alconost/alconost_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package alconost

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/alegra/alegra_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package alegra

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/aletheiaapi/aletheiaapi_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package aletheiaapi

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/algoliaadminkey/algoliaadminkey_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package algoliaadminkey

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/alibaba/alibaba_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package alibaba

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/alienvault/alienvault_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package alienvault

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/allsports/allsports_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package allsports

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/amadeus/amadeus_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package amadeus

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/ambee/ambee_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package ambee

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/amplitudeapikey/amplitudeapikey_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package amplitudeapikey

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/anypoint/anypoint_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package anypoint

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apacta/apacta_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apacta

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/api2cart/api2cart_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package api2cart

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apideck/apideck_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apideck

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apiflash/apiflash_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apiflash

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apifonica/apifonica_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apifonica

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apify/apify_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apify

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apimatic/apimatic_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apimatic

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apiscience/apiscience_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apiscience

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apitemplate/apitemplate_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apitemplate

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apollo/apollo_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apollo

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/appcues/appcues_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package appcues

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/appfollow/appfollow_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package appfollow

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/appsynergy/appsynergy_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package appsynergy

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/apptivo/apptivo_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package apptivo

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/artifactory/artifactory_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package artifactory

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/artsy/artsy_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package artsy

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/asanaoauth/asanaoauth_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package asanaoauth

import (
Expand Down
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package asanapersonalaccesstoken

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/assemblyai/assemblyai_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package assemblyai

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/atera/atera_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package atera

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/audd/audd_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package audd

import (
Expand Down
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package auth0managementapitoken

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/auth0oauth/auth0oauth_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package auth0oauth

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/autodesk/autodesk_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package autodesk

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/autoklose/autoklose_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package autoklose

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/autopilot/autopilot_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package autopilot

import (
Expand Down
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package avazapersonalaccesstoken

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/detectors/aviationstack/aviationstack_test.go
@@ -1,3 +1,6 @@
//go:build detectors
// +build detectors

package aviationstack

import (
Expand Down

0 comments on commit c4ca7d7

Please sign in to comment.