Skip to content

Commit

Permalink
fix azurerm_nginx_configuration data source test
Browse files Browse the repository at this point in the history
Now that the NGINXaaS API does not provide a default config, we need to ensure the resource gets created
before referencing the data source, so we don't get config not found errors.
  • Loading branch information
valyria257 committed Jun 3, 2024
1 parent 4833e4c commit b0a5c31
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestAccNginxConfigurationDataSource_basic(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).Key("root_file").Exists(),
check.That(data.ResourceName).Key("config_file").Exists(),
check.That(data.ResourceName).Key("config_file.0.content").Exists(),
),
},
})
Expand All @@ -34,6 +34,8 @@ func (d NginxConfigurationDataSource) basic(data acceptance.TestData) string {
data "azurerm_nginx_configuration" "test" {
nginx_deployment_id = azurerm_nginx_deployment.test.id
depends_on = [azurerm_nginx_configuration.test]
}
`, ConfigurationResource{}.basic(data))
}

0 comments on commit b0a5c31

Please sign in to comment.