Skip to content

Instantly share code, notes, and snippets.

@alexkappa
Created December 8, 2020 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexkappa/adca2fbae286dabe1fcfce5e2682c544 to your computer and use it in GitHub Desktop.
Save alexkappa/adca2fbae286dabe1fcfce5e2682c544 to your computer and use it in GitHub Desktop.
func TestAccClientIssue295(t *testing.T) {
rand := random.String(6)
resource.Test(t, resource.TestCase{
Providers: map[string]terraform.ResourceProvider{
"auth0": Provider(),
},
Steps: []resource.TestStep{
{
Config: random.Template(testAccClientIssue295, rand),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("auth0_client.my_client", "description", "Something"),
),
},
{
Config: random.Template(testAccClientIssue295Update, rand),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("auth0_client.my_client", "description", ""),
),
},
},
})
}
const testAccClientIssue295 = `
resource "auth0_client" "my_client" {
name = "Acceptance Test - Issue #295 - {{.random}}"
description = "Something"
}
`
const testAccClientIssue295Update = `
resource "auth0_client" "my_client" {
name = "Acceptance Test - Issue #295 - {{.random}}"
description = ""
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment