@@ -38,6 +38,7 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
38
38
{
39
39
Config : testAccCloudStackNetworkACLRule_basic ,
40
40
Check : resource .ComposeTestCheckFunc (
41
+
41
42
testAccCheckCloudStackNetworkACLRulesExist ("cloudstack_network_acl.foo" ),
42
43
resource .TestCheckResourceAttr (
43
44
"cloudstack_network_acl_rule.foo" , "rule.#" , "3" ),
@@ -55,6 +56,10 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
55
56
"cloudstack_network_acl_rule.foo" , "rule.0.ports.0" , "443" ),
56
57
resource .TestCheckResourceAttr (
57
58
"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" ),
58
63
resource .TestCheckResourceAttr (
59
64
"cloudstack_network_acl_rule.foo" , "rule.1.action" , "allow" ),
60
65
resource .TestCheckResourceAttr (
@@ -67,6 +72,12 @@ func TestAccCloudStackNetworkACLRule_basic(t *testing.T) {
67
72
"cloudstack_network_acl_rule.foo" , "rule.1.icmp_type" , "-1" ),
68
73
resource .TestCheckResourceAttr (
69
74
"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" ),
70
81
),
71
82
},
72
83
},
@@ -85,8 +96,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
85
96
testAccCheckCloudStackNetworkACLRulesExist ("cloudstack_network_acl.foo" ),
86
97
resource .TestCheckResourceAttr (
87
98
"cloudstack_network_acl_rule.foo" , "rule.#" , "3" ),
88
- resource .TestCheckResourceAttr (
89
- "cloudstack_network_acl_rule.foo" , "rule.0.rule_number" , "10" ),
90
99
resource .TestCheckResourceAttr (
91
100
"cloudstack_network_acl_rule.foo" , "rule.0.action" , "allow" ),
92
101
resource .TestCheckResourceAttr (
@@ -101,8 +110,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
101
110
"cloudstack_network_acl_rule.foo" , "rule.0.ports.0" , "443" ),
102
111
resource .TestCheckResourceAttr (
103
112
"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" ),
106
113
resource .TestCheckResourceAttr (
107
114
"cloudstack_network_acl_rule.foo" , "rule.1.rule_number" , "20" ),
108
115
resource .TestCheckResourceAttr (
@@ -117,10 +124,6 @@ func TestAccCloudStackNetworkACLRule_update(t *testing.T) {
117
124
"cloudstack_network_acl_rule.foo" , "rule.1.icmp_type" , "-1" ),
118
125
resource .TestCheckResourceAttr (
119
126
"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" ),
124
127
),
125
128
},
126
129
0 commit comments