Skip to content

Commit

Permalink
tests: Remove tests that are not unit tests.
Browse files Browse the repository at this point in the history
We cannot mock the Compute residency check.
  • Loading branch information
amanda-tarafa committed Oct 1, 2024
1 parent 301caa8 commit 418c679
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,25 +389,6 @@ public async Task GetDefaultCredential_RecursiveImpersonatedCredential_FromEnvir

#region Invalid Cases

/// <summary> No credential files or environment variable specified - running on GCP.</summary>
[SkippableFact]
public async Task GetDefaultCredential_NoCredentialFiles_OnCompute()
{
Skip.IfNot(await ComputeCredential.IsRunningOnComputeEngine(), "Not running on Compute");

var credential = await credentialProvider.GetDefaultCredentialAsync();
Assert.IsType<ComputeCredential>(credential.UnderlyingCredential);
}

/// <summary> No credential files or environment variable specified - not running on GCP.</summary>
[Fact]
public async Task GetDefaultCredential_NoCredentialFiles_NotOnCompute()
{
Skip.If(await ComputeCredential.IsRunningOnComputeEngine(), "Running on Compute");
var exception = await Assert.ThrowsAsync<InvalidOperationException>(()=> credentialProvider.GetDefaultCredentialAsync());
Assert.Contains("Your default credentials were not found.", exception.Message);
}

/// <summary>Environment variable points to a non existant credential file.</summary>
[Fact]
public async Task GetDefaultCredential_MissingCredentialFile()
Expand Down

0 comments on commit 418c679

Please sign in to comment.