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

Temp PR for pipeline diagnosis #23022

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- pwsh: >
dotnet test eng/service.proj
--framework $(TestTargetFramework)
--filter "TestCategory!=Manually"
--filter "(TestCategory!=Manually)&(FullyQualifiedName~Azure.Identity.Tests.VisualStudioCodeCredentialLiveTests)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adding this to the shared test template the only way to exclude this? Why can't we just disable the test in source?

--logger "trx"
--logger:"console;verbosity=normal"
/p:SDKType=${{ parameters.SDKType }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static async Task<string> GetRefreshTokenAsync(IdentityTestEnvironment te
.Build();

var retriever = new RefreshTokenRetriever(client.UserTokenCache);
await client.AcquireTokenByUsernamePassword(new[] { ".default" }, username, password.ToSecureString()).ExecuteAsync();
await client.AcquireTokenByUsernamePassword(new[] { "https://vault.azure.net/.default" }, username, password.ToSecureString()).ExecuteAsync();

StaticCachesUtilities.ClearStaticMetadataProviderCache();
StaticCachesUtilities.ClearAuthorityEndpointResolutionManagerCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,39 @@
// Licensed under the MIT License.

using System;
using System.Diagnostics.Tracing;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.Diagnostics;
using Azure.Core.TestFramework;
using NUnit.Framework;

namespace Azure.Identity.Tests
{
[NonParallelizable]
public class VisualStudioCodeCredentialLiveTests : IdentityRecordedTestBase
{
private const string ExpectedServiceName = "VS Code Azure";
private AzureEventSourceListener _logListener;

public VisualStudioCodeCredentialLiveTests(bool isAsync) : base(isAsync)
{
}

[SetUp]
public void EnableLogging()
{
_logListener = new AzureEventSourceListener((_, message) => TestContext.WriteLine(message), EventLevel.Verbose);
}

[TearDown]
public void DisableLogging()
{
_logListener.Dispose();
}

[Test]
[RunOnlyOnPlatforms(Windows = true, OSX = true, ContainerNames = new[] { "ubuntu_netcore_keyring" })]
public async Task AuthenticateWithVscCredential()
Expand Down