Skip to content

Commit 56ee815

Browse files
committed
Fixed validation tests to notify when they are not working
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
1 parent 72c4117 commit 56ee815

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

github/resource_github_repository_pages_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
1111
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1212
"github.com/hashicorp/terraform-plugin-testing/knownvalue"
13+
"github.com/hashicorp/terraform-plugin-testing/plancheck"
1314
"github.com/hashicorp/terraform-plugin-testing/statecheck"
1415
"github.com/hashicorp/terraform-plugin-testing/tfjsonpath"
1516
)
@@ -269,7 +270,12 @@ source {
269270
ProviderFactories: providerFactories,
270271
Steps: []resource.TestStep{
271272
{
272-
Config: config,
273+
Config: config,
274+
ConfigPlanChecks: resource.ConfigPlanChecks{
275+
PreApply: []plancheck.PlanCheck{
276+
plancheck.ExpectEmptyPlan(),
277+
},
278+
},
273279
ExpectError: regexp.MustCompile(`'source' is not supported for workflow build type`),
274280
},
275281
},
@@ -298,7 +304,12 @@ source {
298304
ProviderFactories: providerFactories,
299305
Steps: []resource.TestStep{
300306
{
301-
Config: config,
307+
Config: config,
308+
ConfigPlanChecks: resource.ConfigPlanChecks{
309+
PreApply: []plancheck.PlanCheck{
310+
plancheck.ExpectEmptyPlan(),
311+
},
312+
},
302313
ExpectError: regexp.MustCompile(`'source' is required for legacy build type`),
303314
},
304315
},

0 commit comments

Comments
 (0)