Skip to content

Commit

Permalink
provider/aws: ElastiCache test updates
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
catsby committed May 14, 2015
1 parent 10fc184 commit d81e63c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"),
),
},
},
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d81e63c

Please sign in to comment.