Skip to content

Commit

Permalink
Remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
YakDriver committed Aug 11, 2022
1 parent 443dbdb commit 58a8065
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions internal/service/dynamodb/table_replica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestAccDynamoDBTableReplica_basic(t *testing.T) {
t.Skip("skipping long-running test in short mode")
}

var conf dynamodb.DescribeTableOutput
resourceName := "aws_dynamodb_table_replica.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -37,7 +36,7 @@ func TestAccDynamoDBTableReplica_basic(t *testing.T) {
{
Config: testAccTableReplicaConfig_basic(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "tags.%", "2"),
),
},
Expand All @@ -55,7 +54,6 @@ func TestAccDynamoDBTableReplica_disappears(t *testing.T) {
t.Skip("skipping long-running test in short mode")
}

var table1 dynamodb.DescribeTableOutput
resourceName := "aws_dynamodb_table_replica.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -68,7 +66,7 @@ func TestAccDynamoDBTableReplica_disappears(t *testing.T) {
{
Config: testAccTableReplicaConfig_basic(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &table1),
testAccCheckTableReplicaExists(resourceName),
acctest.CheckResourceDisappears(acctest.Provider, tfdynamodb.ResourceTableReplica(), resourceName),
),
ExpectNonEmptyPlan: true,
Expand All @@ -82,7 +80,6 @@ func TestAccDynamoDBTableReplica_pitr(t *testing.T) {
t.Skip("skipping long-running test in short mode")
}

var conf dynamodb.DescribeTableOutput
resourceName := "aws_dynamodb_table_replica.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -95,7 +92,7 @@ func TestAccDynamoDBTableReplica_pitr(t *testing.T) {
{
Config: testAccTableReplicaConfig_pitr(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "point_in_time_recovery", "true"),
),
},
Expand All @@ -113,7 +110,6 @@ func TestAccDynamoDBTableReplica_tags(t *testing.T) {
t.Skip("skipping long-running test in short mode")
}

var conf dynamodb.DescribeTableOutput
resourceName := "aws_dynamodb_table_replica.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -126,7 +122,7 @@ func TestAccDynamoDBTableReplica_tags(t *testing.T) {
{
Config: testAccTableReplicaConfig_tags1(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "tags.%", "2"),
resource.TestCheckResourceAttr(resourceName, "tags.tape", "Valladolid"),
),
Expand All @@ -139,7 +135,7 @@ func TestAccDynamoDBTableReplica_tags(t *testing.T) {
{
Config: testAccTableReplicaConfig_tags2(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "tags.%", "5"),
resource.TestCheckResourceAttr(resourceName, "tags.arise", "Melandru"),
resource.TestCheckResourceAttr(resourceName, "tags.brightest", "Lights"),
Expand All @@ -156,7 +152,7 @@ func TestAccDynamoDBTableReplica_tags(t *testing.T) {
{
Config: testAccTableReplicaConfig_tags3(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
resource.TestCheckResourceAttr(resourceName, "tags.Name", rName),
),
Expand All @@ -175,7 +171,6 @@ func TestAccDynamoDBTableReplica_tableClass(t *testing.T) {
t.Skip("skipping long-running test in short mode")
}

var conf dynamodb.DescribeTableOutput
resourceName := "aws_dynamodb_table_replica.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -188,7 +183,7 @@ func TestAccDynamoDBTableReplica_tableClass(t *testing.T) {
{
Config: testAccTableReplicaConfig_tableClass(rName, "STANDARD"),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "table_class_override", "STANDARD"),
),
},
Expand All @@ -200,7 +195,7 @@ func TestAccDynamoDBTableReplica_tableClass(t *testing.T) {
{
Config: testAccTableReplicaConfig_tableClass(rName, "STANDARD_INFREQUENT_ACCESS"),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckTableReplicaExists(resourceName, &conf),
testAccCheckTableReplicaExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "table_class_override", "STANDARD_INFREQUENT_ACCESS"),
),
},
Expand Down Expand Up @@ -263,7 +258,7 @@ func testAccCheckTableReplicaDestroy(s *terraform.State) error {
return nil
}

func testAccCheckTableReplicaExists(n string, table *dynamodb.DescribeTableOutput) resource.TestCheckFunc {
func testAccCheckTableReplicaExists(n string) resource.TestCheckFunc {
return func(s *terraform.State) error {
log.Printf("[DEBUG] Trying to create initial table replica state!")
rs, ok := s.RootModule().Resources[n]
Expand Down

0 comments on commit 58a8065

Please sign in to comment.