Skip to content

Commit 78a0569

Browse files
committed
Added storagecontext to the publish cmdlet in scenario test
1 parent 9a18c29 commit 78a0569

File tree

2 files changed

+3072
-944
lines changed

2 files changed

+3072
-944
lines changed

src/ServiceManagement/Common/Commands.ScenarioTest/Resources/DscExtension/DscExtensionTests.ps1

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ function Test-GetAzureVMDscExtension
1212

1313
# Publish DSC Configuration
1414
$configPath = '.\Resources\DscExtension\DummyConfig.ps1'
15-
Publish-AzureVMDscConfiguration $configPath -Force -Verbose
15+
$StorageAccountName = "dscextensiontest"
16+
17+
$StorageAccountKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName
18+
$Ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey.Primary
19+
Publish-AzureVMDscConfiguration -ConfigurationPath $configPath -StorageContext $Ctx -Force -Verbose
1620

1721
# Setup
1822
$location = Get-DefaultLocation
@@ -38,7 +42,7 @@ function Test-GetAzureVMDscExtension
3842
$vm | Update-AzureVM -Verbose
3943

4044
# Call Get-AzureVMDscExtensionStatus to check the status of the installation
41-
[TimeSpan] $timeout = [TimeSpan]::FromMinutes(30)
45+
[TimeSpan] $timeout = [TimeSpan]::FromMinutes(60)
4246
$maxTime = [datetime]::Now + $timeout
4347
$status = Get-AzureVMDscExtensionStatus -VM $vm
4448

@@ -77,8 +81,7 @@ function Test-GetAzureVMDscExtension
7781
finally
7882
{
7983
# Cleanup
80-
Cleanup-CloudService $svcName
81-
82-
Remove-AzureStorageAccount -StorageAccountName $storageName -ErrorAction SilentlyContinue
84+
Remove-AzureStorageAccount -StorageAccountName $storageName -ErrorAction SilentlyContinue
85+
Cleanup-CloudService $svcName
8386
}
8487
}

src/ServiceManagement/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.DscExtensionTests/TestGetAzureVMDscExtension.json

Lines changed: 3064 additions & 939 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)