From d81e63cc3c2411077ee629d3ca30cebe36ef4464 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Thu, 14 May 2015 13:57:01 -0500 Subject: [PATCH] provider/aws: ElastiCache test updates - rename test to have _basic suffix, so we can run it individually - use us-east-1 for basic test, since that's probably the only region that has Classic - update the indexing of nodes; cache nodes are 4 digits --- .../providers/aws/resource_aws_elasticache_cluster_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_elasticache_cluster_test.go b/builtin/providers/aws/resource_aws_elasticache_cluster_test.go index 2fa38b140..1fb478b26 100644 --- a/builtin/providers/aws/resource_aws_elasticache_cluster_test.go +++ b/builtin/providers/aws/resource_aws_elasticache_cluster_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSElasticacheCluster(t *testing.T) { +func TestAccAWSElasticacheCluster_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -24,7 +24,7 @@ func TestAccAWSElasticacheCluster(t *testing.T) { testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"), testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar"), resource.TestCheckResourceAttr( - "aws_elasticache_cluster.bar", "cache_nodes.0.id", "001"), + "aws_elasticache_cluster.bar", "cache_nodes.0.id", "0001"), ), }, }, @@ -95,6 +95,9 @@ func genRandInt() int { } var testAccAWSElasticacheClusterConfig = fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} resource "aws_security_group" "bar" { name = "tf-test-security-group-%03d" description = "tf-test-security-group-descr"