@@ -69,13 +69,6 @@ public class ServiceManagementTest
6969
7070 private TestContext testContextInstance ;
7171
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-
7972 /// <summary>
8073 ///Gets or sets the test context which provides
8174 ///information about and functionality for the current test run.
@@ -202,26 +195,6 @@ private static string GetDefaultStorage(string storageName, string locName)
202195 return null ;
203196 }
204197
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-
225198 private static string GetServiceManagementUrl ( string publishSettingsFile )
226199 {
227200 try
@@ -346,15 +319,6 @@ public static void SetTestSettings()
346319 Console . WriteLine ( "Error occurred during Get-AzureVMImageName... imageName is not set." ) ;
347320 }
348321
349- try
350- {
351- DownloadVhds ( ) ;
352- }
353- catch
354- {
355- Console . WriteLine ( "Error occurred during downloading vhds..." ) ;
356- }
357-
358322 if ( String . IsNullOrEmpty ( imageName ) )
359323 {
360324 Console . WriteLine ( "No image is selected!" ) ;
@@ -414,41 +378,6 @@ protected static void CleanupService(string svcName)
414378 Utilities . TryAndIgnore ( ( ) => vmPowershellCmdlets . RemoveAzureService ( svcName , true ) , "does not exist" ) ;
415379 }
416380
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-
452381 protected void VerifyRDP ( string serviceName , string rdpPath )
453382 {
454383 Utilities . GetDeploymentAndWaitForReady ( serviceName , DeploymentSlotType . Production , 10 , 600 ) ;
0 commit comments