Prepare supporter v0.20.4-alpha discovery
This commit is contained in:
parent
39f4e878b1
commit
fcbd1e830b
6 changed files with 16 additions and 16 deletions
|
|
@ -21,8 +21,8 @@ VALID_ROOM = {
|
|||
"port": 7777,
|
||||
"current_players": 1,
|
||||
"max_players": 8,
|
||||
"game_version": "0.20.3-alpha",
|
||||
"protocol_version": 12,
|
||||
"game_version": "0.20.4-alpha",
|
||||
"protocol_version": 13,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
self.assertIsInstance(room_id, str)
|
||||
self.assertIsInstance(token, str)
|
||||
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=12")
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=13")
|
||||
self.assertEqual(status, 200)
|
||||
assert listing is not None
|
||||
listed_rooms = listing["rooms"]
|
||||
|
|
@ -109,7 +109,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
assert updated is not None
|
||||
self.assertEqual(updated["error"]["code"], "game_version_mismatch")
|
||||
self.assertEqual(
|
||||
updated["error"]["required_game_version"], "0.20.3-alpha"
|
||||
updated["error"]["required_game_version"], "0.20.4-alpha"
|
||||
)
|
||||
|
||||
status, updated = self.request(
|
||||
|
|
@ -142,7 +142,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
error = body["error"]
|
||||
assert isinstance(error, dict)
|
||||
self.assertEqual(error["code"], "game_version_mismatch")
|
||||
self.assertEqual(error["required_game_version"], "0.20.3-alpha")
|
||||
self.assertEqual(error["required_game_version"], "0.20.4-alpha")
|
||||
self.assertIn("will not be listed", str(error["message"]))
|
||||
|
||||
def test_empty_dedicated_room_can_be_listed(self) -> None:
|
||||
|
|
@ -217,7 +217,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
self.assertEqual(status, 200)
|
||||
assert body is not None
|
||||
self.assertEqual(body["status"], "ok")
|
||||
self.assertEqual(body["version"], "0.20.3-alpha")
|
||||
self.assertEqual(body["version"], "0.20.4-alpha")
|
||||
self.assertEqual(body["build_revision"], "test-build")
|
||||
|
||||
def test_live_friend_presence_and_invitation_endpoints(self) -> None:
|
||||
|
|
@ -412,7 +412,7 @@ class RelayDiscoveryHTTPTests(unittest.TestCase):
|
|||
45678,
|
||||
)
|
||||
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=12")
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=13")
|
||||
self.assertEqual(status, 200)
|
||||
assert listing is not None
|
||||
listed_room = next(
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ VALID_ROOM = {
|
|||
"port": 7777,
|
||||
"current_players": 1,
|
||||
"max_players": 8,
|
||||
"game_version": "0.20.3-alpha",
|
||||
"protocol_version": 12,
|
||||
"game_version": "0.20.4-alpha",
|
||||
"protocol_version": 13,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ class RoomRegistryTests(unittest.TestCase):
|
|||
"203.0.113.11",
|
||||
dict(VALID_ROOM, room_name="Older Room", protocol_version=3),
|
||||
)
|
||||
self.assertEqual(self.registry.list_rooms(protocol_version=12), [expected])
|
||||
self.assertEqual(self.registry.list_rooms(protocol_version=13), [expected])
|
||||
self.assertEqual(self.registry.list_rooms(game_version="missing"), [])
|
||||
|
||||
def test_room_limits_bound_untrusted_advertisements(self) -> None:
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ from straywild_discovery.social_registry import (
|
|||
)
|
||||
|
||||
|
||||
GAME_VERSION = "0.20.3-alpha"
|
||||
PROTOCOL_VERSION = 12
|
||||
GAME_VERSION = "0.20.4-alpha"
|
||||
PROTOCOL_VERSION = 13
|
||||
VALID_ROOM = {
|
||||
"room_name": "Pond Friends",
|
||||
"port": 7777,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue