fix(multiplayer): bound adapter HTTP calls

This commit is contained in:
Josh Creek
2026-09-02 19:12:40 +01:00
parent cbefa86c5c
commit 1bce603c33
5 changed files with 36 additions and 11 deletions
+10
View File
@@ -13,6 +13,16 @@ import (
"time"
)
func TestSupervisorDefaultHTTPClientHasRequestDeadline(t *testing.T) {
supervisor, err := New(Config{Command: []string{"game-server"}})
if err != nil {
t.Fatal(err)
}
if supervisor.client == http.DefaultClient || supervisor.client.Timeout != DefaultHTTPTimeout || supervisor.client.Timeout <= 0 {
t.Fatalf("default HTTP client timeout = %s", supervisor.client.Timeout)
}
}
func TestWithAllocatedConfigOverridesAuthoritativeChildFlags(t *testing.T) {
command := []string{
"game-server", "--", "--allocated-mode", "--match-id=stale-match",