-
Notifications
You must be signed in to change notification settings - Fork 188
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
chore: Enables tests in CI for mongodbatlas_privatelink_endpoint_service_data_federation_online_archive
resource
#2001
chore: Enables tests in CI for mongodbatlas_privatelink_endpoint_service_data_federation_online_archive
resource
#2001
Conversation
// Skip because private endpoints are deleted daily from dev environment | ||
acc.SkipTestForCI(t) | ||
var ( | ||
projectID = acc.ProjectIDGlobal(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to this PR: are we planning to document and explain how to re-use the different level of projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least i was planning to describe the list of shared projects and what they're used for, but yeah we can add more help about how to decide what level of reuse to do, let me think more about how to document that
|
||
func projectID(tb testing.TB, name string) string { | ||
tb.Helper() | ||
SkipInUnitTest(tb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious: why we do this? should we also document it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've added more documentation to SkipInUnitTest, let me know if it helps
internal/testutil/acc/skip.go
Outdated
// TF skipping test when TF_ACC=1 is not set is implemented inside resource.Test / ParallelTest functions. | ||
// SkipInUnitTest allows to call functions in the test body that must not run in unit test mode, only in acc/mig mode. | ||
// As an example it is used in ProjectIDGlobal so it can be called from the test methdod, | ||
// or in TestAccConfigDSAtlasUser_ByUserID so it can call fetchUser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcosuma FYI
...ononlinearchive/resource_privatelink_endpoint_service_data_federation_online_archive_test.go
Show resolved
Hide resolved
mongodb_atlas_private_endpoint_id: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID }} | ||
mongodb_atlas_private_endpoint_dns_name: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the case of QA are the endpoint_id and endpoint_dns_name the same value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i checked and it worked, they are AWS values.
in fact that's why any project can be used for these tests, not special config needed
Co-authored-by: Agustin Bettati <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
One question, how is the test-acc-tf-p-keep-global
project created in dev/qa?
@EspenAlbert i created test-acc-tf-p-keep-global manually as it won't be deleted, i'll document all common projects and what config they need. this particular project doesn't need any extra config, just to be created with that name |
Description
Enables skipped tests in CI for
mongodbatlas_privatelink_endpoint_service_data_federation_online_archive
resource.Link to any related issue(s): CLOUDP-236603
Type of change:
Required Checklist:
Further comments