Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Remove tests that are not unit tests. #2850

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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