@@ -69,13 +69,6 @@ public class ServiceManagementTest
69
69
70
70
private TestContext testContextInstance ;
71
71
72
- private const string VhdFilesContainerName = "vhdfiles" ;
73
- private static readonly string [ ] VhdFiles = new [ ]
74
- {
75
- "dynamic_50.vhd" , "dynamic_50_child01.vhd" , "dynamic_50_child02.vhd" ,
76
- "fixed_50.vhd" , "fixed_50_child01.vhd" , "fixed_50_child02.vhd"
77
- } ;
78
-
79
72
/// <summary>
80
73
///Gets or sets the test context which provides
81
74
///information about and functionality for the current test run.
@@ -202,26 +195,6 @@ private static string GetDefaultStorage(string storageName, string locName)
202
195
return null ;
203
196
}
204
197
205
- private static string GetSubscriptionName ( string publishSettingsFile )
206
- {
207
- try
208
- {
209
- XDocument psf = XDocument . Load ( publishSettingsFile ) ;
210
- XElement pubData = psf . Descendants ( ) . FirstOrDefault ( ) ;
211
- XElement pubProfile = pubData . Elements ( ) . ToList ( ) [ 0 ] ;
212
- XElement sub = pubProfile . Elements ( ) . ToList ( ) [ 0 ] ;
213
- string subName = sub . Attribute ( "Name" ) . Value ;
214
- Console . WriteLine ( "Getting subscription: {0}" , subName ) ;
215
-
216
- return subName ;
217
- }
218
- catch
219
- {
220
- Console . WriteLine ( "Error occurred during loading publish settings file..." ) ;
221
- return null ;
222
- }
223
- }
224
-
225
198
private static string GetServiceManagementUrl ( string publishSettingsFile )
226
199
{
227
200
try
@@ -346,15 +319,6 @@ public static void SetTestSettings()
346
319
Console . WriteLine ( "Error occurred during Get-AzureVMImageName... imageName is not set." ) ;
347
320
}
348
321
349
- try
350
- {
351
- DownloadVhds ( ) ;
352
- }
353
- catch
354
- {
355
- Console . WriteLine ( "Error occurred during downloading vhds..." ) ;
356
- }
357
-
358
322
if ( String . IsNullOrEmpty ( imageName ) )
359
323
{
360
324
Console . WriteLine ( "No image is selected!" ) ;
@@ -414,41 +378,6 @@ protected static void CleanupService(string svcName)
414
378
Utilities . TryAndIgnore ( ( ) => vmPowershellCmdlets . RemoveAzureService ( svcName , true ) , "does not exist" ) ;
415
379
}
416
380
417
- protected static void DownloadVhds ( )
418
- {
419
- storageAccountKey = vmPowershellCmdlets . GetAzureStorageAccountKey ( defaultAzureSubscription . CurrentStorageAccountName ) ;
420
-
421
- foreach ( var vhdFile in VhdFiles )
422
- {
423
- string vhdBlobLocation = string . Format ( "{0}{1}/{2}" , blobUrlRoot , VhdFilesContainerName , vhdFile ) ;
424
-
425
- var vhdLocalPath = new FileInfo ( Directory . GetCurrentDirectory ( ) + "\\ " + vhdFile ) ;
426
-
427
- if ( ! File . Exists ( vhdLocalPath . FullName ) )
428
- {
429
- // Set the source blob
430
- BlobHandle blobHandle = Utilities . GetBlobHandle ( vhdBlobLocation , storageAccountKey . Primary ) ;
431
-
432
- SaveVhd ( blobHandle , vhdLocalPath , storageAccountKey . Primary ) ;
433
- }
434
- }
435
- }
436
-
437
- protected static void SaveVhd ( BlobHandle destination , FileInfo locFile , string storageKey , int ? numThread = null , bool overwrite = false )
438
- {
439
- try
440
- {
441
- Console . WriteLine ( "Downloading a VHD from {0} to {1}..." , destination . Blob . Uri . ToString ( ) , locFile . FullName ) ;
442
- DateTime startTime = DateTime . Now ;
443
- vmPowershellCmdlets . SaveAzureVhd ( destination . Blob . Uri , locFile , numThread , storageKey , overwrite ) ;
444
- Console . WriteLine ( "Downloading completed in {0} seconds." , ( DateTime . Now - startTime ) . TotalSeconds ) ;
445
- }
446
- catch ( Exception e )
447
- {
448
- Assert . Fail ( e . InnerException . ToString ( ) ) ;
449
- }
450
- }
451
-
452
381
protected void VerifyRDP ( string serviceName , string rdpPath )
453
382
{
454
383
Utilities . GetDeploymentAndWaitForReady ( serviceName , DeploymentSlotType . Production , 10 , 600 ) ;
0 commit comments