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.Preview/Commands.ServiceManagement.Preview.csproj
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LocationBasedReservedIPTests.cs
+155Lines changed: 155 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,161 @@ public void CreateReservedIPThenWindowsVM()
109
109
}
110
110
}
111
111
112
+
[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
+
146
+
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.SetAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Create a new Azure Reserved IP Association");
147
+
148
+
149
+
VerifyReservedIpInUse(serviceName,input);
150
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureVM(vmName,serviceName,true),"Remove Azure VM and verify that a warning is given.");
151
+
VerifyReservedIpNotInUse(input);
152
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName,true),"Release the reserved ip");
153
+
VerifyReservedIpRemoved(reservedIpName);
154
+
pass=true;
155
+
}
156
+
catch(Exceptionex)
157
+
{
158
+
pass=false;
159
+
Console.WriteLine(ex.ToString());
160
+
throw;
161
+
}
162
+
}
163
+
164
+
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Test the cmdlets (Remove-AzureReservedIPAssociation, New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
},"Create a new windows azure vm with reserved ip.");
197
+
198
+
VerifyReservedIpInUse(serviceName,input);
199
+
200
+
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Remove an Azure Reserved IP Association");
201
+
202
+
VerifyReservedIpNotInUse(input);
203
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureVM(vmName,serviceName,true),"Remove Azure VM and verify that a warning is given.");
204
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName,true),"Release the reserved ip");
205
+
VerifyReservedIpRemoved(reservedIpName);
206
+
pass=true;
207
+
}
208
+
catch(Exceptionex)
209
+
{
210
+
pass=false;
211
+
Console.WriteLine(ex.ToString());
212
+
throw;
213
+
}
214
+
}
215
+
216
+
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("avgupt"),Description("Test the cmdlets (New-AzureReservedIP, Remove-AzureReservedIPAssociation, Get-AzureReservedIP,Remove-AzureReservedIP)")]
Utilities.ExecuteAndLog(()=>{vmPowershellCmdlets.RemoveAzureReservedIPAssociation(reservedIpName,serviceName,serviceName);},"Remove an Azure Reserved IP Association");
252
+
253
+
VerifyReservedIpNotInUse(input);
254
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureVM(vmName,serviceName,true),"Remove Azure VM and verify that a warning is given.");
255
+
Utilities.ExecuteAndLog(()=>vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName,true),"Release the reserved ip");
256
+
VerifyReservedIpRemoved(reservedIpName);
257
+
pass=true;
258
+
}
259
+
catch(Exceptionex)
260
+
{
261
+
pass=false;
262
+
Console.WriteLine(ex.ToString());
263
+
throw;
264
+
}
265
+
}
266
+
112
267
[TestMethod(),Priority(0),TestProperty("Feature","IaaS"),TestCategory(Category.Network),Owner("hylee"),Description("Test the cmdlets (New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")]
Copy file name to clipboardExpand all lines: src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NetworkCmdletInfo/NewAzureReservedIPCmdletInfo.cs
0 commit comments