Skip to content

Commit eeb1d5f

Browse files
committed
revert init changes
1 parent e9c477e commit eeb1d5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/testutil/acc/factory.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ func ConnV2UsingGov() *admin.APIClient {
5151
}
5252

5353
func init() {
54+
if InUnitTest() { // Dummy credentials for unit tests
55+
os.Setenv("MONGODB_ATLAS_PUBLIC_KEY", "dummy")
56+
os.Setenv("MONGODB_ATLAS_PRIVATE_KEY", "dummy")
57+
os.Unsetenv("MONGODB_ATLAS_CLIENT_ID")
58+
os.Unsetenv("MONGODB_ATLAS_CLIENT_SECRET")
59+
}
5460
TestAccProviderV6Factories = map[string]func() (tfprotov6.ProviderServer, error){
5561
ProviderNameMongoDBAtlas: func() (tfprotov6.ProviderServer, error) {
5662
return provider.MuxProviderFactory()(), nil

0 commit comments

Comments
 (0)