Skip to content

Commit 3bcb066

Browse files
committed
fix test
1 parent 1ea84b4 commit 3bcb066

File tree

3 files changed

+302
-288
lines changed

3 files changed

+302
-288
lines changed

internal/services/tem/domain_validation.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func ResourceDomainValidationCreate(ctx context.Context, d *schema.ResourceData,
9595
})
9696
if domainCheck == nil || domainCheck.Status == "pending" || domainCheck.Status == "unchecked" || domainCheck.Status == "autoconfiguring" {
9797
d.SetId("")
98+
9899
return diag.Errorf("domain validation did not complete in %d seconds", duration)
99100
}
100101

internal/services/tem/domain_validation_test.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,6 @@ import (
1111

1212
const domainNameValidation = "scaleway-terraform.com"
1313

14-
func TestAccDomainValidation_NoValidation(t *testing.T) {
15-
tt := acctest.NewTestTools(t)
16-
defer tt.Cleanup()
17-
18-
subDomainName := "validation-no-validation"
19-
20-
resource.ParallelTest(t, resource.TestCase{
21-
PreCheck: func() { acctest.PreCheck(t) },
22-
ProviderFactories: tt.ProviderFactories,
23-
CheckDestroy: isDomainDestroyed(tt),
24-
Steps: []resource.TestStep{
25-
{
26-
Config: fmt.Sprintf(`
27-
28-
resource "scaleway_domain_zone" "test" {
29-
domain = "%s"
30-
subdomain = "%s"
31-
}
32-
33-
resource scaleway_tem_domain cr01 {
34-
name = scaleway_domain_zone.test.id
35-
accept_tos = true
36-
}
37-
38-
resource scaleway_tem_domain_validation valid {
39-
domain_id = scaleway_tem_domain.cr01.id
40-
region = scaleway_tem_domain.cr01.region
41-
timeout = 1
42-
}
43-
`, domainNameValidation, subDomainName),
44-
Check: resource.ComposeTestCheckFunc(
45-
resource.TestCheckResourceAttr("scaleway_tem_domain_validation.valid", "validated", "false"),
46-
),
47-
},
48-
},
49-
})
50-
}
51-
5214
func TestAccDomainValidation_Validation(t *testing.T) {
5315
tt := acctest.NewTestTools(t)
5416
defer tt.Cleanup()

0 commit comments

Comments
 (0)