Merge pull request #1 from jtopjian/openstack-icmp-0
Adding acceptance test for ICMP types of 0
diff --git a/acceptance/openstack/compute/v2/secgroup_test.go b/acceptance/openstack/compute/v2/secgroup_test.go
index 4f50739..6ec3149 100644
--- a/acceptance/openstack/compute/v2/secgroup_test.go
+++ b/acceptance/openstack/compute/v2/secgroup_test.go
@@ -107,6 +107,24 @@
th.AssertNoErr(t, err)
t.Logf("Deleted rule %s from group %s", rule.ID, id)
+
+ icmpOpts := secgroups.CreateRuleOpts{
+ ParentGroupID: id,
+ FromPort: 0,
+ ToPort: 0,
+ IPProtocol: "ICMP",
+ CIDR: "0.0.0.0/0",
+ }
+
+ icmpRule, err := secgroups.CreateRule(client, icmpOpts).Extract()
+ th.AssertNoErr(t, err)
+
+ t.Logf("Adding ICMP rule %s to group %s", icmpRule.ID, id)
+
+ err = secgroups.DeleteRule(client, icmpRule.ID).ExtractErr()
+ th.AssertNoErr(t, err)
+
+ t.Logf("Deleted ICMP rule %s from group %s", icmpRule.ID, id)
}
func findServer(t *testing.T, client *gophercloud.ServiceClient) (string, bool) {