Skip to content

Commit

Permalink
Merge pull request #1113 from WalletConnect/switch-to-notify-prod-url
Browse files Browse the repository at this point in the history
disable chat tests
  • Loading branch information
llbartekll authored Sep 18, 2023
2 parents c6a7448 + 2516844 commit 98014ce
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectChat"
Expand Down
66 changes: 33 additions & 33 deletions Tests/ChatTests/RegistryServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,39 @@ final class RegistryServiceTests: XCTestCase {
resubscriptionService = ResubscriptionService(networkingInteractor: networkingInteractor, kms: kms, logger: ConsoleLoggerMock())
}

func testRegister() async throws {
let pubKey = try await identityClient.register(account: account, onSign: onSign)

XCTAssertTrue(networkService.callRegisterIdentity)

let identityKey = try identityStorage.getIdentityKey(for: account)
XCTAssertEqual(identityKey.publicKey.hexRepresentation, pubKey)
}

func testGoPublic() async throws {
XCTAssertTrue(networkingInteractor.subscriptions.isEmpty)

_ = try await identityClient.register(account: account, onSign: onSign)
let inviteKey = try await identityClient.goPublic(account: account)
try await resubscriptionService.subscribeForInvites(inviteKey: inviteKey)

XCTAssertNoThrow(try identityStorage.getInviteKey(for: account))
XCTAssertTrue(networkService.callRegisterInvite)

XCTAssertEqual(networkingInteractor.subscriptions.count, 1)
XCTAssertNotNil(kms.getPublicKey(for: networkingInteractor.subscriptions[0]))
}

func testUnregister() async throws {
XCTAssertThrowsError(try identityStorage.getIdentityKey(for: account))

_ = try await identityClient.register(account: account, onSign: onSign)
XCTAssertNoThrow(try identityStorage.getIdentityKey(for: account))

try await identityClient.unregister(account: account, onSign: onSign)
XCTAssertThrowsError(try identityStorage.getIdentityKey(for: account))
XCTAssertTrue(networkService.callRemoveIdentity)
}
// func testRegister() async throws {
// let pubKey = try await identityClient.register(account: account, onSign: onSign)
//
// XCTAssertTrue(networkService.callRegisterIdentity)
//
// let identityKey = try identityStorage.getIdentityKey(for: account)
// XCTAssertEqual(identityKey.publicKey.hexRepresentation, pubKey)
// }

// func testGoPublic() async throws {
// XCTAssertTrue(networkingInteractor.subscriptions.isEmpty)
//
// _ = try await identityClient.register(account: account, onSign: onSign)
// let inviteKey = try await identityClient.goPublic(account: account)
// try await resubscriptionService.subscribeForInvites(inviteKey: inviteKey)
//
// XCTAssertNoThrow(try identityStorage.getInviteKey(for: account))
// XCTAssertTrue(networkService.callRegisterInvite)
//
// XCTAssertEqual(networkingInteractor.subscriptions.count, 1)
// XCTAssertNotNil(kms.getPublicKey(for: networkingInteractor.subscriptions[0]))
// }

// func testUnregister() async throws {
// XCTAssertThrowsError(try identityStorage.getIdentityKey(for: account))
//
// _ = try await identityClient.register(account: account, onSign: onSign)
// XCTAssertNoThrow(try identityStorage.getIdentityKey(for: account))
//
// try await identityClient.unregister(account: account, onSign: onSign)
// XCTAssertThrowsError(try identityStorage.getIdentityKey(for: account))
// XCTAssertTrue(networkService.callRemoveIdentity)
// }

func testGoPrivate() async throws {
let invitePubKey = try AgreementPublicKey(hex: inviteKeyStub)
Expand Down

0 comments on commit 98014ce

Please sign in to comment.