From a2698cfcbc0b26dd32e77ff19f4fc8358eb91225 Mon Sep 17 00:00:00 2001 From: SeaBlooms Date: Wed, 15 May 2024 10:55:22 -0600 Subject: [PATCH 1/4] adding alias fields to props --- src/steps/groups/converters.test.ts | 2 +- src/steps/groups/converters.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/steps/groups/converters.test.ts b/src/steps/groups/converters.test.ts index 1f008a8..eb27baa 100644 --- a/src/steps/groups/converters.test.ts +++ b/src/steps/groups/converters.test.ts @@ -23,7 +23,7 @@ function getMockGroup( directMembersCount: '5', description: 'randomdistro@jupiterone.io distribution list', adminCreated: true, - aliases: ['randomdistro@jupiterone.com'], + aliases: ['randomdistro@jupiterone.com', 'randomdistro@jptr.one'], nonEditableAliases: ['randomdistro@jupiterone.io.test-google-a.com'], ...partial, }; diff --git a/src/steps/groups/converters.ts b/src/steps/groups/converters.ts index 50494e9..17c0d3b 100644 --- a/src/steps/groups/converters.ts +++ b/src/steps/groups/converters.ts @@ -38,6 +38,8 @@ export function createGroupEntity(data: admin_directory_v1.Schema$Group) { kind: data.kind, name: data.name, description: data.description, + nonEditableAliases: data.nonEditableAliases, + aliases: data.aliases }, }, }); From 4950c59d5ded981aff3e17fe0a2ef5270ad4cb25 Mon Sep 17 00:00:00 2001 From: SeaBlooms Date: Wed, 15 May 2024 10:56:23 -0600 Subject: [PATCH 2/4] Update converters.ts --- src/steps/groups/converters.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/steps/groups/converters.ts b/src/steps/groups/converters.ts index 17c0d3b..6471d35 100644 --- a/src/steps/groups/converters.ts +++ b/src/steps/groups/converters.ts @@ -38,8 +38,8 @@ export function createGroupEntity(data: admin_directory_v1.Schema$Group) { kind: data.kind, name: data.name, description: data.description, - nonEditableAliases: data.nonEditableAliases, - aliases: data.aliases + aliases: data.aliases, + nonEditableAliases: data.nonEditableAliases }, }, }); From 0d98476262d8ed8e7619f459ed945059a79f875f Mon Sep 17 00:00:00 2001 From: Matthew Zember Date: Wed, 15 May 2024 13:36:47 -0400 Subject: [PATCH 3/4] format code --- src/steps/groups/converters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/groups/converters.ts b/src/steps/groups/converters.ts index 6471d35..8f18db8 100644 --- a/src/steps/groups/converters.ts +++ b/src/steps/groups/converters.ts @@ -39,7 +39,7 @@ export function createGroupEntity(data: admin_directory_v1.Schema$Group) { name: data.name, description: data.description, aliases: data.aliases, - nonEditableAliases: data.nonEditableAliases + nonEditableAliases: data.nonEditableAliases, }, }, }); From 6cdacd6b762f16c13a8948e890fb43f826faec70 Mon Sep 17 00:00:00 2001 From: Matthew Zember Date: Wed, 15 May 2024 13:37:46 -0400 Subject: [PATCH 4/4] update tests --- .../groups/__snapshots__/converters.test.ts.snap | 8 ++++++++ src/steps/groups/__snapshots__/index.test.ts.snap | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/steps/groups/__snapshots__/converters.test.ts.snap b/src/steps/groups/__snapshots__/converters.test.ts.snap index 2f1dee5..7985262 100644 --- a/src/steps/groups/__snapshots__/converters.test.ts.snap +++ b/src/steps/groups/__snapshots__/converters.test.ts.snap @@ -13,6 +13,7 @@ Object { "adminCreated": true, "aliases": Array [ "randomdistro@jupiterone.com", + "randomdistro@jptr.one", ], "description": "randomdistro@jupiterone.io distribution list", "directMembersCount": "5", @@ -29,6 +30,10 @@ Object { ], "_type": "google_group", "adminCreated": true, + "aliases": Array [ + "randomdistro@jupiterone.com", + "randomdistro@jptr.one", + ], "createdOn": undefined, "description": "randomdistro@jupiterone.io distribution list", "directMembersCount": "5", @@ -37,6 +42,9 @@ Object { "id": "0184mhaj0imamcg", "kind": "admin#directory#group", "name": "Random", + "nonEditableAliases": Array [ + "randomdistro@jupiterone.io.test-google-a.com", + ], } `; diff --git a/src/steps/groups/__snapshots__/index.test.ts.snap b/src/steps/groups/__snapshots__/index.test.ts.snap index 43b4dae..8bc7f53 100644 --- a/src/steps/groups/__snapshots__/index.test.ts.snap +++ b/src/steps/groups/__snapshots__/index.test.ts.snap @@ -663,6 +663,7 @@ Object { ], "_type": "google_group", "adminCreated": true, + "aliases": undefined, "createdOn": undefined, "description": "Developers on JupiterOne integrations team", "directMembersCount": "3", @@ -671,6 +672,9 @@ Object { "id": "023ckvvd4kecvcb", "kind": "admin#directory#group", "name": "Integration Developers", + "nonEditableAliases": Array [ + "integrations@jupiterone.dev.test-google-a.com", + ], }, Object { "_class": Array [ @@ -697,6 +701,7 @@ Object { ], "_type": "google_group", "adminCreated": true, + "aliases": undefined, "createdOn": undefined, "description": "", "directMembersCount": "0", @@ -705,6 +710,9 @@ Object { "id": "00sqyw643dnjpsf", "kind": "admin#directory#group", "name": "OverlappingEmailTest1", + "nonEditableAliases": Array [ + "overlappingemailtest@jupiterone.dev.test-google-a.com", + ], }, Object { "_class": Array [ @@ -731,6 +739,7 @@ Object { ], "_type": "google_group", "adminCreated": true, + "aliases": undefined, "createdOn": undefined, "description": "Test additional group", "directMembersCount": "1", @@ -739,6 +748,9 @@ Object { "id": "03cqmetx36hgkxw", "kind": "admin#directory#group", "name": "TestExtraGroup", + "nonEditableAliases": Array [ + "testgroup@jupiterone.dev.test-google-a.com", + ], }, Object { "_class": Array [