From 6c015013eaa2c48b9120fa42b28b82e23375de7b Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Fri, 6 Dec 2024 06:04:49 +0800 Subject: [PATCH] PR(FORMAT): Fix some odd formatting --- .../doc_actor/add/with_manager_test.go | 33 ++++++++++--------- .../doc_actor/add/with_only_write_test.go | 11 ++++--- .../doc_actor/add/with_reader_test.go | 9 ++--- .../doc_actor/add/with_update_gql_test.go | 18 +++++----- .../doc_actor/add/with_update_test.go | 22 +++++++------ 5 files changed, 51 insertions(+), 42 deletions(-) diff --git a/tests/integration/acp/relationship/doc_actor/add/with_manager_test.go b/tests/integration/acp/relationship/doc_actor/add/with_manager_test.go index b50b74a04d..0b972acf8e 100644 --- a/tests/integration/acp/relationship/doc_actor/add/with_manager_test.go +++ b/tests/integration/acp/relationship/doc_actor/add/with_manager_test.go @@ -601,11 +601,12 @@ func TestACP_OwnerMakesAManagerThatGivesItSelfReadAndWriteAccess_ManagerCanReadA Description: "Test acp, owner makes a manager that gives itself read and write access", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ @@ -850,11 +851,12 @@ func TestACP_ManagerAddsRelationshipWithRelationItDoesNotManageAccordingToPolicy Description: "Test acp, manager adds relationship with relation it does not manage according to policy, error", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ @@ -1019,11 +1021,12 @@ func TestACP_OwnerMakesManagerButManagerCanNotPerformOperations_ManagerCantReadO Description: "Test acp, owner makes a manager, manager can't read or write", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ diff --git a/tests/integration/acp/relationship/doc_actor/add/with_only_write_test.go b/tests/integration/acp/relationship/doc_actor/add/with_only_write_test.go index 8a3eeabe24..dba024e1a4 100644 --- a/tests/integration/acp/relationship/doc_actor/add/with_only_write_test.go +++ b/tests/integration/acp/relationship/doc_actor/add/with_only_write_test.go @@ -26,11 +26,12 @@ func TestACP_OwnerGivesUpdateWriteAccessToAnotherActorWithoutExplicitReadPerm_Ot Description: "Test acp, owner gives write(update) access without explicit read permission, can still update", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ diff --git a/tests/integration/acp/relationship/doc_actor/add/with_reader_test.go b/tests/integration/acp/relationship/doc_actor/add/with_reader_test.go index fd452c2d7d..541b40977e 100644 --- a/tests/integration/acp/relationship/doc_actor/add/with_reader_test.go +++ b/tests/integration/acp/relationship/doc_actor/add/with_reader_test.go @@ -465,10 +465,11 @@ func TestACP_OwnerGivesOnlyReadAccessToAnotherActor_OtherActorCanReadButNotUpdat Description: "Test acp, owner gives read access to another actor, but the other actor can't update", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ diff --git a/tests/integration/acp/relationship/doc_actor/add/with_update_gql_test.go b/tests/integration/acp/relationship/doc_actor/add/with_update_gql_test.go index eff2be0f7d..6c17ee792b 100644 --- a/tests/integration/acp/relationship/doc_actor/add/with_update_gql_test.go +++ b/tests/integration/acp/relationship/doc_actor/add/with_update_gql_test.go @@ -26,10 +26,11 @@ func TestACP_OwnerGivesUpdateWriteAccessToAnotherActorTwice_GQL_ShowThatTheRelat Description: "Test acp, owner gives write(update) access to another actor twice, no-op", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used so test that separately. - testUtils.GQLRequestMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used so test that separately. + testUtils.GQLRequestMutationType, + }), Actions: []any{ testUtils.AddPolicy{ @@ -184,10 +185,11 @@ func TestACP_OwnerGivesUpdateWriteAccessToAnotherActor_GQL_OtherActorCanUpdate(t Description: "Test acp, owner gives write(update) access to another actor", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used so test that separately. - testUtils.GQLRequestMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used so test that separately. + testUtils.GQLRequestMutationType, + }), Actions: []any{ testUtils.AddPolicy{ diff --git a/tests/integration/acp/relationship/doc_actor/add/with_update_test.go b/tests/integration/acp/relationship/doc_actor/add/with_update_test.go index 6830c6a9c7..582f42af01 100644 --- a/tests/integration/acp/relationship/doc_actor/add/with_update_test.go +++ b/tests/integration/acp/relationship/doc_actor/add/with_update_test.go @@ -26,11 +26,12 @@ func TestACP_OwnerGivesUpdateWriteAccessToAnotherActorTwice_ShowThatTheRelations Description: "Test acp, owner gives write(update) access to another actor twice, no-op", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{ @@ -185,11 +186,12 @@ func TestACP_OwnerGivesUpdateWriteAccessToAnotherActor_OtherActorCanUpdate(t *te Description: "Test acp, owner gives write(update) access to another actor", - SupportedMutationTypes: immutable.Some([]testUtils.MutationType{ - // GQL mutation will return no error when wrong identity is used with gql (only for update requests), - testUtils.CollectionNamedMutationType, - testUtils.CollectionSaveMutationType, - }), + SupportedMutationTypes: immutable.Some( + []testUtils.MutationType{ + // GQL mutation will return no error when wrong identity is used with gql (only for update requests), + testUtils.CollectionNamedMutationType, + testUtils.CollectionSaveMutationType, + }), Actions: []any{ testUtils.AddPolicy{