You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LocationBasedReservedIPTests.cs
@@ -109,6 +110,74 @@ public void CreateReservedIPThenWindowsVM()
109
110
}
110
111
}
111
112
113
+
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Test the cmdlets (Remove-AzureReservedIPAssociation, New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Test the cmdlets (Set-AzureReservedIPAssociation, New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
},"Create a new windows azure vm without reserved ip.");
145
213
146
-
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.SetAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Create a new Azure Reserved IP Association");
214
+
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.SetAzureReservedIPAssociation(reservedIpName,serviceName);},"Create a new Azure Reserved IP Association");
147
215
148
216
149
217
VerifyReservedIpInUse(serviceName,input);
@@ -161,6 +229,51 @@ public void CreateWindowsVMThenAssociateReservedIP()
161
229
}
162
230
}
163
231
232
+
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Expected failure when trying to associate to staging slot in IaaS (Set-AzureReservedIPAssociation, New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
serviceName,DeploymentSlotType.Staging);},"Create a new Azure Reserved IP Association");
267
+
}
268
+
catch(Exceptionex)
269
+
{
270
+
pass=true;
271
+
Console.WriteLine(ex.ToString());
272
+
return;
273
+
}
274
+
thrownewException("Test Did not fail as expected when association was tried on stage slot in IaaS");
275
+
}
276
+
164
277
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Test the cmdlets (Remove-AzureReservedIPAssociation, New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
@@ -197,7 +309,7 @@ public void CreateWindowsVMWithReservedIPThenDisassociateReservedIP()
197
309
198
310
VerifyReservedIpInUse(serviceName,input);
199
311
200
-
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Remove an Azure Reserved IP Association");
312
+
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,true);},"Remove an Azure Reserved IP Association");
201
313
202
314
VerifyReservedIpNotInUse(input);
203
315
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureVM(vmName,serviceName,true),"Remove Azure VM and verify that a warning is given.");
@@ -244,11 +356,11 @@ public void CreateWindowsVMThenReservedExistingIP()
244
356
},"Create a new windows azure vm without reserved ip.");
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Remove an Azure Reserved IP Association");
363
+
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,true);},"Remove an Azure Reserved IP Association");
252
364
253
365
VerifyReservedIpNotInUse(input);
254
366
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureVM(vmName,serviceName,true),"Remove Azure VM and verify that a warning is given.");
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NetworkCmdletInfo/NewAzureReservedIPCmdletInfo.cs
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NetworkCmdletInfo/RemoveAzureReservedIPAssociationCmdletInfo.cs
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NetworkCmdletInfo/SetAzureReservedIPAssociationCmdletInfo.cs
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
0 commit comments