Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'dev' of https://github.com/WindowsAzure/azure-sdk-tools

…into dev

Conflicts:
	WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
  • Loading branch information...
commit be36af6d4798f0ce696a96c66e27dde305bf64d6 2 parents f3277bd + f0568ef
@ogail ogail authored
View
8 WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
@@ -120,7 +120,9 @@
<Compile Include="Common\PowerShellTest.cs" />
<Compile Include="Common\TestCredentialHelper.cs" />
<Compile Include="Common\WindowsAzurePowerShellTest.cs" />
- <None Include="Resources\Storage\StorageContext.ps1" />
+ <Resource Include="Resources\Storage\StorageContext.ps1">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Resource>
<Compile Include="StorageTests\StorageContainerTest.cs" />
<Compile Include="StorageTests\StorageContextTest.cs" />
<Compile Include="StoreTests\StoreTests.cs" />
@@ -182,7 +184,9 @@
<Resource Include="Resources\Store\StoreTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
- <None Include="Resources\Storage\StorageContainer.ps1" />
+ <Resource Include="Resources\Storage\StorageContainer.ps1">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Resource>
<Resource Include="Resources\Store\Common.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
View
13 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1
@@ -193,6 +193,7 @@ function Test-StartAzureServiceWithProductionDeployment
New-CloudService 1
$name = $global:createdCloudServices[0]
Stop-AzureService $name
+ Start-Sleep -Second 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping
# Test
$started = Start-AzureService $name -PassThru
@@ -370,10 +371,10 @@ function Test-StopAzureServiceWithEmptyDeployment
New-AzureService $name -Location $(Get-DefaultLocation)
# Test
- $Stoped = Stop-AzureService $name -Slot Staging -PassThru
+ $Stopped = Stop-AzureService $name -Slot Staging -PassThru
# Assert
- Assert-False { $Stoped }
+ Assert-False { $Stopped }
}
<#
@@ -388,10 +389,10 @@ function Test-StopAzureServiceWithProductionDeployment
Start-AzureService $name
# Test
- $Stoped = Stop-AzureService $name -PassThru
+ $Stopped = Stop-AzureService $name -PassThru
# Assert
- Assert-True { $Stoped }
+ Assert-True { $Stopped }
}
<#
@@ -406,8 +407,8 @@ function Test-StopAzureServiceWithStagingDeployment
Start-AzureService $name -Slot "Staging"
# Test
- $Stoped = Stop-AzureService $name -PassThru -Slot "Staging"
+ $Stopped = Stop-AzureService $name -PassThru -Slot "Staging"
# Assert
- Assert-True { $Stoped }
+ Assert-True { $Stopped }
}
View
27 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/CloudService/Common.ps1
@@ -83,13 +83,13 @@ function PublishAndUpdate-CloudService
Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name;
$service = Publish-AzureServiceProject -Force;
$global:createdCloudServices += $name;
- $worked = Invoke-Command -ScriptBlock $verifier -ArgumentList $service
+ $worked = Retry-Function $verifier $service 3 30
Assert-True {$worked -eq $true} "Error verifying first application deployment"
if ($updater -ne $null)
{
Invoke-Command -ScriptBlock $updater
$service = Publish-AzureServiceProject -Force;
- $worked = Invoke-Command -ScriptBlock $verifier -ArgumentList $service
+ $worked = Retry-Function $verifier $service 3 30
Assert-True {$worked -eq $true} "Error verifying application update"
}
}
@@ -132,7 +132,7 @@ function New-CacheCloudServiceProject
Add-AzureNodeWebRole ClientRole
copy ..\CloudService\Cache\*.js .\ClientRole\
cd .\ClientRole
- Start-Process npm "install ..\..\CloudService\Cache\mc.tgz ..\..\CloudService\Cache\connman.tgz" -WAIT
+ Npm-Install "install ..\..\CloudService\Cache\mc.tgz ..\..\CloudService\Cache\connman.tgz";
cd ..
Add-AzureCacheWorkerRole CacheRole
Enable-AzureMemcacheRole ClientRole CacheRole
@@ -140,6 +140,27 @@ function New-CacheCloudServiceProject
<#
.SYNOPSIS
+Runs npm and verifies the results.
+
+.PARAMETER command
+The npm command to run
+#>
+
+function Npm-Install
+{
+ param([string] $command)
+
+ $scriptBlock = {
+ $toss = Start-Process npm $command -WAIT;
+ $modules = Get-Item * | Where-Object Name node_modules -EQ;
+ return $modules -ne $null;
+ }
+
+ Retry-Function $scriptBlock $null 3 30
+}
+
+<#
+.SYNOPSIS
Places and retrieves a key value pair from a cache app
#>
function Verify-CacheApp
View
BIN  WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Common.ps1
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.