mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: removing stray "Ecache" in tests
This commit is contained in:
parent
cebcee5c63
commit
6c6eafa232
@ -21,7 +21,7 @@ func TestAccAWSElasticacheCluster(t *testing.T) {
|
||||
resource.TestStep{
|
||||
Config: testAccAWSElasticacheClusterConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSEcacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
||||
testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
||||
testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar"),
|
||||
),
|
||||
},
|
||||
@ -38,7 +38,7 @@ func TestAccAWSElasticacheCluster_vpc(t *testing.T) {
|
||||
resource.TestStep{
|
||||
Config: testAccAWSElasticacheClusterInVPCConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSEcacheSubnetGroupExists("aws_elasticache_subnet_group.bar"),
|
||||
testAccCheckAWSElasticacheSubnetGroupExists("aws_elasticache_subnet_group.bar"),
|
||||
testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar"),
|
||||
),
|
||||
},
|
||||
|
@ -10,23 +10,23 @@ import (
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
)
|
||||
|
||||
func TestAccAWSEcacheSecurityGroup(t *testing.T) {
|
||||
func TestAccAWSElasticacheSecurityGroup(t *testing.T) {
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEcacheSecurityGroupDestroy,
|
||||
CheckDestroy: testAccCheckAWSElasticacheSecurityGroupDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSEcacheSecurityGroupConfig,
|
||||
Config: testAccAWSElasticacheSecurityGroupConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSEcacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
||||
testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func testAccCheckAWSEcacheSecurityGroupDestroy(s *terraform.State) error {
|
||||
func testAccCheckAWSElasticacheSecurityGroupDestroy(s *terraform.State) error {
|
||||
conn := testAccProvider.Meta().(*AWSClient).elasticacheconn
|
||||
|
||||
for _, rs := range s.RootModule().Resources {
|
||||
@ -46,7 +46,7 @@ func testAccCheckAWSEcacheSecurityGroupDestroy(s *terraform.State) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func testAccCheckAWSEcacheSecurityGroupExists(n string) resource.TestCheckFunc {
|
||||
func testAccCheckAWSElasticacheSecurityGroupExists(n string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[n]
|
||||
if !ok {
|
||||
@ -68,7 +68,7 @@ func testAccCheckAWSEcacheSecurityGroupExists(n string) resource.TestCheckFunc {
|
||||
}
|
||||
}
|
||||
|
||||
var testAccAWSEcacheSecurityGroupConfig = fmt.Sprintf(`
|
||||
var testAccAWSElasticacheSecurityGroupConfig = fmt.Sprintf(`
|
||||
resource "aws_security_group" "bar" {
|
||||
name = "tf-test-security-group-%03d"
|
||||
description = "tf-test-security-group-descr"
|
||||
|
@ -10,23 +10,23 @@ import (
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
)
|
||||
|
||||
func TestAccAWSEcacheSubnetGroup(t *testing.T) {
|
||||
func TestAccAWSElasticacheSubnetGroup(t *testing.T) {
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEcacheSubnetGroupDestroy,
|
||||
CheckDestroy: testAccCheckAWSElasticacheSubnetGroupDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSEcacheSubnetGroupConfig,
|
||||
Config: testAccAWSElasticacheSubnetGroupConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSEcacheSubnetGroupExists("aws_elasticache_subnet_group.bar"),
|
||||
testAccCheckAWSElasticacheSubnetGroupExists("aws_elasticache_subnet_group.bar"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func testAccCheckAWSEcacheSubnetGroupDestroy(s *terraform.State) error {
|
||||
func testAccCheckAWSElasticacheSubnetGroupDestroy(s *terraform.State) error {
|
||||
conn := testAccProvider.Meta().(*AWSClient).elasticacheconn
|
||||
|
||||
for _, rs := range s.RootModule().Resources {
|
||||
@ -46,7 +46,7 @@ func testAccCheckAWSEcacheSubnetGroupDestroy(s *terraform.State) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func testAccCheckAWSEcacheSubnetGroupExists(n string) resource.TestCheckFunc {
|
||||
func testAccCheckAWSElasticacheSubnetGroupExists(n string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[n]
|
||||
if !ok {
|
||||
@ -68,7 +68,7 @@ func testAccCheckAWSEcacheSubnetGroupExists(n string) resource.TestCheckFunc {
|
||||
}
|
||||
}
|
||||
|
||||
var testAccAWSEcacheSubnetGroupConfig = fmt.Sprintf(`
|
||||
var testAccAWSElasticacheSubnetGroupConfig = fmt.Sprintf(`
|
||||
resource "aws_vpc" "foo" {
|
||||
cidr_block = "192.168.1.1/16"
|
||||
tags {
|
||||
|
Loading…
Reference in New Issue
Block a user