mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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:
parent
10fc184c97
commit
d81e63cc3c
@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAWSElasticacheCluster(t *testing.T) {
|
func TestAccAWSElasticacheCluster_basic(t *testing.T) {
|
||||||
resource.Test(t, resource.TestCase{
|
resource.Test(t, resource.TestCase{
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
@ -24,7 +24,7 @@ func TestAccAWSElasticacheCluster(t *testing.T) {
|
|||||||
testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
||||||
testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar"),
|
testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar"),
|
||||||
resource.TestCheckResourceAttr(
|
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(`
|
var testAccAWSElasticacheClusterConfig = fmt.Sprintf(`
|
||||||
|
provider "aws" {
|
||||||
|
region = "us-east-1"
|
||||||
|
}
|
||||||
resource "aws_security_group" "bar" {
|
resource "aws_security_group" "bar" {
|
||||||
name = "tf-test-security-group-%03d"
|
name = "tf-test-security-group-%03d"
|
||||||
description = "tf-test-security-group-descr"
|
description = "tf-test-security-group-descr"
|
||||||
|
Loading…
Reference in New Issue
Block a user