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

Add "auth0_hook" support and missing field on "auth0_client" #171

Merged
merged 2 commits into from
Feb 17, 2020

Conversation

yinzara
Copy link
Contributor

@yinzara yinzara commented Feb 17, 2020

Changes proposed in this pull request:

  • Add new "auth0_hook" resource that uses the Auth0 Hooks API to create hooks (very similar to rules)
  • Update resource_server test case and user resource for changes in auth0 golang library breaking changes

Output from acceptance testing:

$ make testacc TESTS=TestAccHook
==> Checking that code complies with gofmt requirements...
?   	github.com/terraform-providers/terraform-provider-auth0	[no test files]
=== RUN   TestAccHook
--- PASS: TestAccHook (1.80s)
PASS
coverage: 6.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0	2.031s	coverage: 6.0% of statements
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random	0.189s	coverage: 0.0% of statements [no tests to run]

And to prove

make testacc TESTS=TestAccResourceServer
==> Checking that code complies with gofmt requirements...
?   	github.com/terraform-providers/terraform-provider-auth0	[no test files]
=== RUN   TestAccResourceServer
--- PASS: TestAccResourceServer (2.58s)
PASS
coverage: 11.6% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0	2.954s	coverage: 11.6% of statements
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random	0.284s	coverage: 0.0% of statements [no tests to run]
 make testacc TESTS=TestAccClient
==> Checking that code complies with gofmt requirements...
?   	github.com/terraform-providers/terraform-provider-auth0	[no test files]
=== RUN   TestAccClientGrant
--- PASS: TestAccClientGrant (4.39s)
=== RUN   TestAccClient
--- PASS: TestAccClient (1.33s)
=== RUN   TestAccClientZeroValueCheck
--- PASS: TestAccClientZeroValueCheck (3.12s)
=== RUN   TestAccClientRotateSecret
--- PASS: TestAccClientRotateSecret (2.78s)
PASS
coverage: 27.5% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0	11.856s	coverage: 27.5% of statements
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random	0.369s	coverage: 0.0% of statements [no tests to run]
make testacc TESTS=TestAccUser
==> Checking that code complies with gofmt requirements...
?   	github.com/terraform-providers/terraform-provider-auth0	[no test files]
=== RUN   TestAccUserMissingRequiredParams
--- PASS: TestAccUserMissingRequiredParams (0.01s)
=== RUN   TestAccUser
--- PASS: TestAccUser (5.66s)
PASS
coverage: 21.4% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0	5.934s	coverage: 21.4% of statements
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok  	github.com/terraform-providers/terraform-provider-auth0/auth0/internal/random	0.188s	coverage: 0.0% of statements [no tests to run]

@yinzara yinzara force-pushed the master branch 2 times, most recently from 4432818 to 01ef8a2 Compare February 17, 2020 21:34
@yinzara
Copy link
Contributor Author

yinzara commented Feb 17, 2020

I can't help it that auth0 rules and auth0 hooks have a very similar syntax and functionality. :) The CodeClimate errors about duplicate code is just because of how similar they are. How can I fix that?

@yinzara
Copy link
Contributor Author

yinzara commented Feb 17, 2020

The Travis CI errors seem to all be related to a missing "client_secret" (i.e. the AUTH0_CLIENT_SECRET environment variable).

@yinzara
Copy link
Contributor Author

yinzara commented Feb 17, 2020

I think you and I are literally working in tandem on all of this. lol I see my changes being reflected in master.

@alexkappa
Copy link
Owner

I can't help it that auth0 rules and auth0 hooks have a very similar syntax and functionality. :)

You have a point there :)

Don't worry about the codeclimate issues too much, I'll do a review and likely they won't be important. And don't worry about the travis build either, I have to run the tests manually as protected env vars are not available to pull requests.

I think you and I are literally working in tandem on all of this

Unfortunately, I beat you to the punch there. My apologies for this, I should have mentioned that I was working on it so you wouldn't have to. We're mid-transition over to terraform-providers/terraform-provider-auth0 and I'm trying to get a hang of having things in two places... I'll make sure to let people know if I'm working on something. Sorry again, and thanks for helping out

@alexkappa alexkappa merged commit f0fcf1f into alexkappa:master Feb 17, 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