From ace6d7dcec8eb2a6ec85baa2b38abedc23cec8ec Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:16:52 +0100 Subject: [PATCH] Fix commander tests --- test/integration/api-test-cases.yaml | 4 ++-- test/integration/apis-test-cases.yaml | 2 +- test/integration/apps-test-cases.yaml | 6 +++--- test/integration/custom-domains-test-cases.yaml | 2 +- test/integration/logs-test-cases.yaml | 4 ++-- test/integration/organizations-test-cases.yaml | 12 ++++++------ test/integration/roles-test-cases.yaml | 4 ++-- test/integration/terraform-test-cases.yaml | 4 ++-- test/integration/test-commands-test-cases.yaml | 4 ++-- test/integration/universal-login-test-cases.yaml | 2 +- test/integration/users-test-cases.yaml | 4 ++-- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/test/integration/api-test-cases.yaml b/test/integration/api-test-cases.yaml index 538632041..f414effc5 100644 --- a/test/integration/api-test-cases.yaml +++ b/test/integration/api-test-cases.yaml @@ -43,14 +43,14 @@ tests: exit-code: 1 stderr: contains: - - "failed to parse command inputs: invalid json data given" + - "Failed to parse command inputs: invalid json data given" 007 - it fails to use the api command if an invalid method is given: command: auth0 api conquer "tenants/settings" exit-code: 1 stderr: contains: - - "failed to parse command inputs: invalid method given" + - "Failed to parse command inputs: invalid method given" 008 - it throws a warning when both piped data and the data flag are present: command: cat ./test/integration/fixtures/update-tenant-settings.json | auth0 api patch "tenants/settings" --data "{\"idle_session_lifetime\":72}" diff --git a/test/integration/apis-test-cases.yaml b/test/integration/apis-test-cases.yaml index 780c0932a..e499c636d 100644 --- a/test/integration/apis-test-cases.yaml +++ b/test/integration/apis-test-cases.yaml @@ -19,7 +19,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 003 - apis create and check data: command: auth0 apis create --name integration-test-api-def1 --identifier http://integration-test-api-def1 --scopes read:todos,write:todos --signing-alg RS256 --json diff --git a/test/integration/apps-test-cases.yaml b/test/integration/apps-test-cases.yaml index 616d9a943..3111567cd 100644 --- a/test/integration/apps-test-cases.yaml +++ b/test/integration/apps-test-cases.yaml @@ -17,7 +17,7 @@ tests: exit-code: 1 stderr: contains: - - "number flag invalid, please pass a number between 1 and 1000" + - "Number flag invalid, please pass a number between 1 and 1000" 003 - it successfully creates a native app: command: auth0 apps create --name integration-test-app-nativeapp1 --type native --description NativeApp1 @@ -76,7 +76,7 @@ tests: exit-code: 1 stderr: contains: - - "Unable to create application" + - "Failed to create application" 010 - it successfully creates a regular app with auth method set to post and outputs in json: command: auth0 apps create --name integration-test-app-regapp2 --type regular --description RegApp2 --auth-method Post --json @@ -132,7 +132,7 @@ tests: exit-code: 1 stderr: contains: - - "Unable to create application" + - "Failed to create application" 018 - it successfully creates a native app with logout urls and outputs in json: command: auth0 apps create --name integration-test-app-regapp6 --type native --description RegularApp --logout-urls https://*.example.com/logout,https://example.com/logout --json diff --git a/test/integration/custom-domains-test-cases.yaml b/test/integration/custom-domains-test-cases.yaml index 2118aa158..42e48e88d 100644 --- a/test/integration/custom-domains-test-cases.yaml +++ b/test/integration/custom-domains-test-cases.yaml @@ -32,7 +32,7 @@ tests: exit-code: 1 stderr: contains: - - "An unexpected error occurred while attempting to create the custom domain 'custom-domain.com': 409 Conflict: The specified custom domain already exists" + - "Failed to create custom domain \"custom-domain.com\": 409 Conflict: The specified custom domain already exists" 005 - show domain: command: auth0 domains show $(./test/integration/scripts/get-custom-domain-id.sh) --no-input diff --git a/test/integration/logs-test-cases.yaml b/test/integration/logs-test-cases.yaml index 64408610b..eeacf45ea 100644 --- a/test/integration/logs-test-cases.yaml +++ b/test/integration/logs-test-cases.yaml @@ -29,14 +29,14 @@ tests: exit-code: 1 stderr: contains: - - "number flag invalid, please pass a number between 1 and 1000" + - "Number flag invalid, please pass a number between 1 and 1000" 005 - it errors because of invalid number arg: command: auth0 logs list --number 1001 --json exit-code: 1 stderr: contains: - - "number flag invalid, please pass a number between 1 and 1000" + - "Number flag invalid, please pass a number between 1 and 1000" 006 - it successfully lists all log streams with no data: command: auth0 logs streams list diff --git a/test/integration/organizations-test-cases.yaml b/test/integration/organizations-test-cases.yaml index e8148be99..6f209f450 100644 --- a/test/integration/organizations-test-cases.yaml +++ b/test/integration/organizations-test-cases.yaml @@ -22,7 +22,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 004 - create organization and check json output: command: auth0 orgs create --name integration-test-org-new --display "Integration Test Organization" --json --no-input @@ -49,7 +49,7 @@ tests: exit-code: 1 stderr: contains: - - failed to create an organization with name 'integration-test-org-new2' + - Failed to create organization with name "integration-test-org-new2" 007 - list organizations with data: command: auth0 orgs list @@ -81,7 +81,7 @@ tests: exit-code: 1 stderr: contains: - - "Unable to get an organization with ID 'this-org-id-does-not-exist'" + - "Failed to read organization with ID \"this-org-id-does-not-exist\"" 011 - update organization with minimal flags: command: auth0 orgs update $(./test/integration/scripts/get-org-id.sh) --no-input @@ -151,7 +151,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 config: retries: 3 @@ -164,7 +164,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 021 - list organization roles members: command: auth0 orgs roles members list $(./test/integration/scripts/get-org-id.sh) @@ -175,4 +175,4 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 diff --git a/test/integration/roles-test-cases.yaml b/test/integration/roles-test-cases.yaml index c8fa9fbcf..bfa3a6b1c 100644 --- a/test/integration/roles-test-cases.yaml +++ b/test/integration/roles-test-cases.yaml @@ -47,7 +47,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 007 - roles show json: command: auth0 roles show $(./test/integration/scripts/get-role-id.sh) --json @@ -97,7 +97,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 014 - add role permissions: command: auth0 roles permissions add $(./test/integration/scripts/get-role-id.sh) --api-id $(./test/integration/scripts/get-api-id.sh) --permissions read:todos diff --git a/test/integration/terraform-test-cases.yaml b/test/integration/terraform-test-cases.yaml index 132929a0b..5b1490fcc 100644 --- a/test/integration/terraform-test-cases.yaml +++ b/test/integration/terraform-test-cases.yaml @@ -63,11 +63,11 @@ tests: exit-code: 1 stderr: contains: - - "unsupported resource type: auth0_computer" + - "Unsupported resource type: auth0_computer" 005 - it errors if AUTH0_DOMAIN values for provider and CLI do not match: command: AUTH0_DOMAIN=some-other-domain.us.auth0.com auth0 tf generate --output-dir tmp-tf-gen exit-code: 1 stderr: contains: - - "Terraform provider tenant domain 'some-other-domain.us.auth0.com' does not match current CLI tenant '" + - "Terraform provider tenant domain \"some-other-domain.us.auth0.com\" does not match current CLI tenant" diff --git a/test/integration/test-commands-test-cases.yaml b/test/integration/test-commands-test-cases.yaml index 50b8fb768..a2c63421d 100644 --- a/test/integration/test-commands-test-cases.yaml +++ b/test/integration/test-commands-test-cases.yaml @@ -19,14 +19,14 @@ tests: exit-code: 1 stderr: contains: - - "cannot test the Universal Login with a Machine to Machine application." + - "Cannot test the Universal Login with a Machine to Machine application." 003 - test token without client grant: command: auth0 test token $(./test/integration/scripts/get-m2m-app-id.sh) --audience "$(./test/integration/scripts/get-manage-api-audience.sh)" --no-input exit-code: 1 stderr: contains: - - "failed to log in with client credentials for client with ID " + - "Failed to log in with client credentials for client with ID " - "the integration-test-app-m2m application is not authorized to request access tokens for this API " - ".auth0.com/api/v2/." diff --git a/test/integration/universal-login-test-cases.yaml b/test/integration/universal-login-test-cases.yaml index 8b06d72d3..2c6ae4fd1 100644 --- a/test/integration/universal-login-test-cases.yaml +++ b/test/integration/universal-login-test-cases.yaml @@ -84,7 +84,7 @@ tests: exit-code: 1 stderr: contains: - - "failed to fetch the Universal Login template data: this feature requires at least one custom domain to be set and verified for the tenant, use 'auth0 domains create' to create one and 'auth0 domains verify' to have it verified" + - "Failed to fetch the Universal Login template data: this feature requires at least one custom domain to be set and verified for the tenant, use 'auth0 domains create' to create one and 'auth0 domains verify' to have it verified" 010 - update universal login branding prompts (login): command: cat ./test/integration/fixtures/update-ul-prompts-login.json | auth0 ul prompts update login diff --git a/test/integration/users-test-cases.yaml b/test/integration/users-test-cases.yaml index 55792066a..f4afc4376 100644 --- a/test/integration/users-test-cases.yaml +++ b/test/integration/users-test-cases.yaml @@ -50,7 +50,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 007 - users update minimal flags: command: auth0 users update $(./test/integration/scripts/get-user-id.sh) --json --no-input @@ -93,7 +93,7 @@ tests: exit-code: 1 stderr: contains: - - number flag invalid, please pass a number between 1 and 1000 + - Number flag invalid, please pass a number between 1 and 1000 013 - users roles add: command: auth0 users roles add $(./test/integration/scripts/get-user-id.sh) -r $(./test/integration/scripts/get-role-id.sh)