Skip to content

Commit

Permalink
username test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
simisoft-exo committed Nov 20, 2024
1 parent d63529f commit 55fe46e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/resources/database/datasource_uri_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func testDataSourceURI(t *testing.T) {
}

fullResourceName := "data.exoscale_database_uri.test"
pgUsername := acctest.RandomWithPrefix(testutils.TestUsername)
data := DataSourceURIModel{
ResourceName: "test",
Name: "exoscale_database.test.name",
Expand All @@ -44,7 +45,7 @@ func testDataSourceURI(t *testing.T) {
Plan: "hobbyist-2",
Zone: testutils.TestZoneName,
TerminationProtection: false,
AdminUsername: acctest.RandomWithPrefix(testutils.TestUsername),
AdminUsername: pgUsername,
}
buf := &bytes.Buffer{}
err = tplResourcePg.Execute(buf, &resourcePg)
Expand All @@ -71,7 +72,7 @@ func testDataSourceURI(t *testing.T) {
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrSet(fullResourceName, "uri"),
resource.TestCheckResourceAttr(fullResourceName, "schema", "postgres"),
resource.TestCheckResourceAttr(fullResourceName, "username", "avnadmin"),
resource.TestCheckResourceAttr(fullResourceName, "username", pgUsername),
resource.TestCheckResourceAttrSet(fullResourceName, "password"),
resource.TestCheckResourceAttrSet(fullResourceName, "host"),
resource.TestCheckResourceAttrSet(fullResourceName, "port"),
Expand Down

0 comments on commit 55fe46e

Please sign in to comment.