Skip to content

Commit

Permalink
WIP test against the lmars-dev cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Lewis Marshall <lewis.marshall@ably.com>
  • Loading branch information
lmars committed Aug 4, 2024
1 parent bf6b9a2 commit 95fd141
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions test/ably/rest/restinit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def test_rest_host_and_environment(self):
assert "rest.ably.io" == host, "Unexpected host mismatch %s" % host

# environment: other
ably = AblyRest(token='foo', environment="sandbox")
ably = AblyRest(token='foo', environment="lmars-dev")
host = ably.options.get_rest_host()
assert "sandbox-rest.ably.io" == host, "Unexpected host mismatch %s" % host
assert "lmars-dev-rest.ably.io" == host, "Unexpected host mismatch %s" % host

# both, as per #TO3k2
with pytest.raises(ValueError):
Expand All @@ -103,8 +103,8 @@ def test_fallback_hosts(self):
assert sorted(aux) == sorted(ably.options.get_fallback_rest_hosts())

# Specify environment (RSC15g2)
ably = AblyRest(token='foo', environment='sandbox', http_max_retry_count=10)
assert sorted(Defaults.get_environment_fallback_hosts('sandbox')) == sorted(
ably = AblyRest(token='foo', environment='lmars-dev', http_max_retry_count=10)
assert sorted(Defaults.get_environment_fallback_hosts('lmars-dev')) == sorted(
ably.options.get_fallback_rest_hosts())

# Fallback hosts and environment not specified (RSC15g3)
Expand Down
4 changes: 2 additions & 2 deletions test/ably/rest/restrequest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ async def test_timeout(self):
await ably.request('GET', '/time', version=Defaults.protocol_version)
await ably.close()

default_endpoint = 'https://sandbox-rest.ably.io/time'
fallback_host = 'sandbox-a-fallback.ably-realtime.com'
default_endpoint = 'https://lmars-dev-rest.ably.io/time'
fallback_host = 'lmars-dev-a-fallback.ably-realtime.com'
fallback_endpoint = f'https://{fallback_host}/time'
ably = await TestApp.get_ably_rest(fallback_hosts=[fallback_host])
with respx.mock:
Expand Down
6 changes: 3 additions & 3 deletions test/ably/testapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
app_spec_local = json.loads(f.read())

tls = (os.environ.get('ABLY_TLS') or "true").lower() == "true"
rest_host = os.environ.get('ABLY_REST_HOST', 'sandbox-rest.ably.io')
realtime_host = os.environ.get('ABLY_REALTIME_HOST', 'sandbox-realtime.ably.io')
rest_host = os.environ.get('ABLY_REST_HOST', 'lmars-dev-rest.ably.io')
realtime_host = os.environ.get('ABLY_REALTIME_HOST', 'lmars-dev-realtime.ably.io')

environment = os.environ.get('ABLY_ENV', 'sandbox')
environment = os.environ.get('ABLY_ENV', 'lmars-dev')

port = 80
tls_port = 443
Expand Down

0 comments on commit 95fd141

Please sign in to comment.