Skip to content

Commit

Permalink
don't run shodan tests if there's no API key
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed Sep 3, 2022
1 parent 3204d4b commit be4afbc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions check/shodan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import (
)

func TestShodan(t *testing.T) {
apiKey, err := getConfigValue("SHODAN_API_KEY")
if err != nil || apiKey == "" {
return
}

t.Run("given valid response then result and no error is returned", func(t *testing.T) {
handlerFn := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
rw.WriteHeader(http.StatusOK)
Expand Down

0 comments on commit be4afbc

Please sign in to comment.