Skip to content

Commit

Permalink
Run ephemeral AKV tests as acceptance tests (hashicorp#28184)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
puneetsarna authored Dec 5, 2024
1 parent 6ba6882 commit 187faaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"))),
},
Expand All @@ -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"))),
},
Expand All @@ -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"))),
},
Expand All @@ -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"))),
},
Expand All @@ -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"))),
},
Expand All @@ -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"))),
},
Expand Down
4 changes: 2 additions & 2 deletions internal/services/keyvault/key_vault_secret_ephemeral_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))),
},
Expand All @@ -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"))),
},
Expand Down

0 comments on commit 187faaa

Please sign in to comment.