update tests to cover icmp

This commit is contained in:
clint shryock 2016-03-28 13:08:53 -05:00
parent e98d7d706f
commit 1a2846072c
2 changed files with 20 additions and 3 deletions

View File

@ -592,9 +592,6 @@ resource "aws_vpc" "tftest" {
}
resource "aws_security_group" "web" {
name = "terraform_acceptance_test_example"
description = "Used in the terraform acceptance tests"
vpc_id = "${aws_vpc.tftest.id}"
tags {

View File

@ -44,6 +44,18 @@ func TestProtocolStateFunc(t *testing.T) {
input: -1,
expected: "",
},
{
input: "1",
expected: "icmp",
},
{
input: "icmp",
expected: "icmp",
},
{
input: 1,
expected: "",
},
}
for _, c := range cases {
result := protocolStateFunc(c.input)
@ -102,6 +114,14 @@ func TestProtocolForValue(t *testing.T) {
input: "ALL",
expected: "-1",
},
{
input: "icMp",
expected: "icmp",
},
{
input: "1",
expected: "icmp",
},
}
for _, c := range cases {