@@ -35,19 +35,6 @@ var vmClusterTestResource = cloudVmClusterResourceTest{
3535 odbNetDisplayNamePrefix : "odb-net" ,
3636}
3737
38- func TestPrintCloudVmClusterUnitTest (t * testing.T ) {
39- vmcRName := sdkacctest .RandomWithPrefix (vmClusterTestResource .vmClusterDisplayNamePrefix )
40- exaInfraRName := sdkacctest .RandomWithPrefix (vmClusterTestResource .exaInfraDisplayNamePrefix )
41- odbNetRName := sdkacctest .RandomWithPrefix (vmClusterTestResource .odbNetDisplayNamePrefix )
42-
43- publicKey , _ , err := sdkacctest .RandSSHKeyPair (acctest .DefaultEmailAddress )
44- if err != nil {
45- t .Fatal (err )
46- return
47- }
48- fmt .Println (vmClusterTestResource .testAccCloudVmClusterConfigBasic (vmClusterTestResource .exaInfra (exaInfraRName ), vmClusterTestResource .odbNetwork (odbNetRName ), vmcRName , publicKey ))
49- }
50-
5138func TestAccODBCloudVmCluster_basic (t * testing.T ) {
5239 ctx := acctest .Context (t )
5340 if testing .Short () {
@@ -69,7 +56,6 @@ func TestAccODBCloudVmCluster_basic(t *testing.T) {
6956 resource .ParallelTest (t , resource.TestCase {
7057 PreCheck : func () {
7158 acctest .PreCheck (ctx , t )
72- //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID)
7359 vmClusterTestResource .testAccPreCheck (ctx , t )
7460 },
7561 ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
@@ -112,7 +98,6 @@ func TestAccODBCloudVmClusterCreationWithAllParams(t *testing.T) {
11298 resource .ParallelTest (t , resource.TestCase {
11399 PreCheck : func () {
114100 acctest .PreCheck (ctx , t )
115- //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID)
116101 vmClusterTestResource .testAccPreCheck (ctx , t )
117102 },
118103 ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
@@ -134,10 +119,8 @@ func TestAccODBCloudVmClusterCreationWithAllParams(t *testing.T) {
134119 })
135120}
136121
137- func TestAccODBCloudVmClusterAddRemoveTags (t * testing.T ) {
122+ func Foo (t * testing.T ) {
138123 ctx := acctest .Context (t )
139- // TIP: This is a long-running test guard for tests that run longer than
140- // 300s (5 min) generally.
141124 if testing .Short () {
142125 t .Skip ("skipping long-running test in short mode" )
143126 }
@@ -159,7 +142,6 @@ func TestAccODBCloudVmClusterAddRemoveTags(t *testing.T) {
159142 resource .ParallelTest (t , resource.TestCase {
160143 PreCheck : func () {
161144 acctest .PreCheck (ctx , t )
162- //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID)
163145 vmClusterTestResource .testAccPreCheck (ctx , t )
164146 },
165147 ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
@@ -226,74 +208,6 @@ func TestAccODBCloudVmClusterAddRemoveTags(t *testing.T) {
226208 })
227209}
228210
229- func TestAccODBCloudVmCluster_recreates_new (t * testing.T ) {
230- ctx := acctest .Context (t )
231- // TIP: This is a long-running test guard for tests that run longer than
232- // 300s (5 min) generally.
233- if testing .Short () {
234- t .Skip ("skipping long-running test in short mode" )
235- }
236-
237- var cloudvmcluster1 odbtypes.CloudVmCluster
238- var cloudvmcluster2 odbtypes.CloudVmCluster
239- rName := sdkacctest .RandomWithPrefix (vmClusterTestResource .vmClusterDisplayNamePrefix )
240- exaInfraRName := sdkacctest .RandomWithPrefix (vmClusterTestResource .exaInfraDisplayNamePrefix )
241- odbNetRName := sdkacctest .RandomWithPrefix (vmClusterTestResource .odbNetDisplayNamePrefix )
242-
243- resourceName := "aws_odb_cloud_vm_cluster.test"
244- publicKey , _ , err := sdkacctest .RandSSHKeyPair (acctest .DefaultEmailAddress )
245- if err != nil {
246- t .Fatal (err )
247- return
248- }
249-
250- resource .ParallelTest (t , resource.TestCase {
251- PreCheck : func () {
252- acctest .PreCheck (ctx , t )
253- //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID)
254- vmClusterTestResource .testAccPreCheck (ctx , t )
255- },
256- ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
257- ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
258- CheckDestroy : vmClusterTestResource .testAccCheckCloudVmClusterDestroy (ctx ),
259- Steps : []resource.TestStep {
260- {
261- Config : vmClusterTestResource .testAccCloudVmClusterConfigBasic (vmClusterTestResource .exaInfra (exaInfraRName ), vmClusterTestResource .odbNetwork (odbNetRName ), rName , publicKey ),
262- Check : resource .ComposeAggregateTestCheckFunc (
263- resource .ComposeTestCheckFunc (func (state * terraform.State ) error {
264- //fmt.Println(state)
265- return nil
266- }),
267- vmClusterTestResource .testAccCheckCloudVmClusterExists (ctx , resourceName , & cloudvmcluster1 ),
268- resource .TestCheckResourceAttr (resourceName , "tags.%" , "1" ),
269- resource .TestCheckResourceAttr (resourceName , "tags.env" , "dev" ),
270- ),
271- },
272- {
273- Config : vmClusterTestResource .testAccCloudVmClusterConfigUpdatedTags (vmClusterTestResource .exaInfra (exaInfraRName + "_u" ), vmClusterTestResource .odbNetwork (odbNetRName ), rName , publicKey ),
274- Check : resource .ComposeAggregateTestCheckFunc (
275- resource .TestCheckResourceAttr (resourceName , "tags.%" , "2" ),
276- resource .TestCheckResourceAttr (resourceName , "tags.env" , "dev" ),
277- resource .TestCheckResourceAttr (resourceName , "tags.foo" , "bar" ),
278- vmClusterTestResource .testAccCheckCloudVmClusterExists (ctx , resourceName , & cloudvmcluster2 ),
279- resource .ComposeTestCheckFunc (func (state * terraform.State ) error {
280- //fmt.Println(state)
281- if strings .Compare (* (cloudvmcluster1 .CloudVmClusterId ), * (cloudvmcluster2 .CloudVmClusterId )) == 0 {
282- return errors .New ("Should create a new cloud vm cluster for tag update" )
283- }
284- return nil
285- }),
286- ),
287- },
288- {
289- ResourceName : resourceName ,
290- ImportState : true ,
291- ImportStateVerify : true ,
292- },
293- },
294- })
295- }
296-
297211func TestAccODBCloudVmCluster_disappears (t * testing.T ) {
298212 ctx := acctest .Context (t )
299213 if testing .Short () {
@@ -314,7 +228,6 @@ func TestAccODBCloudVmCluster_disappears(t *testing.T) {
314228 resource .ParallelTest (t , resource.TestCase {
315229 PreCheck : func () {
316230 acctest .PreCheck (ctx , t )
317- //acctest.PreCheckPartitionHasService(t, names.ODBEndpointID)
318231 vmClusterTestResource .testAccPreCheck (ctx , t )
319232 },
320233 ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
@@ -396,16 +309,6 @@ func (cloudVmClusterResourceTest) testAccPreCheck(ctx context.Context, t *testin
396309 }
397310}
398311
399- /*func testAccCheckCloudVmClusterNotRecreated(before, after *odb.DescribeCloudVmClusterResponse) resource.TestCheckFunc {
400- return func(s *terraform.State) error {
401- if before, after := aws.ToString(before.CloudVmClusterId), aws.ToString(after.CloudVmClusterId); before != after {
402- return create.Error(names.ODB, create.ErrActionCheckingNotRecreated, tfodb.ResNameCloudVmCluster, aws.ToString(before.CloudVmClusterId), errors.New("recreated"))
403- }
404-
405- return nil
406- }
407- }*/
408-
409312func (cloudVmClusterResourceTest ) testAccCloudVmClusterConfigBasic (exaInfra , odbNet , rName , sshKey string ) string {
410313
411314 res := fmt .Sprintf (`
0 commit comments