Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXCDT-501: auth0 tf generate end-to-end tests #848

Merged
merged 19 commits into from
Sep 19, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Sep 15, 2023

🔧 Changes

Adding E2E test cases to the auth0 tf generate command.

Four major cases covered:

  • Full success of TF config generation, targeting single resource
  • Full success of TF config generation, targeting all resources
  • Partial success if Terraform provider credentials not initialized
  • Validation errors when invalid config provided

One thing to note is that we're reusing the Auth0 CLI client, used for facilitating connection between CLI and tenant for the Terraform provider too. This is not a best practice but a major convenience in testing; preventing us needing to initialize and manage credentials of another client.

🔬 Testing

Four new end-to-end test cases added.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd force-pushed the DXCDT-501-tf-generate-e2e-testing branch from c5f8e9f to 9c99f3b Compare September 15, 2023 14:42
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.69% 🎉

Comparison is base (000005c) 72.64% compared to head (52b24e2) 73.34%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #848      +/-   ##
==========================================
+ Coverage   72.64%   73.34%   +0.69%     
==========================================
  Files          92       92              
  Lines       11842    11847       +5     
==========================================
+ Hits         8603     8689      +86     
+ Misses       2733     2644      -89     
- Partials      506      514       +8     
Files Changed Coverage Δ
internal/cli/terraform_fetcher.go 98.03% <ø> (ø)
internal/cli/terraform.go 87.17% <100.00%> (+26.26%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willvedd willvedd marked this pull request as ready for review September 19, 2023 15:07
@willvedd willvedd requested a review from a team as a code owner September 19, 2023 15:07
@willvedd willvedd merged commit 9cc4f17 into main Sep 19, 2023
6 checks passed
@willvedd willvedd deleted the DXCDT-501-tf-generate-e2e-testing branch September 19, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants