Hardcode the sliding sync proxy. (#502)

* Add support for migrating between versions.
* Rename InfoPlistReader property.
* Bump SDK version.
This commit is contained in:
Doug
2023-01-31 17:48:24 +00:00
committed by GitHub
parent 4f8cc08989
commit f6629e0d6e
31 changed files with 143 additions and 99 deletions
@@ -22,7 +22,7 @@ class KeychainControllerTests: XCTestCase {
override func setUp() {
keychain = KeychainController(service: .tests,
accessGroup: InfoPlistReader.target.keychainAccessGroupIdentifier)
accessGroup: InfoPlistReader.main.keychainAccessGroupIdentifier)
keychain.removeAllRestorationTokens()
}
@@ -60,7 +60,7 @@ final class NotificationManagerTests: XCTestCase {
XCTAssertEqual(clientProxy.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxy.setPusherKind, .http)
XCTAssertEqual(clientProxy.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxy.setPusherAppDisplayName, "\(InfoPlistReader.target.bundleDisplayName) (iOS)")
XCTAssertEqual(clientProxy.setPusherAppDisplayName, "\(InfoPlistReader.main.bundleDisplayName) (iOS)")
XCTAssertEqual(clientProxy.setPusherDeviceDisplayName, UIDevice.current.name)
XCTAssertNotNil(clientProxy.setPusherProfileTag)
XCTAssertEqual(clientProxy.setPusherLang, Bundle.preferredLanguages.first)
@@ -25,11 +25,11 @@ class UserAgentBuilderTests: XCTestCase {
func testContainsClientName() {
let userAgent = UserAgentBuilder.makeASCIIUserAgent()
XCTAssert(userAgent?.contains(InfoPlistReader.target.bundleDisplayName) == true, "\(userAgent ?? "nil") does not contain client name")
XCTAssert(userAgent?.contains(InfoPlistReader.main.bundleDisplayName) == true, "\(userAgent ?? "nil") does not contain client name")
}
func testContainsClientVersion() {
let userAgent = UserAgentBuilder.makeASCIIUserAgent()
XCTAssert(userAgent?.contains(InfoPlistReader.target.bundleShortVersionString) == true, "\(userAgent ?? "nil") does not contain client version")
XCTAssert(userAgent?.contains(InfoPlistReader.main.bundleShortVersionString) == true, "\(userAgent ?? "nil") does not contain client version")
}
}