From f718edfdd609706097998cf8c19a8b0e6ddbd359 Mon Sep 17 00:00:00 2001 From: Lewis Marshall Date: Sun, 4 Aug 2024 23:58:00 +0100 Subject: [PATCH] WIP test against the lmars-dev cluster Signed-off-by: Lewis Marshall --- tests/AblyRestTest.php | 4 ++-- tests/ClientOptionsTest.php | 6 +++--- tests/DefaultsTest.php | 12 ++++++------ tests/factories/TestApp.php | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/AblyRestTest.php b/tests/AblyRestTest.php index 704fab7..f39bd18 100644 --- a/tests/AblyRestTest.php +++ b/tests/AblyRestTest.php @@ -129,11 +129,11 @@ public function testInitLibWithSpecifiedPort() { public function testInitLibWithSpecifiedEnv() { $ably = new AblyRest( [ 'key' => 'fake.key:veryFake', - 'environment' => 'sandbox', + 'environment' => 'lmars-dev', 'httpClass' => 'tests\HttpMockInitTest', ] ); $ably->time(); // make a request - $this->assertEquals( 'https://sandbox-rest.ably.io:443/time', $ably->http->lastUrl, 'Unexpected host mismatch' ); + $this->assertEquals( 'https://lmars-dev-rest.ably.io:443/time', $ably->http->lastUrl, 'Unexpected host mismatch' ); } /** diff --git a/tests/ClientOptionsTest.php b/tests/ClientOptionsTest.php index f56528e..27b4c6a 100644 --- a/tests/ClientOptionsTest.php +++ b/tests/ClientOptionsTest.php @@ -40,13 +40,13 @@ public function testWithProductionEnvironment() { */ public function testWithCustomEnvironment() { $clientOptions = new ClientOptions(); - $clientOptions->environment = "sandbox"; - self::assertEquals('sandbox-rest.ably.io', $clientOptions->getPrimaryRestHost()); + $clientOptions->environment = "lmars-dev"; + self::assertEquals('lmars-dev-rest.ably.io', $clientOptions->getPrimaryRestHost()); self::assertTrue($clientOptions->tls); self::assertEquals(443, $clientOptions->tlsPort); $fallbackHosts = $clientOptions->getFallbackHosts(); sort($fallbackHosts); - $this->assertEquals(Defaults::getEnvironmentFallbackHosts('sandbox'), $fallbackHosts); + $this->assertEquals(Defaults::getEnvironmentFallbackHosts('lmars-dev'), $fallbackHosts); } /** diff --git a/tests/DefaultsTest.php b/tests/DefaultsTest.php index 9923023..e6144cf 100644 --- a/tests/DefaultsTest.php +++ b/tests/DefaultsTest.php @@ -25,13 +25,13 @@ public function testFallbackHosts() { */ public function testEnvironmentFallbackHosts() { $expectedFallbackHosts = [ - "sandbox-a-fallback.ably-realtime.com", - "sandbox-b-fallback.ably-realtime.com", - "sandbox-c-fallback.ably-realtime.com", - "sandbox-d-fallback.ably-realtime.com", - "sandbox-e-fallback.ably-realtime.com" + "lmars-dev-a-fallback.ably-realtime.com", + "lmars-dev-b-fallback.ably-realtime.com", + "lmars-dev-c-fallback.ably-realtime.com", + "lmars-dev-d-fallback.ably-realtime.com", + "lmars-dev-e-fallback.ably-realtime.com" ]; - $fallbackHosts = Defaults::getEnvironmentFallbackHosts("sandbox"); + $fallbackHosts = Defaults::getEnvironmentFallbackHosts("lmars-dev"); $this->assertEquals($expectedFallbackHosts, $fallbackHosts); } } diff --git a/tests/factories/TestApp.php b/tests/factories/TestApp.php index 895835a..9b3be4c 100644 --- a/tests/factories/TestApp.php +++ b/tests/factories/TestApp.php @@ -25,7 +25,7 @@ public function __construct() { $settings = []; - $settings['environment'] = getenv( 'ABLY_ENV' ) ? : 'sandbox'; + $settings['environment'] = getenv( 'ABLY_ENV' ) ? : 'lmars-dev'; $settings['useBinaryProtocol'] = getenv('PROTOCOL') !== 'json'; //$settings['logLevel'] = Log::DEBUG;