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

Add secure-onboarding organization acc test #461

Merged
merged 4 commits into from
Dec 14, 2023

Conversation

ravinadhruve10
Copy link
Contributor

@ravinadhruve10 ravinadhruve10 commented Dec 13, 2023

Change summary:

As per TF documentation - Terraform acceptance tests use real Terraform configurations to exercise the code in real plan, apply, refresh, and destroy life cycles.

TF acceptance tests for secure org onboarding need an actual existing gcp project along with an actual service_principal_key to scrape all folders and projects under the org. Without it POST /organizations API fail with 500 error and hence we could not add org acceptance tests working with the sysdig backend APIs.

To handle this, adding the org acceptance tests with skip on this particular error check. With this, we can get some decent test coverage as a start :-

  • that a valid HCL gets called to the TF sysdig provider, and
  • that the right organization API gets called to the sysdig BE.

Change summary:
----------------
Terraform acceptance tests use real Terraform configurations to
exercise the code in real plan, apply, refresh, and destroy life cycles.

TF acceptance tests for secure org onboarding need an actual existing gcp project
along with an actual service_principal_key to scrape all folders and projects under the org.
Without it POST /organizations API fail with 500 error and hence we could not
add org acceptance tests working with the sysdig backend APIs.

To handle this, adding the org acceptance tests with skip on this particular error check.
With this, we can get some decent test coverage for the HCL and the APIs for org.
@ravinadhruve10 ravinadhruve10 marked this pull request as ready for review December 13, 2023 16:47
@ravinadhruve10 ravinadhruve10 merged commit bccd86b into master Dec 14, 2023
23 checks passed
@ravinadhruve10 ravinadhruve10 deleted the onboarding-org-tests branch December 14, 2023 21:58
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.

2 participants