Skip to content

Commit e9f109a

Browse files
authored
Merge pull request Azure#5716 from sergey-shandar/sergey-vhd-fix
Fix VHD test Azure#5692
2 parents a3ee9d6 + 36b0848 commit e9f109a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/NewVhdVMTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public NewVhdVMTests(Xunit.Abstractions.ITestOutputHelper output)
2525
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
2626
}
2727

28-
[Fact(Skip = "Skip until necessary fixes done: https://github.com/Azure/azure-powershell/issues/5692")]
29-
[Trait(Category.AcceptanceType, Category.Flaky)]
28+
[Fact]
29+
[Trait(Category.AcceptanceType, Category.CheckIn)]
3030
public void TestWithValidVhdDiskFile()
3131
{
3232
ComputeTestController.NewInstance.RunPsTest("Test-NewAzureRmVhdVMWithValidDiskFile");

src/ResourceManager/Compute/Commands.Compute/Strategies/ComputeRp/ComputeStrategy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static string GetConnectionString(
4545
var url = fqdn + (port == null ? string.Empty : ":" + port);
4646
return imageAndOsType.OsType == OperatingSystemTypes.Windows
4747
? "mstsc /v:" + url
48-
: "ssh " + user + "@" + url;
48+
: "ssh " + (user == null ? string.Empty : user + "@") + url;
4949
}
5050
}
5151
}

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ async Task StrategyExecuteCmdletAsync(IAsyncCmdlet asyncCmdlet)
407407
psResult.FullyQualifiedDomainName = fqdn;
408408
var connectionString = imageAndOsType.GetConnectionString(
409409
fqdn,
410-
Credential.UserName);
410+
Credential?.UserName);
411411
asyncCmdlet.WriteVerbose(
412412
Resources.VirtualMachineUseConnectionString,
413413
connectionString);

0 commit comments

Comments
 (0)