diff --git a/internal/provider/data_source_machine_test.go b/internal/provider/data_source_machine_test.go index 696821c3..d23476e7 100644 --- a/internal/provider/data_source_machine_test.go +++ b/internal/provider/data_source_machine_test.go @@ -31,7 +31,7 @@ func TestAcc_DataSourceMachine_Edge(t *testing.T) { }) } -func TestAcc_DataSourceMachine_Stable(t *testing.T) { +func TestAcc_DataSourceMachine_UpgradeProvider(t *testing.T) { if testingCloud != LXDCloudTesting { t.Skip(t.Name() + " only runs with LXD") } @@ -39,19 +39,25 @@ func TestAcc_DataSourceMachine_Stable(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - ExternalProviders: map[string]resource.ExternalProvider{ - "juju": { - VersionConstraint: TestProviderStableVersion, - Source: "juju/juju", - }, - }, + Steps: []resource.TestStep{ { + ExternalProviders: map[string]resource.ExternalProvider{ + "juju": { + VersionConstraint: TestProviderStableVersion, + Source: "juju/juju", + }, + }, Config: testAccDataSourceMachine(modelName, "series = \"jammy\""), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.juju_machine.machine", "model", modelName), ), }, + { + ProtoV6ProviderFactories: frameworkProviderFactories, + Config: testAccDataSourceMachine(modelName, "series = \"jammy\""), + PlanOnly: true, + }, }, }) } diff --git a/internal/provider/data_source_model_test.go b/internal/provider/data_source_model_test.go index 9d0e8754..deabf247 100644 --- a/internal/provider/data_source_model_test.go +++ b/internal/provider/data_source_model_test.go @@ -29,25 +29,31 @@ func TestAcc_DataSourceModel_Edge(t *testing.T) { }) } -func TestAcc_DataSourceModel_Stable(t *testing.T) { +func TestAcc_DataSourceModel_UpgradeProvider(t *testing.T) { modelName := acctest.RandomWithPrefix("tf-datasource-model-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - ExternalProviders: map[string]resource.ExternalProvider{ - "juju": { - VersionConstraint: TestProviderStableVersion, - Source: "juju/juju", - }, - }, + Steps: []resource.TestStep{ { + ExternalProviders: map[string]resource.ExternalProvider{ + "juju": { + VersionConstraint: TestProviderStableVersion, + Source: "juju/juju", + }, + }, Config: testAccFrameworkDataSourceModel(modelName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.juju_model.test-model", "name", modelName), resource.TestCheckResourceAttrSet("data.juju_model.test-model", "uuid"), ), }, + { + ProtoV6ProviderFactories: frameworkProviderFactories, + Config: testAccFrameworkDataSourceModel(modelName), + PlanOnly: true, + }, }, }) } diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go index cda38b44..6027c911 100644 --- a/internal/provider/provider_test.go +++ b/internal/provider/provider_test.go @@ -21,7 +21,7 @@ import ( "github.com/juju/terraform-provider-juju/internal/juju" ) -const TestProviderStableVersion = "0.10.1" +const TestProviderStableVersion = "0.12.0" // providerFactories are used to instantiate the Framework provider during // acceptance testing.