@@ -542,14 +542,17 @@ public void AzureDeploymentTest()
542
542
string deploymentLabel = "label1" ;
543
543
DeploymentInfoContext result ;
544
544
545
+ PSCredential cred = new PSCredential ( username , Utilities . convertToSecureString ( password ) ) ;
546
+ ExtensionConfigurationInput rdpExtCfg = vmPowershellCmdlets . NewAzureServiceRemoteDesktopExtensionConfig ( cred ) ;
547
+
545
548
try
546
549
{
547
550
vmPowershellCmdlets . NewAzureService ( serviceName , serviceName , locationName ) ;
548
551
Console . WriteLine ( "service, {0}, is created." , serviceName ) ;
549
552
550
553
Utilities . RetryActionUntilSuccess ( ( ) =>
551
554
{
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 ) ;
553
556
} , "Windows Azure is currently performing an operation on this hosted service that requires exclusive access." , 10 , 30 ) ;
554
557
555
558
result = vmPowershellCmdlets . GetAzureDeployment ( serviceName , DeploymentSlotType . Staging ) ;
@@ -566,6 +569,16 @@ public void AzureDeploymentTest()
566
569
pass &= Utilities . PrintAndCompareDeployment ( result , serviceName , deploymentName , deploymentLabel , DeploymentSlotType . Production , null , 1 ) ;
567
570
Console . WriteLine ( "successfully moved" ) ;
568
571
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
+
569
582
// Set the deployment status to 'Suspended'
570
583
Utilities . RetryActionUntilSuccess ( ( ) =>
571
584
{
0 commit comments