Skip to content

Commit

Permalink
Add support for updating Atlas Device Sync's base url.
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaafanador3 committed Apr 26, 2024
1 parent 3a9586b commit df134d5
Show file tree
Hide file tree
Showing 6 changed files with 521 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ x.y.z Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* Added `SyncConfiguration.initialSubscriptions` which describes the initial subscription configuration that was passed when constructing the `SyncConfiguration`. ([#8548](https://github.com/realm/realm-swift/issues/8548))
* Added support for updating Atlas Device Sync's base url, in case the need to roam between servers (cloud and/or edge server). ([#8486](https://github.com/realm/realm-swift/issues/8486))

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
Expand Down
9 changes: 9 additions & 0 deletions Realm/ObjectServerTests/AsyncSyncTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ class AsyncAwaitSyncTests: SwiftSyncTestCase {
}
}

func testUpdateBaseUrl() async throws {
let app = App(id: appId)
XCTAssertNotNil(app.baseURL)
XCTAssertEqual(app.baseURL, "http://localhost:9090")

try await app.updateBaseUrl(to: "http://localhost:8080")
XCTAssertEqual(app.baseURL, "http://localhost:8080")
}

@MainActor func testAsyncOpenStandalone() async throws {
try autoreleasepool {
let configuration = Realm.Configuration(objectTypes: [SwiftPerson.self])
Expand Down

0 comments on commit df134d5

Please sign in to comment.