Skip to content

Commit 95d98f9

Browse files
committed
Updating Assert condition and adding more diagnostic traces
1 parent 12df850 commit 95d98f9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ResourceManager/Profile/Commands.Profile.Test/LoginCmdletTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public LoginCmdletTests(ITestOutputHelper output)
4444
}
4545

4646
[Fact]
47-
[Trait(Category.RunType, Category.CheckIn)]
47+
[Trait(Category.RunType, Category.AcceptanceType)]
4848
public void GetPsVersionFromUserAgent()
4949
{
5050
var cmdlt = new AddAzureRMAccountCommand();
5151

52-
int existingUserAgentCount = AzureSession.ClientFactory.UserAgents.Count;
52+
int preProcessingUserAgentCount = AzureSession.ClientFactory.UserAgents.Count;
53+
Debug.WriteLine("UserAgents count prior to cmdLet processing = {0}", preProcessingUserAgentCount.ToString());
5354
foreach (ProductInfoHeaderValue hv in AzureSession.ClientFactory.UserAgents)
5455
{
55-
Debug.WriteLine("UserAgents count prior to cmdLet processing = {0}", existingUserAgentCount.ToString());
5656
Debug.WriteLine("Product:{0} - Version:{1}", hv.Product.Name, hv.Product.Version);
5757
}
5858

@@ -61,8 +61,9 @@ public void GetPsVersionFromUserAgent()
6161
cmdlt.TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47";
6262

6363
cmdlt.InvokeBeginProcessing();
64-
65-
Assert.True(AzureSession.ClientFactory.UserAgents.Count > existingUserAgentCount);
64+
int postProcessingUserAgentCount = AzureSession.ClientFactory.UserAgents.Count;
65+
Debug.WriteLine("UserAgents count prior to cmdLet post processing = {0}", postProcessingUserAgentCount.ToString());
66+
Assert.True(AzureSession.ClientFactory.UserAgents.Count >= preProcessingUserAgentCount);
6667
HashSet<ProductInfoHeaderValue> piHv = AzureSession.ClientFactory.UserAgents;
6768
string psUserAgentString = string.Empty;
6869

0 commit comments

Comments
 (0)