diff --git a/internal/auth0/prompt/resource_partials_test.go b/internal/auth0/prompt/resource_partials_test.go index 3a93fb8cd..8a5b39fd4 100644 --- a/internal/auth0/prompt/resource_partials_test.go +++ b/internal/auth0/prompt/resource_partials_test.go @@ -24,6 +24,10 @@ func TestAccPromptPartials(t *testing.T) { _ = givenACustomDomain(t) _ = givenAUniversalLogin(t) + t.Cleanup(func() { + cleanupPartialsPrompt(t, management.PartialsPromptSegment("login")) + }) + acctest.Test(t, resource.TestCase{ Steps: []resource.TestStep{ { @@ -95,6 +99,13 @@ func cleanupUniversalLogin(t *testing.T) { assert.NoError(t, err) } +func cleanupPartialsPrompt(t *testing.T, prompt management.PartialsPromptSegment) { + t.Helper() + + err := manager.Prompt.DeletePartials(context.Background(), &management.PartialsPrompt{Segment: prompt}) + assert.NoError(t, err) +} + const testAccPromptPartialsCreate = ` resource "auth0_prompt_partials" "prompt_partials" { prompt = "login" diff --git a/test/data/recordings/TestAccPromptPartials.yaml b/test/data/recordings/TestAccPromptPartials.yaml index bf7a08b60..87ee77742 100644 --- a/test/data/recordings/TestAccPromptPartials.yaml +++ b/test/data/recordings/TestAccPromptPartials.yaml @@ -36,7 +36,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 222.968333ms + duration: 221.101125ms - id: 1 request: proto: HTTP/1.1 @@ -72,4 +72,4 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 203.252792ms + duration: 235.378875ms