[GH-ISSUE #299] Not consistent tests #238

Open
opened 2026-02-26 12:34:20 +03:00 by kerem · 0 comments
Owner

Originally created by @Randomneo on GitHub (Mar 3, 2025).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/299

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

Originally created by @Randomneo on GitHub (Mar 3, 2025). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/299 I'm not go dev. But got issue with installing it on my machine. Installation package contain `go test ./...`. Which fails with this message: ```bash --- 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](https://www.site24x7.com/tools/public/r/5/LAFfSZhODCZbeHQ8G+FxMlvuYKI4UpkBImPTtKNOc7gNSO2PR6nac7CJg0ePoLHS1govCGnfOPWo0DhhLqfA==) and by replacing `example.com` with `github.com` or my personal domain in `internal/server/state_test.go` solved the issue
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#238
No description provided.