internal/api/main_test.go
0 → 100644
+15
−0
Loading
mojangProfileAPI defaults to https://api.mojang.com, and only the tests that call stubMojangNames or setProfileAPI swap it out. A new test that reaches a third-party login without doing so would query the real service: its result then depends on network access and on whether someone owns the name that day, and the shared premium cache can carry that answer into later tests. A TestMain now points the lookup at an address nothing listens on before any test runs, so a forgotten stub always takes the same fail-closed path. Tests that stub it restore this address, not the live one, when they finish.