Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource - fix test for 4.0 #26842

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions internal/services/resource/template_deployment_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/utils"
)

type TemplateDeploymentResource struct{}

func TestAccTemplateDeployment_basic(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -37,6 +42,10 @@ func TestAccTemplateDeployment_basic(t *testing.T) {
}

func TestAccTemplateDeployment_requiresImport(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -52,6 +61,10 @@ func TestAccTemplateDeployment_requiresImport(t *testing.T) {
}

func TestAccTemplateDeployment_disappears(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -64,6 +77,10 @@ func TestAccTemplateDeployment_disappears(t *testing.T) {
}

func TestAccTemplateDeployment_nestedTemplate(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -78,6 +95,10 @@ func TestAccTemplateDeployment_nestedTemplate(t *testing.T) {
}

func TestAccTemplateDeployment_withParams(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -93,6 +114,10 @@ func TestAccTemplateDeployment_withParams(t *testing.T) {
}

func TestAccTemplateDeployment_withParamsBody(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -108,6 +133,10 @@ func TestAccTemplateDeployment_withParamsBody(t *testing.T) {
}

func TestAccTemplateDeployment_withOutputs(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand All @@ -132,6 +161,10 @@ func TestAccTemplateDeployment_withOutputs(t *testing.T) {
}

func TestAccTemplateDeployment_withError(t *testing.T) {
if features.FivePointOhBeta() {
t.Skip("The resource 'azurerm_template_deployment' has been superseded by the 'azurerm_resource_group_template_deployment' resource and will be removed in v4.0 of the AzureRM Provider.")
}

data := acceptance.BuildTestData(t, "azurerm_template_deployment", "test")
r := TemplateDeploymentResource{}

Expand Down
Loading