-
Notifications
You must be signed in to change notification settings - Fork 166
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: Updates search_deployment resource with new SDK #1853
Conversation
bd227e4
to
38d0749
Compare
@@ -56,11 +56,3 @@ func IsStringPresent(strPtr *string) bool { | |||
func MongoDBRegionToAWSRegion(region string) string { | |||
return strings.ReplaceAll(strings.ToLower(region), "_", "-") | |||
} | |||
|
|||
// NonEmptyToPtr accepts an array or slice and returns a pointer to it, except if it's empty, in that case it returns nil. | |||
func NonEmptyToPtr[T any](v []T) *[]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.
not used any more
@@ -251,7 +251,7 @@ func TestProjectDataSourceSDKToResourceTFModel(t *testing.T) { | |||
project: &projectSDK, | |||
projectProps: project.AdditionalProperties{ | |||
Teams: &admin.PaginatedTeamRole{ | |||
Results: conversion.NonEmptyToPtr(teamRolesSDK), | |||
Results: &teamRolesSDK, |
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.
leftover
aa0663d
to
1b0f560
Compare
@@ -237,7 +237,7 @@ func TestAccConfigRSAlertConfiguration_withThresholdUpdated(t *testing.T) { | |||
ImportStateIdFunc: importStateProjectIDFunc(resourceName), | |||
ImportState: true, | |||
ImportStateVerify: true, | |||
ImportStateVerifyIgnore: []string{"project_id", "matcher.0.field_name"}, | |||
ImportStateVerifyIgnore: []string{"project_id", "updated", "matcher.0.field_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.
add "updated" to fix flaky test as sometimes updated time differs in a second
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
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/mig" | ||
) | ||
|
||
func TestAccMigrationSearchDeployment_basic(t *testing.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.
nice!
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 would keep into account that we also have the file data_source_search_deployment_schema.go
, so changing the resource schema file to schema_search_deployment.go
can cause confusion.
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 missed that, ok I'll revert the rename
Description
Updates search_deployment resource with new SDK.
Link to any related issue(s): https://jira.mongodb.org/browse/CLOUDP-222717
Type of change:
Required Checklist:
Further comments