Cloak
Cloak copied to clipboard
Not consistent tests
I'm not go dev. But got issue with installing it on my machine. Installation package contain go test ./.... Which fails with this message:
--- FAIL: TestParseRedirAddr (0.01s)
--- FAIL: TestParseRedirAddr/domain_without_port (0.00s)
state_test.go:52: expected 23.215.0.136 got 96.7.128.198
--- FAIL: TestParseRedirAddr/domain_with_port (0.00s)
state_test.go:72: expected 23.215.0.136 got 23.215.0.138
I found out that test relay on ip resolving of example.com which is not consistent (each ping command resolves to different ipv4) example.com ips
and by replacing example.com with github.com or my personal domain in internal/server/state_test.go solved the issue