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
This commit is contained in:
Clint Shryock 2015-05-14 13:57:01 -05:00
parent 10fc184c97
commit d81e63cc3c
1 changed files with 5 additions and 2 deletions

View File

@ -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"