Skip to content

Commit ed4a82f

Browse files
committed
+Test
1 parent f7864d1 commit ed4a82f

File tree

1 file changed

+14
-1
lines changed
  • src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests

1 file changed

+14
-1
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,14 +542,17 @@ public void AzureDeploymentTest()
542542
string deploymentLabel = "label1";
543543
DeploymentInfoContext result;
544544

545+
PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password));
546+
ExtensionConfigurationInput rdpExtCfg = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred);
547+
545548
try
546549
{
547550
vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName);
548551
Console.WriteLine("service, {0}, is created.", serviceName);
549552

550553
Utilities.RetryActionUntilSuccess(() =>
551554
{
552-
vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Staging, deploymentLabel, deploymentName, false, false);
555+
vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Staging, deploymentLabel, deploymentName, false, false, rdpExtCfg);
553556
}, "Windows Azure is currently performing an operation on this hosted service that requires exclusive access.", 10, 30);
554557

555558
result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging);
@@ -566,6 +569,16 @@ public void AzureDeploymentTest()
566569
pass &= Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 1);
567570
Console.WriteLine("successfully moved");
568571

572+
// Re-create the Staging depoyment with the extension
573+
Utilities.RetryActionUntilSuccess(() =>
574+
{
575+
vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Staging, deploymentLabel, deploymentName, false, false, rdpExtCfg);
576+
}, "Windows Azure is currently performing an operation on this hosted service that requires exclusive access.", 10, 30);
577+
578+
result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging);
579+
pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Staging, null, 1);
580+
Console.WriteLine(string.Format("Successfully re-deployed the package to the {0} slot.", DeploymentSlotType.Staging));
581+
569582
// Set the deployment status to 'Suspended'
570583
Utilities.RetryActionUntilSuccess(() =>
571584
{

0 commit comments

Comments
 (0)