From 418c679deeecb58b80096ab1f062c9684a4a7371 Mon Sep 17 00:00:00 2001 From: Amanda Tarafa Mas Date: Tue, 1 Oct 2024 11:12:53 -0700 Subject: [PATCH] tests: Remove tests that are not unit tests. We cannot mock the Compute residency check. --- .../OAuth2/DefaultCredentialProviderTests.cs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Src/Support/Google.Apis.Auth.Tests/OAuth2/DefaultCredentialProviderTests.cs b/Src/Support/Google.Apis.Auth.Tests/OAuth2/DefaultCredentialProviderTests.cs index 79b53770a17..efb9595153f 100644 --- a/Src/Support/Google.Apis.Auth.Tests/OAuth2/DefaultCredentialProviderTests.cs +++ b/Src/Support/Google.Apis.Auth.Tests/OAuth2/DefaultCredentialProviderTests.cs @@ -389,25 +389,6 @@ public async Task GetDefaultCredential_RecursiveImpersonatedCredential_FromEnvir #region Invalid Cases - /// No credential files or environment variable specified - running on GCP. - [SkippableFact] - public async Task GetDefaultCredential_NoCredentialFiles_OnCompute() - { - Skip.IfNot(await ComputeCredential.IsRunningOnComputeEngine(), "Not running on Compute"); - - var credential = await credentialProvider.GetDefaultCredentialAsync(); - Assert.IsType(credential.UnderlyingCredential); - } - - /// No credential files or environment variable specified - not running on GCP. - [Fact] - public async Task GetDefaultCredential_NoCredentialFiles_NotOnCompute() - { - Skip.If(await ComputeCredential.IsRunningOnComputeEngine(), "Running on Compute"); - var exception = await Assert.ThrowsAsync(()=> credentialProvider.GetDefaultCredentialAsync()); - Assert.Contains("Your default credentials were not found.", exception.Message); - } - /// Environment variable points to a non existant credential file. [Fact] public async Task GetDefaultCredential_MissingCredentialFile()