Skip to content

Commit 061812f

Browse files
chore(tests): fix network test
1 parent 0a46691 commit 061812f

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

cloudstack/resource_cloudstack_network_test.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ func TestAccCloudStackNetwork_updateACL(t *testing.T) {
106106
testAccCheckCloudStackNetworkVPCAttributes(&network),
107107
),
108108
},
109-
110109
{
111110
Config: testAccCloudStackNetwork_updateACL,
112111
Check: resource.ComposeTestCheckFunc(
@@ -115,6 +114,14 @@ func TestAccCloudStackNetwork_updateACL(t *testing.T) {
115114
testAccCheckCloudStackNetworkVPCAttributes(&network),
116115
),
117116
},
117+
{
118+
Config: testAccCloudStackNetwork_updateACL_cleanup,
119+
Check: resource.ComposeTestCheckFunc(
120+
testAccCheckCloudStackNetworkExists(
121+
"cloudstack_network.foo", &network),
122+
testAccCheckCloudStackNetworkVPCAttributes(&network),
123+
),
124+
},
118125
},
119126
})
120127
}
@@ -333,6 +340,34 @@ resource "cloudstack_network_acl" "bar" {
333340
vpc_id = cloudstack_vpc.foo.id
334341
}
335342
343+
resource "cloudstack_network_acl" "foo" {
344+
name = "foo"
345+
vpc_id = cloudstack_vpc.foo.id
346+
}
347+
348+
resource "cloudstack_network" "foo" {
349+
name = "terraform-network"
350+
display_text = "terraform-network"
351+
cidr = "10.1.1.0/24"
352+
network_offering = "DefaultIsolatedNetworkOfferingForVpcNetworks"
353+
vpc_id = cloudstack_vpc.foo.id
354+
acl_id = cloudstack_network_acl.bar.id
355+
zone = cloudstack_vpc.foo.zone
356+
}`
357+
358+
const testAccCloudStackNetwork_updateACL_cleanup = `
359+
resource "cloudstack_vpc" "foo" {
360+
name = "terraform-vpc"
361+
cidr = "10.0.0.0/8"
362+
vpc_offering = "Default VPC offering"
363+
zone = "Sandbox-simulator"
364+
}
365+
366+
resource "cloudstack_network_acl" "bar" {
367+
name = "bar"
368+
vpc_id = cloudstack_vpc.foo.id
369+
}
370+
336371
resource "cloudstack_network" "foo" {
337372
name = "terraform-network"
338373
display_text = "terraform-network"

0 commit comments

Comments
 (0)