Skip to content

Commit 37c287e

Browse files
committed
test fixes
1 parent 5858275 commit 37c287e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/service/encryptionatrestprivateendpoint/resource_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ func TestAccEncryptionAtRestPrivateEndpoint_createTimeoutWithDeleteOnCreate(t *t
3838
projectID = os.Getenv("MONGODB_ATLAS_PROJECT_EAR_PE_AWS_ID")
3939
createTimeout = "1s"
4040
deleteOnCreateTimeout = true
41-
awsKms = &admin.AWSKMSConfiguration{
41+
awsKms = admin.AWSKMSConfiguration{
4242
Enabled: conversion.Pointer(true),
43-
RequirePrivateNetworking: conversion.Pointer(true),
44-
AccessKeyID: conversion.StringPtr(os.Getenv("AWS_ACCESS_KEY_ID")),
45-
SecretAccessKey: conversion.StringPtr(os.Getenv("AWS_SECRET_ACCESS_KEY")),
4643
CustomerMasterKeyID: conversion.StringPtr(os.Getenv("AWS_CUSTOMER_MASTER_KEY_ID")),
47-
Region: conversion.StringPtr(os.Getenv("AWS_REGION")),
44+
Region: conversion.StringPtr(conversion.AWSRegionToMongoDBRegion(os.Getenv("AWS_REGION"))),
45+
RoleId: conversion.StringPtr(os.Getenv("AWS_EAR_ROLE_ID")),
46+
RequirePrivateNetworking: conversion.Pointer(false),
4847
}
4948
region = conversion.AWSRegionToMongoDBRegion(os.Getenv("AWS_REGION"))
5049
)
@@ -53,7 +52,7 @@ func TestAccEncryptionAtRestPrivateEndpoint_createTimeoutWithDeleteOnCreate(t *t
5352
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
5453
Steps: []resource.TestStep{
5554
{
56-
Config: configAWSBasicWithTimeout(projectID, awsKms, region, acc.TimeoutConfig(&createTimeout, nil, nil, true), &deleteOnCreateTimeout),
55+
Config: configAWSBasicWithTimeout(projectID, &awsKms, region, acc.TimeoutConfig(&createTimeout, nil, nil, true), &deleteOnCreateTimeout),
5756
ExpectError: regexp.MustCompile("will run cleanup because delete_on_create_timeout is true"),
5857
},
5958
},

internal/service/flexcluster/resource_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func TestAccFlexClusterRS_createTimeoutWithDeleteOnCreateFlex(t *testing.T) {
4848
}
4949

5050
func TestAccFlexClusterRS_updateDeleteTimeout(t *testing.T) {
51+
acc.SkipTestForCI(t) // Update is consistently too fast and it does not time out, making the test flaky
5152
var (
5253
projectID = acc.ProjectIDExecution(t)
5354
clusterName = acc.RandomName()

0 commit comments

Comments
 (0)