Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestAnchorExternalHrefMalformed panics on Go 1.13rc1 #127

Closed
QuLogic opened this issue Sep 1, 2019 · 2 comments · Fixed by #132
Closed

TestAnchorExternalHrefMalformed panics on Go 1.13rc1 #127

QuLogic opened this issue Sep 1, 2019 · 2 comments · Fixed by #132
Assignees
Labels

Comments

@QuLogic
Copy link
Contributor

QuLogic commented Sep 1, 2019

Describe the bug

An automatic rebuild against Go 1.13rc1 has started failing due to a panic in TestAnchorExternalHrefMalformed. I believe this is because Go has become stricter about parsing invalid ports. (This may also have been backported to 1.12.? and 1.11.?.)

To Reproduce

Steps to reproduce the behaviour:

  1. Install Go 1.13rc1
  2. Run go test on htmltest

.htmltest.yml

I don't have anything specific, just whatever's in the test.

Expected behaviour

Tests pass

Actual behaviour

--- FAIL: TestAnchorExternalHrefMalformed (0.00s)
panic: parse http://127.0.0.1:____: invalid port ":____" after host [recovered]
	panic: parse http://127.0.0.1:____: invalid port ":____" after host
goroutine 61 [running]:
testing.tRunner.func1(0xc00054e000)
	/usr/lib/golang/src/testing/testing.go:874 +0x3a5
panic(0x558ad7ce6860, 0xc0005af3b0)
	/usr/lib/golang/src/runtime/panic.go:679 +0x1b6
github.com/wjdp/htmltest/output.CheckErrorPanic(...)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/output/error.go:22
github.com/wjdp/htmltest/htmldoc.NewReference(0xc0002c0d00, 0xc0000ed180, 0xc0006dfc20, 0x15, 0xc000581ee8)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmldoc/reference.go:34 +0x1fa
github.com/wjdp/htmltest/htmltest.(*HTMLTest).checkLink(0xc0002fb440, 0xc0002c0d00, 0xc0000ed180)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmltest/check-link.go:33 +0x1dc
github.com/wjdp/htmltest/htmltest.(*HTMLTest).testDocument(0xc0002fb440, 0xc0002c0d00)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmltest/htmltest.go:203 +0x18e
github.com/wjdp/htmltest/htmltest.Test(0xc00021e0c0, 0xc000544720, 0x558ad7cf89c0, 0xc00021e090)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmltest/htmltest.go:139 +0x8a4
github.com/wjdp/htmltest/htmltest.tTestFileOpts(0x558ad7bc97b4, 0x26, 0xc00021e090, 0x9)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmltest/test_helpers_test.go:60 +0x113
github.com/wjdp/htmltest/htmltest.TestAnchorExternalHrefMalformed(0xc00054e000)
	/builddir/build/BUILD/htmltest-0.10.3/_build/src/github.com/wjdp/htmltest/htmltest/check-link_test.go:86 +0xb5
testing.tRunner(0xc00054e000, 0x558ad7d639a0)
	/usr/lib/golang/src/testing/testing.go:909 +0xcb
created by testing.(*T).Run
	/usr/lib/golang/src/testing/testing.go:960 +0x352
exit status 2

Versions

  • OS: Fedora Rawhide
  • htmltest: 0.10.3
@QuLogic QuLogic added the bug label Sep 1, 2019
@wjdp
Copy link
Owner

wjdp commented Sep 2, 2019

@QuLogic thanks for the report, looks like we'll need to either catch this or run our own validation

@QuLogic
Copy link
Contributor Author

QuLogic commented Nov 14, 2019

Any updates?

tomtom5152 added a commit to tomtom5152/htmltest that referenced this issue Dec 2, 2019
…rror.

Will also handle other reference errors more gracefully.

Closes wjdp#127.
@wjdp wjdp closed this as completed in #132 Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants