Skip to content

Commit

Permalink
Add missing skips for external access.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Feb 6, 2021
1 parent 2409cf0 commit 26605a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htmltest/check-link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func TestAnchorExternalBrokenOptionHrefIP(t *testing.T) {

func TestAnchorExternalHrefIPTimeout(t *testing.T) {
// fails for broken IP address links
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/ip_timeout.html",
map[string]interface{}{"ExternalTimeout": 1})
tExpectIssueCount(t, hT, 1)
Expand Down Expand Up @@ -204,6 +205,7 @@ func TestAnchorExternalBrokenOptionHTTPSInvalid(t *testing.T) {
func TestAnchorExternalHTTPSMissingChain(t *testing.T) {
// should support https aia
// see issue #130
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/https-incomplete-chain.html",
map[string]interface{}{"VCREnable": false})
tExpectIssue(t, hT, "incomplete certificate chain", 1)
Expand Down Expand Up @@ -284,12 +286,14 @@ func TestAnchorExternalInvalidBrackets(t *testing.T) {

func TestAnchorExternalQueryStringDefault(t *testing.T) {
// passes when ignoring from default list of query string exempt URLs
tSkipShortExternal(t)
hT := tTestFile("fixtures/links/query_strings.html")
tExpectIssueCount(t, hT, 0)
}

func TestAnchorExternalQueryStripQueryExcludesEmpty(t *testing.T) {
// fails when StripQueryExcludes blank and URL doesn't like query string hits
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/query_strings.html",
map[string]interface{}{"StripQueryExcludes": []interface{}{}})
tExpectIssueCount(t, hT, 1)
Expand All @@ -298,6 +302,7 @@ func TestAnchorExternalQueryStripQueryExcludesEmpty(t *testing.T) {

func TestAnchorExternalQueryStringStripQueryExcludesDiffers(t *testing.T) {
// fails when StripQueryExcludes does not include URL and URL doesn't like query string hits
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/query_strings.html",
map[string]interface{}{"StripQueryExcludes": []interface{}{"example.com", "test.invalid"}})
tExpectIssueCount(t, hT, 1)
Expand Down Expand Up @@ -677,12 +682,14 @@ func TestAnchorBlankHTML4(t *testing.T) {
}

func TestSelfSignedLink(t *testing.T) {
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/selfSignedLink.html",
map[string]interface{}{"IgnoreSSLVerify": false})
tExpectIssueCount(t, hT, 1)
}

func TestSelfSignedLinkIgnoreSSLVerify(t *testing.T) {
tSkipShortExternal(t)
hT := tTestFileOpts("fixtures/links/selfSignedLink.html",
map[string]interface{}{"IgnoreSSLVerify": true})
tExpectIssueCount(t, hT, 0)
Expand Down
1 change: 1 addition & 0 deletions htmltest/htmltest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func TestFileExtensionOption(t *testing.T) {
}

func TestCacheIntegration(t *testing.T) {
tSkipShortExternal(t)
tTestFileOpts("fixtures/links/https-valid.html",
map[string]interface{}{"EnableCache": true})
hT2 := tTestFileOpts("fixtures/links/https-valid.html",
Expand Down

0 comments on commit 26605a5

Please sign in to comment.