Summary: - Sources: Configuration, Helpers, Models, Services - Tests: AppGroupTests.swift, FileStorageHelperExpansionTests.swift, FileStorageHelperTests.swift, MigrationTests.swift, RouterConfigurationTests.swift (+5 more) - Added symbols: func resolveDirectoryURL, func handleReceivedContext, enum KeychainAccessControl, enum KeychainAccessibility, enum SecurityPolicy, enum EncryptionPolicy (+5 more) - Removed symbols: func resolveDirectoryURL, func handleReceivedContext, enum KeychainAccessControl, enum KeychainAccessibility, enum SecurityPolicy, enum EncryptionPolicy (+1 more) Stats: - 18 files changed, 306 insertions(+), 58 deletions(-)
24 lines
836 B
Swift
24 lines
836 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import LocalData
|
|
|
|
@Suite struct RouterConfigurationTests {
|
|
private let router = StorageRouter(keychain: MockKeychainHelper())
|
|
|
|
@Test func updateConfigurations() async {
|
|
// Exercise the configuration update paths in StorageRouter
|
|
await router.updateStorageConfiguration(.default)
|
|
await router.updateEncryptionConfiguration(.default)
|
|
await router.updateSyncConfiguration(.default)
|
|
}
|
|
|
|
@Test func registerKeyMaterialProvider() async throws {
|
|
struct Provider: KeyMaterialProviding {
|
|
func keyMaterial(for keyName: String) async throws -> Data { Data() }
|
|
}
|
|
|
|
// Exercise registration path
|
|
await router.registerKeyMaterialProvider(Provider(), for: KeyMaterialSource(id: "test.source"))
|
|
}
|
|
}
|