From 187faaa06fedded1e551c8671d23169794b612d8 Mon Sep 17 00:00:00 2001 From: Puneet Singh Sarna Date: Wed, 4 Dec 2024 22:41:50 -0800 Subject: [PATCH] Run ephemeral AKV tests as acceptance tests (#28184) Acceptance tests run when the env `TEST_ACC` is set. The current code was forcing the acceptance tests to run even as part of the unit test regardless of the var being set causing failures in development. --- .../keyvault/key_vault_certificate_ephemeral_test.go | 12 ++++++------ .../keyvault/key_vault_secret_ephemeral_test.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/services/keyvault/key_vault_certificate_ephemeral_test.go b/internal/services/keyvault/key_vault_certificate_ephemeral_test.go index cceb7e98b6fe..839cf0570870 100644 --- a/internal/services/keyvault/key_vault_certificate_ephemeral_test.go +++ b/internal/services/keyvault/key_vault_certificate_ephemeral_test.go @@ -24,7 +24,7 @@ func TestAccEphemeralKeyVaultCertificate_basic(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -49,7 +49,7 @@ func TestAccEphemeralKeyVaultCertificate_ecdsaPFX(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -72,7 +72,7 @@ func TestAccEphemeralKeyVaultCertificate_ecdsaPEM(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -95,7 +95,7 @@ func TestAccEphemeralKeyVaultCertificate_rsaBundlePEM(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -119,7 +119,7 @@ func TestAccEphemeralKeyVaultCertificate_rsaSinglePEM(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -143,7 +143,7 @@ func TestAccEphemeralKeyVaultCertificate_rsaBundlePFX(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_certificate", "test") r := KeyVaultCertificateEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, diff --git a/internal/services/keyvault/key_vault_secret_ephemeral_test.go b/internal/services/keyvault/key_vault_secret_ephemeral_test.go index efcebf331170..2737754056f4 100644 --- a/internal/services/keyvault/key_vault_secret_ephemeral_test.go +++ b/internal/services/keyvault/key_vault_secret_ephemeral_test.go @@ -24,7 +24,7 @@ func TestAccEphemeralKeyVaultSecret_basic(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_secret", "test") r := KeyVaultSecretEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), }, @@ -45,7 +45,7 @@ func TestAccEphemeralKeyVaultSecret_complete(t *testing.T) { data := acceptance.BuildTestData(t, "ephemeral.azurerm_key_vault_secret", "test") r := KeyVaultSecretEphemeral{} - resource.UnitTest(t, resource.TestCase{ + resource.Test(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ tfversion.SkipBelow(version.Must(version.NewVersion("1.10.0-rc1"))), },