Skip to content

Commit

Permalink
provider: removing the resource schema exceptions when in 4.0 mode
Browse files Browse the repository at this point in the history
This'll make this obvious when we look to enable the feature-flags
  • Loading branch information
tombuildsstuff committed Feb 14, 2023
1 parent f11aa71 commit 1915bb4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/provider/provider_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform-provider-azurerm/internal/features"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
)
Expand Down Expand Up @@ -162,6 +164,9 @@ func TestResourcesHaveEnabledFieldsMarkedAsBooleans(t *testing.T) {
"recommendations_enabled": {},
},
}
if features.FourPointOhBeta() {
resourceFieldsWhichNeedToBeAddressed = map[string]map[string]struct{}{}
}

for _, resourceName := range resourceNames {
resource := provider.ResourcesMap[resourceName]
Expand Down Expand Up @@ -302,6 +307,9 @@ func TestResourcesDoNotContainANameFieldWithADefaultOfDefault(t *testing.T) {
"name": {},
},
}
if features.FourPointOhBeta() {
resourceFieldsWhichNeedToBeAddressed = map[string]map[string]struct{}{}
}

for _, resourceName := range resourceNames {
resource := provider.ResourcesMap[resourceName]
Expand Down Expand Up @@ -410,6 +418,9 @@ func TestDataSourcesWithAnEncryptionBlockBehaveConsistently(t *testing.T) {
"azurerm_managed_disk": {},
"azurerm_snapshot": {},
}
if features.FourPointOhBeta() {
dataSourcesWhichNeedToBeAddressed = map[string]struct{}{}
}

for _, dataSourceName := range dataSourceNames {
dataSource := provider.DataSourcesMap[dataSourceName]
Expand Down Expand Up @@ -450,6 +461,9 @@ func TestResourcesWithAnEncryptionBlockBehaveConsistently(t *testing.T) {
"azurerm_media_services_account": {},
"azurerm_snapshot": {},
}
if features.FourPointOhBeta() {
resourcesWhichNeedToBeAddressed = map[string]struct{}{}
}

for _, resourceName := range resourceNames {
resource := provider.ResourcesMap[resourceName]
Expand Down

0 comments on commit 1915bb4

Please sign in to comment.