From e05fedbe0cd072fda15c8529001da5aeff837b56 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 9 Jun 2021 15:44:08 -0700 Subject: [PATCH] Use service.projects to ignore KV track 1 tests Fixes #13029 --- .../tests/Microsoft.Azure.KeyVault.Extensions.Tests.csproj | 4 ---- .../tests/Tests/KeyVaultKeyResolverTests.cs | 6 ------ .../tests/KeyVaultOperationsTest.cs | 6 ------ .../tests/Microsoft.Azure.KeyVault.Tests.csproj | 4 ---- sdk/keyvault/service.projects | 6 ++++++ 5 files changed, 6 insertions(+), 20 deletions(-) create mode 100644 sdk/keyvault/service.projects diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Microsoft.Azure.KeyVault.Extensions.Tests.csproj b/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Microsoft.Azure.KeyVault.Extensions.Tests.csproj index 8c993dd003ae3..60a43f4b0856d 100644 --- a/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Microsoft.Azure.KeyVault.Extensions.Tests.csproj +++ b/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Microsoft.Azure.KeyVault.Extensions.Tests.csproj @@ -3,10 +3,6 @@ Microsoft Azure Key Vault Extensions tests 1.0.0 $(RequiredTargetFrameworks) - - $(DefineConstants); - AZURE_KEYVAULT_TEST_MODE_LIVE; - diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Tests/KeyVaultKeyResolverTests.cs b/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Tests/KeyVaultKeyResolverTests.cs index 5432679edd3e2..6f85b49fbba55 100644 --- a/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Tests/KeyVaultKeyResolverTests.cs +++ b/sdk/keyvault/Microsoft.Azure.KeyVault.Extensions/tests/Tests/KeyVaultKeyResolverTests.cs @@ -11,10 +11,6 @@ using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Xunit; -// Avoid compiling the test class. Disabling just the test methods still causes the fixture to instantiate and dispose, which still breaks live tests. -// See https://github.com/Azure/azure-sdk-for-net/issues/8420 for status and more information about why these tests are disabled. -#if !AZURE_KEYVAULT_TEST_MODE_LIVE - namespace Microsoft.Azure.KeyVault.Extensions.Tests { /// @@ -223,5 +219,3 @@ private void VerifyResolver(KeyVaultClient client, string vault, string baseIden } } } - -#endif diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault/tests/KeyVaultOperationsTest.cs b/sdk/keyvault/Microsoft.Azure.KeyVault/tests/KeyVaultOperationsTest.cs index 1857e1fa6ebe9..506662f04902d 100644 --- a/sdk/keyvault/Microsoft.Azure.KeyVault/tests/KeyVaultOperationsTest.cs +++ b/sdk/keyvault/Microsoft.Azure.KeyVault/tests/KeyVaultOperationsTest.cs @@ -20,10 +20,6 @@ using Microsoft.Rest.Serialization; using Xunit; -// Avoid compiling the test class. Disabling just the test methods still causes the fixture to instantiate and dispose, which still breaks live tests. -// See https://github.com/Azure/azure-sdk-for-net/issues/8420 for status and more information about why these tests are disabled. -#if !AZURE_KEYVAULT_TEST_MODE_LIVE - namespace Microsoft.Azure.KeyVault.Tests { public class Operations : IClassFixture @@ -4298,5 +4294,3 @@ private static Uri GetSasDefinitionTemplateUri(string blobUri, string startTime, #endregion } } - -#endif diff --git a/sdk/keyvault/Microsoft.Azure.KeyVault/tests/Microsoft.Azure.KeyVault.Tests.csproj b/sdk/keyvault/Microsoft.Azure.KeyVault/tests/Microsoft.Azure.KeyVault.Tests.csproj index c364e694c065d..c94ebbd673e00 100644 --- a/sdk/keyvault/Microsoft.Azure.KeyVault/tests/Microsoft.Azure.KeyVault.Tests.csproj +++ b/sdk/keyvault/Microsoft.Azure.KeyVault/tests/Microsoft.Azure.KeyVault.Tests.csproj @@ -2,10 +2,6 @@ Microsoft.Azure.KeyVault.Tests Class Library $(RequiredTargetFrameworks) - - $(DefineConstants); - AZURE_KEYVAULT_TEST_MODE_LIVE; - diff --git a/sdk/keyvault/service.projects b/sdk/keyvault/service.projects new file mode 100644 index 0000000000000..8f474c2472ade --- /dev/null +++ b/sdk/keyvault/service.projects @@ -0,0 +1,6 @@ + + + + + +