@@ -38,6 +38,7 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
3838 {
3939 Config : testAccCloudStackNetworkACLRule_basic ,
4040 Check : resource .ComposeTestCheckFunc (
41+
4142 testAccCheckCloudStackNetworkACLRulesExist ("cloudstack_network_acl.foo" ),
4243 resource .TestCheckResourceAttr (
4344 "cloudstack_network_acl_rule.foo" , "rule.#" , "3" ),
@@ -55,6 +56,10 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
5556 "cloudstack_network_acl_rule.foo" , "rule.0.ports.0" , "443" ),
5657 resource .TestCheckResourceAttr (
5758 "cloudstack_network_acl_rule.foo" , "rule.0.traffic_type" , "ingress" ),
59+ resource .TestCheckResourceAttr (
60+ "cloudstack_network_acl_rule.foo" , "rule.0.description" , "Allow HTTP and HTTPS" ),
61+ resource .TestCheckResourceAttr (
62+ "cloudstack_network_acl_rule.foo" , "rule.1.rule_number" , "20" ),
5863 resource .TestCheckResourceAttr (
5964 "cloudstack_network_acl_rule.foo" , "rule.1.action" , "allow" ),
6065 resource .TestCheckResourceAttr (
@@ -67,6 +72,12 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
6772 "cloudstack_network_acl_rule.foo" , "rule.1.icmp_type" , "-1" ),
6873 resource .TestCheckResourceAttr (
6974 "cloudstack_network_acl_rule.foo" , "rule.1.traffic_type" , "ingress" ),
75+ resource .TestCheckResourceAttr (
76+ "cloudstack_network_acl_rule.foo" , "rule.1.description" , "Allow ICMP traffic" ),
77+ resource .TestCheckResourceAttr (
78+ "cloudstack_network_acl_rule.foo" , "rule.2.rule_number" , "10" ),
79+ resource .TestCheckResourceAttr (
80+ "cloudstack_network_acl_rule.foo" , "rule.2.description" , "Allow all traffic" ),
7081 ),
7182 },
7283 },
@@ -85,8 +96,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
8596 testAccCheckCloudStackNetworkACLRulesExist ("cloudstack_network_acl.foo" ),
8697 resource .TestCheckResourceAttr (
8798 "cloudstack_network_acl_rule.foo" , "rule.#" , "3" ),
88- resource .TestCheckResourceAttr (
89- "cloudstack_network_acl_rule.foo" , "rule.0.rule_number" , "10" ),
9099 resource .TestCheckResourceAttr (
91100 "cloudstack_network_acl_rule.foo" , "rule.0.action" , "allow" ),
92101 resource .TestCheckResourceAttr (
@@ -101,8 +110,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
101110 "cloudstack_network_acl_rule.foo" , "rule.0.ports.0" , "443" ),
102111 resource .TestCheckResourceAttr (
103112 "cloudstack_network_acl_rule.foo" , "rule.0.traffic_type" , "ingress" ),
104- resource .TestCheckResourceAttr (
105- "cloudstack_network_acl_rule.foo" , "rule.0.description" , "Allow all traffic" ),
106113 resource .TestCheckResourceAttr (
107114 "cloudstack_network_acl_rule.foo" , "rule.1.rule_number" , "20" ),
108115 resource .TestCheckResourceAttr (
@@ -117,10 +124,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
117124 "cloudstack_network_acl_rule.foo" , "rule.1.icmp_type" , "-1" ),
118125 resource .TestCheckResourceAttr (
119126 "cloudstack_network_acl_rule.foo" , "rule.1.traffic_type" , "ingress" ),
120- resource .TestCheckResourceAttr (
121- "cloudstack_network_acl_rule.foo" , "rule.1.description" , "Allow ICMP traffic" ),
122- resource .TestCheckResourceAttr (
123- "cloudstack_network_acl_rule.foo" , "rule.2.description" , "Allow HTTP and HTTPS" ),
124127 ),
125128 },
126129
0 commit comments