Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ class AuthModeStrategyTests: XCTestCase {

/// Model with two auth rules
private struct ModelWithOwnerAndPublicAuth: Model {
public let id: String
let id: String

public enum CodingKeys: String, ModelKey {
enum CodingKeys: String, ModelKey {
case id
}
public static let keys = CodingKeys.self
static let keys = CodingKeys.self

public static let schema = defineSchema { model in
static let schema = defineSchema { model in
model.authRules = [
rule(allow: .owner, provider: .userPools, operations: [.create, .read, .update, .delete]),
rule(allow: .public, provider: .apiKey, operations: [.create, .read, .update, .delete])
Expand All @@ -176,14 +176,14 @@ private struct ModelWithOwnerAndPublicAuth: Model {

/// Model with multiple auth rules with equal strategy
private struct ModelWithMultiplePublicRules: Model {
public let id: String
let id: String

public enum CodingKeys: String, ModelKey {
enum CodingKeys: String, ModelKey {
case id
}
public static let keys = CodingKeys.self
static let keys = CodingKeys.self

public static let schema = defineSchema { model in
static let schema = defineSchema { model in
model.authRules = [
rule(allow: .public, provider: .iam, operations: [.create, .read, .update, .delete]),
rule(allow: .public, provider: .apiKey, operations: [.create, .read, .update, .delete]),
Expand All @@ -195,14 +195,14 @@ private struct ModelWithMultiplePublicRules: Model {

/// Model with two auth rules but no auth provider
private struct ModelNoProvider: Model {
public let id: String
let id: String

public enum CodingKeys: String, ModelKey {
enum CodingKeys: String, ModelKey {
case id
}
public static let keys = CodingKeys.self
static let keys = CodingKeys.self

public static let schema = defineSchema { model in
static let schema = defineSchema { model in
model.authRules = [
rule(allow: .owner, operations: [.create, .read, .update, .delete]),
rule(allow: .public, operations: [.read])
Expand All @@ -212,14 +212,14 @@ private struct ModelNoProvider: Model {

/// Model with multiple auth rules but no auth provider
private struct ModelAllStrategies: Model {
public let id: String
let id: String

public enum CodingKeys: String, ModelKey {
enum CodingKeys: String, ModelKey {
case id
}
public static let keys = CodingKeys.self
static let keys = CodingKeys.self

public static let schema = defineSchema { model in
static let schema = defineSchema { model in
model.authRules = [
rule(allow: .owner, provider: .userPools, operations: [.create, .read, .update, .delete]),
rule(allow: .public, provider: .iam, operations: [.read]),
Expand All @@ -231,14 +231,14 @@ private struct ModelAllStrategies: Model {

/// Model with custom auth rule
private struct ModelWithCustomStrategy: Model {
public let id: String
let id: String

public enum CodingKeys: String, ModelKey {
enum CodingKeys: String, ModelKey {
case id
}
public static let keys = CodingKeys.self
static let keys = CodingKeys.self

public static let schema = defineSchema { model in
static let schema = defineSchema { model in
model.authRules = [
rule(allow: .public, provider: .iam, operations: [.create, .read, .update, .delete]),
rule(allow: .custom, provider: .function, operations: [.create, .read, .update, .delete]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ extension AWSDataStoreCategoryPluginAuthIntegrationTests {
private struct ModelsRegistration: AmplifyModelRegistration {
var version: String = "version"

public func registerModels(registry: ModelRegistry.Type) {
func registerModels(registry: ModelRegistry.Type) {
ModelRegistry.register(modelType: TodoExplicitOwnerField.self)
ModelRegistry.register(modelType: TodoImplicitOwnerField.self)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Post16.self)
}

public let version: String = "test"
let version: String = "test"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Post17.self)
}

public let version: String = "test"
let version: String = "test"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Post18.self)
}

public let version: String = "test"
let version: String = "test"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Post19.self)
}

public let version: String = "test"
let version: String = "test"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Post20.self)
}

public let version: String = "test"
let version: String = "test"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private struct TestModels: AmplifyModelRegistration {
ModelRegistry.register(modelType: Comment9.self)
}

public let version: String = "test"
let version: String = "test"
}

class AWSDataStoreCompositeSortKeyIdentifierTest: XCTestCase {
Expand Down
Loading