Skip to content

Commit

Permalink
Merge branch 'Biometric-lock-concept' of github.com:bgoncal/HA-iOS in…
Browse files Browse the repository at this point in the history
…to Biometric-lock-concept
  • Loading branch information
bgoncal committed Dec 4, 2023
2 parents ce1f140 + 63c9c46 commit 8c656d3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
FASTLANE_SKIP_UPDATE_CHECK: true
FASTLANE_XCODE_LIST_TIMEOUT: 60
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
--lint --config .swiftformat .
test:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:

size:
if: ${{ github.event_name == 'pull_request' }}
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
FASTLANE_SKIP_UPDATE_CHECK: true
FASTLANE_XCODE_LIST_TIMEOUT: 60
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
Expand All @@ -16,7 +16,7 @@ env:

jobs:
build:
runs-on: macos-12
runs-on: macos-13
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/download_localized_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
update_strings:
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
Expand Down
14 changes: 7 additions & 7 deletions Tests/Shared/ServerManager.test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class ServerManagerTests: XCTestCase {

XCTAssertEqual(servers.all, [server1, server2])

try XCTAssertEqual(keychain.getData("fake1"), encoder.encode(server1.info))
try XCTAssertEqual(keychain.getData("fake2"), encoder.encode(server2.info))
try XCTAssertEqual(keychain.getData("fake1")?.count, encoder.encode(server1.info).count)
try XCTAssertEqual(keychain.getData("fake2")?.count, encoder.encode(server2.info).count)
XCTAssertEqual(keychain.data.count, 2)

let stateS1S2 = servers.restorableState()
Expand All @@ -127,7 +127,7 @@ class ServerManagerTests: XCTestCase {
server1.info.connection.webhookID = "webhook1_2"
}
XCTAssertEqual(server1.info.connection.webhookID, "webhook1_2")
try XCTAssertEqual(keychain.getData("fake1"), encoder.encode(server1.info))
try XCTAssertEqual(keychain.getData("fake1")?.count, encoder.encode(server1.info).count)

expectingObserver {
servers.remove(identifier: "fake1")
Expand Down Expand Up @@ -159,7 +159,7 @@ class ServerManagerTests: XCTestCase {
server3 = servers.add(identifier: "fake3", serverInfo: info3)
}
XCTAssertEqual(servers.all, [server2, server3])
try XCTAssertEqual(keychain.getData("fake3"), encoder.encode(server3.info))
try XCTAssertEqual(keychain.getData("fake3")?.count, encoder.encode(server3.info).count)
XCTAssertEqual(server3.info, with(info3) {
$0.sortOrder = 2000
})
Expand Down Expand Up @@ -205,7 +205,7 @@ class ServerManagerTests: XCTestCase {
}

XCTAssertEqual(servers.server(for: "fake2")?.info.connection.webhookID, "webhook2_2")
try XCTAssertEqual(keychain.getData("fake2"), encoder.encode(server2_afterRestore.info))
try XCTAssertEqual(keychain.getData("fake2")?.count, encoder.encode(server2_afterRestore.info).count)

let s2RestoreExpectation = expectation(description: "server2notify")
_ = server2_afterRestore.observe { info in
Expand Down Expand Up @@ -431,7 +431,7 @@ class ServerManagerTests: XCTestCase {
$0.remoteName = "new_name1"
}
servers.add(identifier: newServer1.identifier, serverInfo: newInfo)
XCTAssertEqual(keychain.data[newServer1.identifier.rawValue], try encoder.encode(newInfo))
XCTAssertEqual(keychain.data[newServer1.identifier.rawValue]?.count, try encoder.encode(newInfo).count)
}

func testUpdateAfterDeleteInAnotherProcessDoesntPersist() throws {
Expand All @@ -449,7 +449,7 @@ class ServerManagerTests: XCTestCase {
$0.remoteName = "new_name1"
}
servers.add(identifier: server1.identifier, serverInfo: newInfo)
XCTAssertEqual(keychain.data[server1.identifier.rawValue], try encoder.encode(newInfo))
XCTAssertEqual(keychain.data[server1.identifier.rawValue]?.count, try encoder.encode(newInfo).count)
}

func testThreadsafeChangesWithoutCaching() throws {
Expand Down

0 comments on commit 8c656d3

Please sign in to comment.