Rebrand discovery service as straywild
This commit is contained in:
parent
e20d8e0553
commit
de454ff48a
18 changed files with 95 additions and 95 deletions
|
|
@ -7,8 +7,8 @@ import socketserver
|
|||
import threading
|
||||
import unittest
|
||||
|
||||
from netfishing_discovery.registry import RoomRegistry
|
||||
from netfishing_discovery.server import (
|
||||
from straywild_discovery.registry import RoomRegistry
|
||||
from straywild_discovery.server import (
|
||||
DiscoveryHTTPServer,
|
||||
ServerConfig,
|
||||
TraversalUDPServer,
|
||||
|
|
@ -21,7 +21,7 @@ VALID_ROOM = {
|
|||
"current_players": 1,
|
||||
"max_players": 8,
|
||||
"game_version": "0.18.1-alpha",
|
||||
"protocol_version": 10,
|
||||
"protocol_version": 11,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
self.assertIsInstance(room_id, str)
|
||||
self.assertIsInstance(token, str)
|
||||
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=10")
|
||||
status, listing = self.request("GET", "/v1/rooms?protocol_version=11")
|
||||
self.assertEqual(status, 200)
|
||||
assert listing is not None
|
||||
listed_rooms = listing["rooms"]
|
||||
|
|
@ -264,7 +264,7 @@ class DiscoveryHTTPTests(unittest.TestCase):
|
|||
|
||||
write_token = "d" * 64
|
||||
channel = hashlib.sha256(
|
||||
f"NETFISHING_PRESENCE_V1:{write_token}".encode()
|
||||
f"straywild_PRESENCE_V1:{write_token}".encode()
|
||||
).hexdigest()
|
||||
status, _published = self.request(
|
||||
"POST",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import unittest
|
||||
|
||||
from netfishing_discovery.registry import (
|
||||
from straywild_discovery.registry import (
|
||||
LeaseAuthorizationError,
|
||||
RoomLimitError,
|
||||
RoomNotFoundError,
|
||||
|
|
@ -17,7 +17,7 @@ VALID_ROOM = {
|
|||
"current_players": 1,
|
||||
"max_players": 8,
|
||||
"game_version": "0.18.1-alpha",
|
||||
"protocol_version": 10,
|
||||
"protocol_version": 11,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -112,7 +112,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=10), [expected])
|
||||
self.assertEqual(self.registry.list_rooms(protocol_version=11), [expected])
|
||||
self.assertEqual(self.registry.list_rooms(game_version="missing"), [])
|
||||
|
||||
def test_room_limits_bound_untrusted_advertisements(self) -> None:
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ from __future__ import annotations
|
|||
import hashlib
|
||||
import unittest
|
||||
|
||||
from netfishing_discovery.registry import RoomRegistry, ValidationError
|
||||
from netfishing_discovery.social_registry import (
|
||||
from straywild_discovery.registry import RoomRegistry, ValidationError
|
||||
from straywild_discovery.social_registry import (
|
||||
FriendOfflineError,
|
||||
INBOX_REACHABLE_SECONDS,
|
||||
PRESENCE_TTL_SECONDS,
|
||||
|
|
@ -13,7 +13,7 @@ from netfishing_discovery.social_registry import (
|
|||
|
||||
|
||||
GAME_VERSION = "0.18.1-alpha"
|
||||
PROTOCOL_VERSION = 10
|
||||
PROTOCOL_VERSION = 11
|
||||
VALID_ROOM = {
|
||||
"room_name": "Pond Friends",
|
||||
"port": 7777,
|
||||
|
|
@ -50,7 +50,7 @@ class SocialRegistryTests(unittest.TestCase):
|
|||
|
||||
def test_presence_is_capability_addressed_and_expires(self) -> None:
|
||||
write_token = "a" * 64
|
||||
channel = capability_id("NETFISHING_PRESENCE_V1:", write_token)
|
||||
channel = capability_id("straywild_PRESENCE_V1:", write_token)
|
||||
self.social.publish_presence(
|
||||
"203.0.113.10",
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue