diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift index cec7e1c3e9..0ad5807f7e 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift @@ -33,17 +33,17 @@ public extension ModelCompositePkWithAssociation { ) model.fields( - .field(modelCompositePkWithAssociation.id, is: .required, ofType: .string), - .field(modelCompositePkWithAssociation.dob, is: .required, ofType: .dateTime), - .field(modelCompositePkWithAssociation.name, is: .optional, ofType: .string), - .hasMany( - modelCompositePkWithAssociation.otherModels, - is: .optional, - ofType: ModelCompositePkBelongsTo.self, - associatedWith: ModelCompositePkBelongsTo.keys.owner - ), - .field(modelCompositePkWithAssociation.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), - .field(modelCompositePkWithAssociation.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) + .field(modelCompositePkWithAssociation.id, is: .required, ofType: .string), + .field(modelCompositePkWithAssociation.dob, is: .required, ofType: .dateTime), + .field(modelCompositePkWithAssociation.name, is: .optional, ofType: .string), + .hasMany( + modelCompositePkWithAssociation.otherModels, + is: .optional, + ofType: ModelCompositePkBelongsTo.self, + associatedWith: ModelCompositePkBelongsTo.keys.owner + ), + .field(modelCompositePkWithAssociation.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), + .field(modelCompositePkWithAssociation.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) } } diff --git a/AmplifyTestCommon/Models/Record+Schema.swift b/AmplifyTestCommon/Models/Record+Schema.swift index 4f8fbd5ef9..5d014387bf 100644 --- a/AmplifyTestCommon/Models/Record+Schema.swift +++ b/AmplifyTestCommon/Models/Record+Schema.swift @@ -32,20 +32,20 @@ public extension Record { model.listPluralName = "Records" model.fields( - .id(), - .field(record.name, is: .required, ofType: .string), - .field(record.description, is: .optional, ofType: .string), - .field(record.coverId, is: .optional, isReadOnly: true, ofType: .string), - .hasOne( - record.cover, - is: .optional, - isReadOnly: true, - ofType: RecordCover.self, - associatedWith: RecordCover.keys.id, - targetName: "coverId" - ), - .field(record.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), - .field(record.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) + .id(), + .field(record.name, is: .required, ofType: .string), + .field(record.description, is: .optional, ofType: .string), + .field(record.coverId, is: .optional, isReadOnly: true, ofType: .string), + .hasOne( + record.cover, + is: .optional, + isReadOnly: true, + ofType: RecordCover.self, + associatedWith: RecordCover.keys.id, + targetName: "coverId" + ), + .field(record.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), + .field(record.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) } } diff --git a/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginTests.swift b/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginTests.swift index 5b2a53a14f..a51c295597 100644 --- a/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginTests.swift +++ b/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginTests.swift @@ -14,8 +14,7 @@ class DefaultHubPluginTests: XCTestCase { var plugin: HubCategoryPlugin { guard let plugin = try? Amplify.Hub.getPlugin(for: "awsHubPlugin"), - plugin.key == "awsHubPlugin" - else { + plugin.key == "awsHubPlugin" else { fatalError("Could not access AWSHubPlugin") } return plugin @@ -126,8 +125,7 @@ class DefaultHubPluginTests: XCTestCase { with: unsubscribeToken, plugin: plugin, timeout: 0.5 - ) - else { + ) else { XCTFail("Token with \(unsubscribeToken.id) was not registered") return }