Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP test against the lmars-dev cluster #203

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/AblyRestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/ClientOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions tests/DefaultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/factories/TestApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading