diff --git a/Game/tests/control_plane_smoke.gd b/Game/tests/control_plane_smoke.gd index 0a3d108d..6ac53be7 100644 --- a/Game/tests/control_plane_smoke.gd +++ b/Game/tests/control_plane_smoke.gd @@ -65,10 +65,12 @@ func _on_request_succeeded(operation: String, payload: Dictionary) -> void: return match operation: "steam_session": - print("SMOKE: logged in as %s, creating a queue ticket..." % ControlPlaneClient.player_id) - var err := ControlPlaneClient.queue_create(_ticket_id, "casual", "smoke-build", 1) + print("SMOKE: logged in as %s, fetching ranked profile (expect none yet)..." % ControlPlaneClient.player_id) + var err := ControlPlaneClient.fetch_ranked_profile() if err != OK: - _finish(false, "queue_create() failed to start: %s" % error_string(err)) + _finish(false, "fetch_ranked_profile() failed to start: %s" % error_string(err)) + "ranked_profile": + _finish(false, "a brand-new testkit identity unexpectedly already has a ranked profile: %s" % payload) "queue_create": if payload.get("ticket_id", "") != _ticket_id or payload.get("state", "") != "QUEUED": _finish(false, "unexpected queue_create payload: %s" % payload) @@ -123,6 +125,15 @@ func _send_cancel_once_idle() -> void: func _on_request_failed(operation: String, http_code: int, detail: String) -> void: if _finished: return + if operation == "ranked_profile" and http_code == HTTPClient.RESPONSE_NOT_FOUND: + # Expected: a brand-new testkit identity has no ratings row yet, and + # the real store adapter reports that the same way the in-memory + # fallback it replaced always did -- not found, not an error. + print("SMOKE: ranked profile correctly reports not found, creating a queue ticket...") + var err := ControlPlaneClient.queue_create(_ticket_id, "casual", "smoke-build", 1) + if err != OK: + _finish(false, "queue_create() failed to start: %s" % error_string(err)) + return _finish(false, "%s failed: http=%d detail=%s" % [operation, http_code, detail])