mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
fix(multiplayer): bound adapter HTTP calls
This commit is contained in:
@@ -17,6 +17,13 @@ func request() domain.AllocationRequest {
|
||||
return domain.AllocationRequest{AllocationID: "allocation-1", MatchID: "match-1", Region: "EU", Build: "build-1", Protocol: 1, Transport: "enet"}
|
||||
}
|
||||
|
||||
func TestClientDefaultHTTPTransportHasRequestDeadline(t *testing.T) {
|
||||
client := (Client{}).httpClient()
|
||||
if client == http.DefaultClient || client.Timeout != DefaultHTTPTimeout || client.Timeout <= 0 {
|
||||
t.Fatalf("default HTTP client timeout = %s", client.Timeout)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAllocateRejectsRankedRequestsWithoutRegisteredArena(t *testing.T) {
|
||||
client := Client{BaseURL: "http://127.0.0.1:1", Namespace: "games"}
|
||||
for _, path := range []string{"", "res://scenes/arena_01_elevated.tscn", "res://forged.tscn"} {
|
||||
|
||||
Reference in New Issue
Block a user