Skip to content

Azure RT Changes for Sprint 44 #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Feb 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
04dcfc6
jenkins test
Dec 18, 2014
ac5f0dd
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 19, 2015
26af55d
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jan 19, 2015
5349782
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jan 20, 2015
32d47c2
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 21, 2015
0a8bdcd
Merge branch 'release-0.8.14' of https://github.com/Azure/azure-power…
huangpf Jan 22, 2015
e8054c8
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 23, 2015
c3a5573
Change the category of these unit tests, since they interfere with ot…
Jan 23, 2015
306f052
Add cleaning up of resources created by the previous test runs
Jan 23, 2015
fd045b5
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 24, 2015
1cfe124
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jan 26, 2015
33a4d32
Add-AzureVMImage update
huangpf Jan 27, 2015
9cccfcc
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 27, 2015
9d9c86f
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 29, 2015
5e77721
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 29, 2015
475a279
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Jan 29, 2015
7116cf2
Add clean up category
Jan 30, 2015
d7c308e
update compute library
huangpf Jan 30, 2015
e407a39
update tests
huangpf Jan 30, 2015
bc7bc2f
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Jan 31, 2015
666797c
revert 0.8.14 changes
huangpf Jan 31, 2015
960e26f
update
huangpf Jan 31, 2015
3274d4c
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
huangpf Jan 31, 2015
7c62529
update
huangpf Jan 31, 2015
9f1d5bd
IconName & SmallIconName
huangpf Jan 31, 2015
0748fdb
update test
huangpf Jan 31, 2015
5b507d2
update test
huangpf Jan 31, 2015
65ba319
update test
huangpf Jan 31, 2015
2ee0652
update test
huangpf Jan 31, 2015
e29d0ae
Update param. sets for OS/Disk config cmdlets
huangpf Jan 31, 2015
9df918e
Change class name
Feb 3, 2015
cc4f049
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Feb 5, 2015
76e6148
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Feb 5, 2015
48ef3b6
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Feb 5, 2015
64a9488
Merge pull request #9 from huangpf/dev
AzureRT Feb 6, 2015
e536f87
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Feb 6, 2015
73b6e72
Merge pull request #5 from hyonholee/dev
AzureRT Feb 6, 2015
35918fd
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Feb 6, 2015
62e22d3
Fix build issue
Feb 6, 2015
4604ff9
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Feb 9, 2015
ebbd4df
Fix the build
Feb 9, 2015
5cc995f
fix addomain extension
huangpf Feb 9, 2015
f37a3fa
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Feb 10, 2015
ac63c27
Merge pull request #10 from huangpf/dev
AzureRT Feb 10, 2015
b9874fb
Merging Azure RT PR with existing dev branch
markcowl Feb 10, 2015
2df3239
Merging changes for Azure RT Sprint 44
markcowl Feb 10, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<HDInsightTestDebug>.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll</HDInsightTestDebug>
<StorageTestDebug>.\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
<KeyVaultTestDebug>.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll</KeyVaultTestDebug>
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload"</TestFilter>
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload&#x26;!AzureRTCleanUp"</TestFilter>
<ScenarioTestFilter>All</ScenarioTestFilter>
<OneSDKCITFilter>"OneSDK&#x26;CIT"</OneSDKCITFilter>
<AzureRTAllTestFilter>"Functional|AzureRTScenario|Sequential|AzureRTUpload|Network"</AzureRTAllTestFilter>
Expand Down Expand Up @@ -307,6 +307,14 @@
ContinueOnError="false" />
</Target>

<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT clean up tests..." />
<Delete Files="$(TestOutputDirectory)\RTCleanUpDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTCleanUp /resultsfile:$(TestOutputDirectory)\RTCleanUpDebug.trx"
ContinueOnError="false" />
</Target>

<!-- DSC extension related targets -->
<Target Name="TestDSCExtension_x64">
<Message Importance="high" Text="Running DSC extension BVT x64 tests..." />
Expand Down
5 changes: 3 additions & 2 deletions src/Common/Commands.Common.Test/Commands.Common.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
5 changes: 3 additions & 2 deletions src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.ScenarioTest/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.0-prerelease" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
<Reference Include="Microsoft.Azure.Common">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Microsoft.Azure.Common.Extensions">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
Expand All @@ -73,14 +72,14 @@
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="6.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
<Reference Include="Microsoft.Azure.Common">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Microsoft.Azure.Common.Extensions">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
Expand Down Expand Up @@ -106,7 +105,7 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
Expand Down Expand Up @@ -176,6 +175,7 @@
<Compile Include="FunctionalTests\AzureServiceExtensionTests.cs" />
<Compile Include="FunctionalTests\AzureVhdTest.cs" />
<Compile Include="FunctionalTests\BVTTest.cs" />
<Compile Include="FunctionalTests\CleanUp.cs" />
<Compile Include="FunctionalTests\ConfigDataInfo\ACLAction.cs" />
<Compile Include="FunctionalTests\ConfigDataInfo\HostCaching.cs" />
<Compile Include="FunctionalTests\ConfigDataInfo\InstanceSize.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests
{
[TestClass]
public class ServiceManagementCleanUp : ServiceManagementTest
{

/// <summary>
/// Clean up any resouces left from tests
/// </summary>
[TestMethod(), TestCategory(Category.CleanUp), Priority(1), Owner("hylee"), Description("Clean up any resouces left from tests")]
public void CleanUp()
{
vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
try
{
vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force");
}
catch
{
}

try
{
vmPowershellCmdlets.RunPSScript("Get-AzureDisk | Remove-AzureDisk");
}
catch
{
}

try
{
vmPowershellCmdlets.RunPSScript(@"Get-AzureVMImage | where {$_.Category -eq 'User'} | Remove-AzureVMImage");
}
catch
{
}

try
{
vmPowershellCmdlets.RunPSScript("Remove-AzureVNetConfig");
}
catch
{
}

try
{
vmPowershellCmdlets.RunPSScript("Get-AzureAffinityGroup | Remove-AzureAffinityGroup");
}
catch
{
}

try
{
vmPowershellCmdlets.RunPSScript("Get-AzureReservedIP | Remove-AzureReservedIP -Force");
}
catch
{
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Category
public const string Sequential = "Sequential";
public const string Network = "Network";
public const string Upload = "AzureRTUpload";
public const string CleanUp = "AzureRTCleanUp";
}

public class LoadBalancerDistribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public static string DefaultStorageName
}
}

public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob)
public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob = null)
{
ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
Process currentProcess = Process.GetCurrentProcess();
Expand All @@ -262,7 +262,15 @@ public static void CopyTestData(string srcContainer, string srcBlob, string dest
// Make SAS Uri for the source blob.
string srcSasUri = Utilities.GenerateSasUri(CredentialHelper.CredentialBlobUriFormat, storageAccount, storageAccountKey, srcContainer, srcBlob);

vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
if (string.IsNullOrEmpty(destBlob))
{
vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcContainer {0} -SrcBlob {1} -DestContainer {2} -Force", srcContainer, srcBlob, destContainer));
destBlob = srcBlob;
}
else
{
vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
}

for (int i = 0; i < 60; i++)
{
Expand Down
Loading