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

Make IsNewResource and HasChange optional #194

Merged
merged 7 commits into from
Apr 14, 2020

Conversation

alexkappa
Copy link
Owner

@alexkappa alexkappa commented Apr 6, 2020

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

Fixes #185 #197

Changes proposed in this pull request:

  • Change accessor functions to optionally check IsNewResource and HasChange. This will always send idempotent fields to the Auth0 API.

Output from acceptance testing:

==> Checking that code complies with gofmt requirements...
?       github.com/terraform-providers/terraform-provider-auth0 [no test files]
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_debugDefaults
--- PASS: TestProvider_debugDefaults (0.00s)
=== RUN   TestAccClientGrant
--- PASS: TestAccClientGrant (4.04s)
=== RUN   TestAccClient
--- PASS: TestAccClient (1.13s)
=== RUN   TestAccClientZeroValueCheck
--- PASS: TestAccClientZeroValueCheck (2.47s)
=== RUN   TestAccClientRotateSecret
--- PASS: TestAccClientRotateSecret (1.86s)
=== RUN   TestAccClientInitiateLoginUri
--- PASS: TestAccClientInitiateLoginUri (0.04s)
=== RUN   TestAccConnection
--- PASS: TestAccConnection (1.75s)
=== RUN   TestAccConnectionAD
--- PASS: TestAccConnectionAD (0.98s)
=== RUN   TestAccConnectionAzureAD
--- PASS: TestAccConnectionAzureAD (1.25s)
=== RUN   TestAccConnectionWithEnbledClients
--- PASS: TestAccConnectionWithEnbledClients (1.91s)
=== RUN   TestAccConnectionSMS
--- PASS: TestAccConnectionSMS (1.00s)
=== RUN   TestAccConnectionEmail
--- PASS: TestAccConnectionEmail (1.77s)
=== RUN   TestAccConnectionSalesforce
--- PASS: TestAccConnectionSalesforce (0.88s)
=== RUN   TestAccConnectionGoogleOAuth2
--- PASS: TestAccConnectionGoogleOAuth2 (1.35s)
=== RUN   TestAccConnectionGitHub
--- PASS: TestAccConnectionGitHub (1.03s)
=== RUN   TestAccCustomDomain
--- PASS: TestAccCustomDomain (1.00s)
=== RUN   TestAccEmailTemplate
--- PASS: TestAccEmailTemplate (1.16s)
=== RUN   TestAccEmail
--- PASS: TestAccEmail (2.20s)
=== RUN   TestAccGlobalClient
--- PASS: TestAccGlobalClient (2.21s)
=== RUN   TestAccHook
--- PASS: TestAccHook (1.01s)
=== RUN   TestHookNameRegexp
--- PASS: TestHookNameRegexp (0.00s)
=== RUN   TestAccPrompt
--- PASS: TestAccPrompt (1.30s)
=== RUN   TestAccResourceServer
--- PASS: TestAccResourceServer (2.52s)
=== RUN   TestAccRole
--- PASS: TestAccRole (2.15s)
=== RUN   TestAccRuleConfig
--- PASS: TestAccRuleConfig (0.77s)
=== RUN   TestAccRule
--- PASS: TestAccRule (0.80s)
=== RUN   TestRuleNameRegexp
--- PASS: TestRuleNameRegexp (0.00s)
=== RUN   TestAccTenant
--- PASS: TestAccTenant (1.44s)
=== RUN   TestAccUserMissingRequiredParams
--- PASS: TestAccUserMissingRequiredParams (0.02s)
=== RUN   TestAccUser
--- PASS: TestAccUser (3.49s)
=== RUN   TestMapData
--- PASS: TestMapData (0.00s)
=== RUN   TestJSON
--- PASS: TestJSON (0.00s)
PASS
coverage: 76.7% of statements
ok      github.com/terraform-providers/terraform-provider-auth0/auth0   41.581s coverage: 76.7% of statements
?       github.com/terraform-providers/terraform-provider-auth0/auth0/internal/debug    [no test files]
=== RUN   TestString
--- PASS: TestString (0.00s)
=== RUN   TestTemplate
--- PASS: TestTemplate (0.00s)
PASS
coverage: 75.0% of statements
ok      github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random   0.036s  coverage: 75.0% of statements
=== RUN   TestIsURLWithNoFragment
--- PASS: TestIsURLWithNoFragment (0.00s)
PASS
coverage: 52.9% of statements
ok      github.com/terraform-providers/terraform-provider-auth0/auth0/internal/validation       0.018s  coverage: 52.9% of statements

@alexkappa alexkappa merged commit 97ddf7c into master Apr 14, 2020
@yvovandoorn yvovandoorn deleted the fix-payload-validation-error branch March 24, 2021 14:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auth0_tenant - 400 Bad Request: Payload validation error: 'Too few properties defined (0), minimum 1'
1 participant