-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Uses ExternalProviders helper functions for tests (#1773)
* ExternalProviders functions for AWS only provider * use mig.ExternalProvidersOnlyAWS * use ExternalProviders * project_api_key * test if passing for all recent provider versions * use ExternalProvidersWithAWS * move provider functions independent of versionConstraint to acc * use acc cluster test * keep version at 1.11.0 * fix version in project_api_key_migration test
- Loading branch information
Showing
15 changed files
with
71 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package acc | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-testing/helper/resource" | ||
) | ||
|
||
func ExternalProviders(versionAtlasProvider string) map[string]resource.ExternalProvider { | ||
return map[string]resource.ExternalProvider{ | ||
"mongodbatlas": *providerAtlas(versionAtlasProvider), | ||
} | ||
} | ||
|
||
func ExternalProvidersWithAWS(versionAtlasProvider string) map[string]resource.ExternalProvider { | ||
return map[string]resource.ExternalProvider{ | ||
"mongodbatlas": *providerAtlas(versionAtlasProvider), | ||
"aws": *providerAWS(), | ||
} | ||
} | ||
|
||
func ExternalProvidersOnlyAWS() map[string]resource.ExternalProvider { | ||
return map[string]resource.ExternalProvider{ | ||
"aws": *providerAWS(), | ||
} | ||
} | ||
|
||
func providerAtlas(versionAtlasProvider string) *resource.ExternalProvider { | ||
return &resource.ExternalProvider{ | ||
VersionConstraint: versionAtlasProvider, | ||
Source: "mongodb/mongodbatlas", | ||
} | ||
} | ||
|
||
func providerAWS() *resource.ExternalProvider { | ||
return &resource.ExternalProvider{ | ||
VersionConstraint: "5.1.0", | ||
Source: "hashicorp/aws", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters