From 1a2846072c2d4fe52da6483a42c81ca9120b734b Mon Sep 17 00:00:00 2001 From: clint shryock Date: Mon, 28 Mar 2016 13:08:53 -0500 Subject: [PATCH] update tests to cover icmp --- .../resource_aws_security_group_rule_test.go | 3 --- .../aws/resource_aws_security_group_test.go | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/builtin/providers/aws/resource_aws_security_group_rule_test.go b/builtin/providers/aws/resource_aws_security_group_rule_test.go index aee19145b..0e46d02fc 100644 --- a/builtin/providers/aws/resource_aws_security_group_rule_test.go +++ b/builtin/providers/aws/resource_aws_security_group_rule_test.go @@ -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 { diff --git a/builtin/providers/aws/resource_aws_security_group_test.go b/builtin/providers/aws/resource_aws_security_group_test.go index fb3d11cae..2b5f97140 100644 --- a/builtin/providers/aws/resource_aws_security_group_test.go +++ b/builtin/providers/aws/resource_aws_security_group_test.go @@ -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 {