@@ -19,7 +19,7 @@ func TestAccOutageSimulationClusterDS_SingleRegion_basic(t *testing.T) {
19
19
)
20
20
21
21
resource .ParallelTest (t , resource.TestCase {
22
- PreCheck : func () { testAccPreCheck (t ) },
22
+ PreCheck : func () { testAccPreCheckBasic (t ) },
23
23
ProviderFactories : testAccProviderFactories ,
24
24
CheckDestroy : testAccCheckMongoDBAtlasClusterOutageSimulationDestroy ,
25
25
Steps : []resource.TestStep {
@@ -38,6 +38,35 @@ func TestAccOutageSimulationClusterDS_SingleRegion_basic(t *testing.T) {
38
38
})
39
39
}
40
40
41
+ func TestAccOutageSimulationClusterDS_MultiRegion_basic (t * testing.T ) {
42
+ SkipTestExtCred (t )
43
+ var (
44
+ dataSourceName = "data.mongodbatlas_cluster_outage_simulation.test"
45
+ orgID = os .Getenv ("MONGODB_ATLAS_ORG_ID" )
46
+ projectName = acctest .RandomWithPrefix ("test-acc-project" )
47
+ clusterName = acctest .RandomWithPrefix ("test-acc-cluster" )
48
+ )
49
+
50
+ resource .ParallelTest (t , resource.TestCase {
51
+ PreCheck : func () { testAccPreCheckBasic (t ) },
52
+ ProviderFactories : testAccProviderFactories ,
53
+ CheckDestroy : testAccCheckMongoDBAtlasClusterOutageSimulationDestroy ,
54
+ Steps : []resource.TestStep {
55
+ {
56
+ Config : testAccDataSourceMongoDBAtlasClusterOutageSimulationConfigDSMultiRegion (projectName , orgID , clusterName ),
57
+ Check : resource .ComposeTestCheckFunc (
58
+ resource .TestCheckResourceAttr (dataSourceName , "cluster_name" , clusterName ),
59
+ resource .TestCheckResourceAttrSet (dataSourceName , "project_id" ),
60
+ resource .TestCheckResourceAttrSet (dataSourceName , "outage_filters.#" ),
61
+ resource .TestCheckResourceAttrSet (dataSourceName , "start_request_date" ),
62
+ resource .TestCheckResourceAttrSet (dataSourceName , "simulation_id" ),
63
+ resource .TestCheckResourceAttrSet (dataSourceName , "state" ),
64
+ ),
65
+ },
66
+ },
67
+ })
68
+ }
69
+
41
70
func testAccDataSourceMongoDBAtlasClusterOutageSimulationConfigDSSingleRegion (projectName , orgID , clusterName string ) string {
42
71
return fmt .Sprintf (`
43
72
resource "mongodbatlas_project" "outage_project" {
@@ -73,35 +102,6 @@ func testAccDataSourceMongoDBAtlasClusterOutageSimulationConfigDSSingleRegion(pr
73
102
` , projectName , orgID , clusterName )
74
103
}
75
104
76
- func TestAccOutageSimulationClusterDS_MultiRegion_basic (t * testing.T ) {
77
- SkipTestExtCred (t )
78
- var (
79
- dataSourceName = "data.mongodbatlas_cluster_outage_simulation.test"
80
- orgID = os .Getenv ("MONGODB_ATLAS_ORG_ID" )
81
- projectName = acctest .RandomWithPrefix ("test-acc-project" )
82
- clusterName = acctest .RandomWithPrefix ("test-acc-cluster" )
83
- )
84
-
85
- resource .ParallelTest (t , resource.TestCase {
86
- PreCheck : func () { testAccPreCheck (t ) },
87
- ProviderFactories : testAccProviderFactories ,
88
- CheckDestroy : testAccCheckMongoDBAtlasClusterOutageSimulationDestroy ,
89
- Steps : []resource.TestStep {
90
- {
91
- Config : testAccDataSourceMongoDBAtlasClusterOutageSimulationConfigDSMultiRegion (projectName , orgID , clusterName ),
92
- Check : resource .ComposeTestCheckFunc (
93
- resource .TestCheckResourceAttr (dataSourceName , "cluster_name" , clusterName ),
94
- resource .TestCheckResourceAttrSet (dataSourceName , "project_id" ),
95
- resource .TestCheckResourceAttrSet (dataSourceName , "outage_filters.#" ),
96
- resource .TestCheckResourceAttrSet (dataSourceName , "start_request_date" ),
97
- resource .TestCheckResourceAttrSet (dataSourceName , "simulation_id" ),
98
- resource .TestCheckResourceAttrSet (dataSourceName , "state" ),
99
- ),
100
- },
101
- },
102
- })
103
- }
104
-
105
105
func testAccDataSourceMongoDBAtlasClusterOutageSimulationConfigDSMultiRegion (projectName , orgID , clusterName string ) string {
106
106
return fmt .Sprintf (`
107
107
resource "mongodbatlas_project" "outage_project" {
0 commit comments