Skip to content

Commit

Permalink
skip test if pdcp keys are not present
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Apr 18, 2024
1 parent 267ebaf commit fea1375
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/input/provider/list/hmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
"github.com/projectdiscovery/nuclei/v3/pkg/types"
"github.com/projectdiscovery/nuclei/v3/pkg/utils/expand"
"github.com/projectdiscovery/utils/auth/pdcp"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -153,6 +154,13 @@ func Test_scanallips_normalizeStoreInputValue(t *testing.T) {
}

func Test_expandASNInputValue(t *testing.T) {
// skip this test if pdcp keys are not present
h := pdcp.PDCPCredHandler{}
creds, err := h.GetCreds()
if err != nil || creds == nil || creds.APIKey == "" {
t.Logf("Skipping asnmap test as pdcp keys are not present")
t.SkipNow()
}
tests := []struct {
asn string
expectedOutputFile string
Expand Down

0 comments on commit fea1375

Please sign in to comment.