From 9464cecb6b9de979276d2e6db7b476d2f592ddab Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Sun, 8 Feb 2026 19:43:23 -0600 Subject: [PATCH] Allow metadatabase to be attached in tests. --- Sources/SQLiteData/CloudKit/SyncEngine.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SQLiteData/CloudKit/SyncEngine.swift b/Sources/SQLiteData/CloudKit/SyncEngine.swift index ccaab9cc..92c27ffb 100644 --- a/Sources/SQLiteData/CloudKit/SyncEngine.swift +++ b/Sources/SQLiteData/CloudKit/SyncEngine.swift @@ -106,7 +106,7 @@ let containerIdentifier = containerIdentifier ?? ModelConfiguration(groupContainer: .automatic).cloudKitContainerIdentifier - ?? (context == .preview ? "preview" : nil) + ?? (context != .live ? "container" : nil) var allTables: [any SynchronizableTable] = [] var allPrivateTables: [any SynchronizableTable] = [] for table in repeat each tables { @@ -2212,7 +2212,7 @@ let containerIdentifier = containerIdentifier ?? ModelConfiguration(groupContainer: .automatic).cloudKitContainerIdentifier - ?? (context == .preview ? "preview" : nil) + ?? (context != .live ? "container" : nil) guard let containerIdentifier else { throw SyncEngine.SchemaError.noCloudKitContainer