Skip to content

Commit

Permalink
test: verify datacenterS resource is the same
Browse files Browse the repository at this point in the history
  • Loading branch information
apricote committed Nov 14, 2023
1 parent e42f420 commit 42a5364
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions internal/e2etests/datacenter/data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,48 @@ func TestAccHcloudDataSourceDatacentersTest(t *testing.T) {
},
})
}

func TestAccHcloudDataSourceDatacenters_UpgradePluginFramework(t *testing.T) {
tmplMan := testtemplate.Manager{}

datacentersD := &datacenter.DDataList{}
datacentersD.SetRName("ds")
resource.ParallelTest(t, resource.TestCase{
PreCheck: e2etests.PreCheck(t),
Steps: []resource.TestStep{
{
ExternalProviders: map[string]resource.ExternalProvider{
"hcloud": {
VersionConstraint: "1.44.1",
Source: "hetznercloud/hcloud",
},
"null": {
VersionConstraint: "3.2.1",
Source: "hashicorp/null",
},
},

Config: tmplMan.Render(t,
"testdata/d/hcloud_datacenters", datacentersD,
"testdata/r/null_resource", datacentersD,
),
},
{
ExternalProviders: map[string]resource.ExternalProvider{
"null": {
VersionConstraint: "3.2.1",
Source: "hashicorp/null",
},
},
ProtoV6ProviderFactories: e2etests.ProtoV6ProviderFactories(),

Config: tmplMan.Render(t,
"testdata/d/hcloud_datacenters", datacentersD,
"testdata/r/null_resource", datacentersD,
),

PlanOnly: true,
},
},
})
}

0 comments on commit 42a5364

Please sign in to comment.