Skip to content

Commit

Permalink
Correct acceptance tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Nov 7, 2023
1 parent 79c2139 commit 4db0400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/service/athena/named_query_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestAccAthenaNamedQueryDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"),
resource.TestCheckResourceAttrPair(dataSourceName, "id", resourceName, "id"),
resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"),
resource.TestCheckResourceAttrPair(dataSourceName, "querystring", resourceName, "querystring"),
resource.TestCheckResourceAttrPair(dataSourceName, "query", resourceName, "querystring"),
resource.TestCheckResourceAttrPair(dataSourceName, "workgroup", resourceName, "workgroup"),
),
},
Expand Down
8 changes: 6 additions & 2 deletions internal/service/athena/named_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,16 @@ resource "aws_athena_named_query" "test" {

func testAccNamedQueryConfig_workGroup(rInt int, rName string) string {
return acctest.ConfigCompose(testAccNamedQueryConfig_base(rInt, rName), fmt.Sprintf(`
resource "aws_athena_workgroup" "test" {
name = "%[3]s-%[1]s-%[2]d"
}
resource "aws_athena_named_query" "test" {
name = "%[2]s-%[1]s"
name = "%[3]s-%[1]s"
workgroup = aws_athena_workgroup.test.id
database = aws_athena_database.test.name
query = "SELECT * FROM ${aws_athena_database.test.name} limit 10;"
description = "tf test"
}
`, rName, acctest.ResourcePrefix))
`, rName, rInt, acctest.ResourcePrefix))
}

0 comments on commit 4db0400

Please sign in to comment.