Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Support validation for the length of auth0_client description length#260

Merged
alexkappa merged 1 commit intoalexkappa:masterfrom
tanmng:feature/client-description-length-validation
Aug 23, 2020
Merged

Support validation for the length of auth0_client description length#260
alexkappa merged 1 commit intoalexkappa:masterfrom
tanmng:feature/client-description-length-validation

Conversation

@tanmng
Copy link
Copy Markdown
Contributor

@tanmng tanmng commented Aug 13, 2020

Proposed Changes

  • Introduce ValidateFunc to the description field of auth0_client resource.

Currently, since we don't have a validation for this field, users can run into issue when they try to create/update an auth0_client where the description field is too long. The error from Auth0 is:

Error: 400 Bad Request: Payload validation error: 'String is too long (xxx chars), maximum 140' on property description (Free text description of the purpose of the Client. (Max character length: <code>140</code>)).

Acceptance Test Output

$ make testacc TESTS=TestAccXXX

==> Checking that code complies with gofmt requirements...
?   	github.com/terraform-providers/terraform-provider-auth0	[no test files]
=== RUN   TestAccClientGrant
--- PASS: TestAccClientGrant (47.05s)
=== RUN   TestAccClient
--- PASS: TestAccClient (2.65s)
=== RUN   TestAccClientZeroValueCheck
--- PASS: TestAccClientZeroValueCheck (6.19s)
=== RUN   TestAccClientRotateSecret
--- PASS: TestAccClientRotateSecret (4.48s)
=== RUN   TestAccClientInitiateLoginUri
--- PASS: TestAccClientInitiateLoginUri (0.03s)
=== RUN   TestAccClientJwtScopes
--- PASS: TestAccClientJwtScopes (4.48s)
PASS
coverage: 25.3% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0	64.987s	coverage: 25.3% of statements
?   	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/debug	[no test files]
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random	0.072s	coverage: 0.0% of statements [no tests to run]
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/validation	0.020s	coverage: 0.0% of statements [no tests to run]
?   	github.com/terraform-providers/terraform-provider-auth0/version	[no test files]

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Copy link
Copy Markdown
Owner

@alexkappa alexkappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tanmng!

@alexkappa alexkappa added this to the 0.14.0 milestone Aug 23, 2020
@alexkappa alexkappa merged commit 4c07bcd into alexkappa:master Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants