From 4e375229f78f598816858a8b40caf72cd512dde4 Mon Sep 17 00:00:00 2001 From: frederikprijck Date: Thu, 31 Aug 2023 15:26:16 +0200 Subject: [PATCH] Ensure e2e tests run against a live tenant --- src/tools/auth0/handlers/emailProvider.ts | 8 +++----- test/e2e/testdata/empty-tenant/tenant.yaml | 1 - test/e2e/testdata/lots-of-configuration/tenant.yaml | 1 - .../should-deploy-without-throwing-an-error/tenant.yaml | 1 - 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/tools/auth0/handlers/emailProvider.ts b/src/tools/auth0/handlers/emailProvider.ts index 8a5a6c028..2af52aa5f 100644 --- a/src/tools/auth0/handlers/emailProvider.ts +++ b/src/tools/auth0/handlers/emailProvider.ts @@ -1,5 +1,6 @@ import DefaultHandler from './default'; import { Asset, Assets } from '../../../types'; +import { PostProviderRequest } from 'auth0'; export const schema = { type: 'object' }; @@ -54,14 +55,11 @@ export default class EmailProviderHandler extends DefaultHandler { } if (existing.name) { - const provider = { name: emailProvider.name, enabled: emailProvider.enabled }; - const updated = await this.client.emails.update(provider, emailProvider); + const updated = await this.client.emails.update(emailProvider); this.updated += 1; this.didUpdate(updated); } else { - // TODO: credentials is required here. - const provider = { name: emailProvider.name, enabled: emailProvider.enabled, credentials: {} }; - const created = await this.client.emails.configure(provider, emailProvider); + const created = await this.client.emails.configure(emailProvider as PostProviderRequest); this.created += 1; this.didCreate(created); } diff --git a/test/e2e/testdata/empty-tenant/tenant.yaml b/test/e2e/testdata/empty-tenant/tenant.yaml index 2890c0a7a..67ddf2560 100644 --- a/test/e2e/testdata/empty-tenant/tenant.yaml +++ b/test/e2e/testdata/empty-tenant/tenant.yaml @@ -109,7 +109,6 @@ branding: templates: [] prompts: universal_login_experience: new -migrations: {} actions: [] triggers: {} organizations: [] diff --git a/test/e2e/testdata/lots-of-configuration/tenant.yaml b/test/e2e/testdata/lots-of-configuration/tenant.yaml index a943dc264..58431e5b2 100644 --- a/test/e2e/testdata/lots-of-configuration/tenant.yaml +++ b/test/e2e/testdata/lots-of-configuration/tenant.yaml @@ -659,7 +659,6 @@ roles: prompts: universal_login_experience: new identifier_first: true -migrations: {} actions: - name: My Custom Action code: ./actions/My Custom Action/code.js diff --git a/test/e2e/testdata/should-deploy-without-throwing-an-error/tenant.yaml b/test/e2e/testdata/should-deploy-without-throwing-an-error/tenant.yaml index c5dac8f38..405ef36b9 100644 --- a/test/e2e/testdata/should-deploy-without-throwing-an-error/tenant.yaml +++ b/test/e2e/testdata/should-deploy-without-throwing-an-error/tenant.yaml @@ -125,7 +125,6 @@ branding: prompts: customText: {} universal_login_experience: new -migrations: {} actions: [] triggers: {} organizations: []