Skip to content

Commit da73cb5

Browse files
author
unknown
committed
Add downloading tools
1 parent 2338f53 commit da73cb5

File tree

1 file changed

+12
-0
lines changed
  • src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests

1 file changed

+12
-0
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static class CredentialHelper
4242
private static string currentTestEnvironment = null;
4343
private static CloudBlobContainer blobContainer;
4444
private const string VhdFilesContainerName = "vhdfiles";
45+
private const string toolsContainerName = "tools";
4546

4647
private static Dictionary<string, string> environment = new Dictionary<string, string>();
4748
public static Dictionary<string, string> PowerShellVariables { get; private set; }
@@ -115,6 +116,17 @@ private static void DownloadTestVhdsAndPackages(string testEnvironment, string d
115116
blobStream.Flush();
116117
blobStream.Close();
117118
}
119+
120+
blobContainer = blobClient.GetContainerReference(toolsContainerName);
121+
foreach (IListBlobItem blobItem in blobContainer.ListBlobs())
122+
{
123+
ICloudBlob blob = blobClient.GetBlobReferenceFromServer(blobItem.Uri);
124+
Console.WriteLine("Downloading file {0} from blob Uri {1}", blob.Name, blob.Uri);
125+
FileStream blobStream = new FileStream(Path.Combine(downloadDirectoryPath, @"..\..\", blob.Name), FileMode.Create);
126+
blob.DownloadToStream(blobStream);
127+
blobStream.Flush();
128+
blobStream.Close();
129+
}
118130
}
119131

120132
public static void GetTestSettings(string testSettings)

0 commit comments

Comments
 (0)