From 6506d0fb8460c6c93c20cb078a811e32cab576aa Mon Sep 17 00:00:00 2001 From: Lewis Marshall Date: Tue, 23 Jul 2024 19:25:13 +0100 Subject: [PATCH] WIP test against the lmars-dev cluster Signed-off-by: Lewis Marshall --- .github/workflows/integration-test.yaml | 2 +- Test/Test Utilities/TestUtilities.swift | 2 +- Test/Tests/RestClientTests.swift | 4 ++-- Test/Tests/RestPaginatedTests.swift | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index bbe44efbc..655ca1249 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -31,7 +31,7 @@ jobs: env: LC_CTYPE: en_US.UTF-8 LANG: en_US.UTF-8 - ABLY_ENV: sandbox + ABLY_ENV: lmars-dev steps: - name: Check out repo diff --git a/Test/Test Utilities/TestUtilities.swift b/Test/Test Utilities/TestUtilities.swift index 09bb0ddac..900a1ed79 100644 --- a/Test/Test Utilities/TestUtilities.swift +++ b/Test/Test Utilities/TestUtilities.swift @@ -627,7 +627,7 @@ public func delay(_ seconds: TimeInterval, closure: @escaping () -> Void) { public func getEnvironment() -> String { let b = Bundle(for: AblyTests.self) guard let env = b.infoDictionary!["ABLY_ENV"] as? String, env.count > 0 else { - return "sandbox" + return "lmars-dev" } return env } diff --git a/Test/Tests/RestClientTests.swift b/Test/Tests/RestClientTests.swift index f941786dd..c6a942b36 100644 --- a/Test/Tests/RestClientTests.swift +++ b/Test/Tests/RestClientTests.swift @@ -1310,9 +1310,9 @@ class RestClientTests: XCTestCase { // RSC15i func test__066__RestClient__Host_Fallback__retry_hosts_in_random_order__environment_fallback_hosts_have_the_format__environment___a_e__fallback_ably_realtime_com() { - let environmentFallbackHosts = ARTDefault.fallbackHosts(withEnvironment: "sandbox") + let environmentFallbackHosts = ARTDefault.fallbackHosts(withEnvironment: "lmars-dev") environmentFallbackHosts.forEach { host in - expect(host).to(match("sandbox-[a-e]-fallback.ably-realtime.com")) + expect(host).to(match("lmars-dev-[a-e]-fallback.ably-realtime.com")) } XCTAssertEqual(environmentFallbackHosts.count, 5) } diff --git a/Test/Tests/RestPaginatedTests.swift b/Test/Tests/RestPaginatedTests.swift index 549a8e79c..a4940305d 100644 --- a/Test/Tests/RestPaginatedTests.swift +++ b/Test/Tests/RestPaginatedTests.swift @@ -4,7 +4,7 @@ import XCTest private let links = "<./messages?start=0&end=1535035746063&limit=100&direction=backwards&format=msgpack&firstEnd=1535035746063&fromDate=1535035746063&mode=all>; rel=\"first\", <./messages?start=0&end=1535035746063&limit=100&direction=backwards&format=msgpack&firstEnd=1535035746063&fromDate=1535035746063&mode=all>; rel=\"current\"" -private let url = URL(string: "https://sandbox-rest.ably.io:443/channels/foo/messages?limit=100&direction=backwards")! +private let url = URL(string: "https://lmars-dev-rest.ably.io:443/channels/foo/messages?limit=100&direction=backwards")! class RestPaginatedTests: XCTestCase { // XCTest invokes this method before executing the first test in the test suite. We use it to ensure that the global variables are initialized at the same moment, and in the same order, as they would have been when we used the Quick testing framework. @@ -44,6 +44,6 @@ class RestPaginatedTests: XCTestCase { fail("First link isn't a valid URL"); return } - XCTAssertEqual(firstRequest.url?.absoluteString, "https://sandbox-rest.ably.io:443/channels/foo/messages?start=0&end=1535035746063&limit=100&direction=backwards&format=msgpack&firstEnd=1535035746063&fromDate=1535035746063&mode=all") + XCTAssertEqual(firstRequest.url?.absoluteString, "https://lmars-dev-rest.ably.io:443/channels/foo/messages?start=0&end=1535035746063&limit=100&direction=backwards&format=msgpack&firstEnd=1535035746063&fromDate=1535035746063&mode=all") } }