diff --git a/test/!RunAllTests.ps1 b/test/!RunAllTests.ps1 index 64977d8..4ffe0ef 100644 --- a/test/!RunAllTests.ps1 +++ b/test/!RunAllTests.ps1 @@ -12,7 +12,9 @@ Param( [Switch]$InstallModules ) +Write-Host " ========= ENVIRONMENT ==========" Write-Host "Host Name: $($Host.name)" +Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)" $rootPath = Switch ($Host.name) { 'Visual Studio Code Host' { split-path $psEditor.GetEditorContext().CurrentFile.Path } @@ -25,8 +27,8 @@ $folder = Split-Path $rootPath -Parent Write-Host "Setting new location: $folder" Push-Location "$folder" -Get-Location | Out-Host - +Get-Location +Write-Host " ========= ENVIRONMENT ==========" # Add the module location to the value of the PSModulePath environment variable #$p = [Environment]::GetEnvironmentVariable("PSModulePath") diff --git a/test/Incremental-Deployment.Tests.ps1 b/test/Incremental-Deployment.Tests.ps1 index f48eb8b..c623798 100644 --- a/test/Incremental-Deployment.Tests.ps1 +++ b/test/Incremental-Deployment.Tests.ps1 @@ -68,7 +68,7 @@ InModuleScope azure.datafactory.tools { } It 'Should fails when Container doesn''t exist' { { Set-StateToStorage -ds $dstate -DataFactoryName $DataFactoryName -LocationUri "$($script:StorageUri)/nocontainer997755/folder" } - | Should -Throw -ExceptionType ([System.Management.Automation.RuntimeException]) + | Should -Throw -ExceptionType ([Microsoft.Azure.Storage.StorageException]) } } diff --git a/test/Publish-AdfV2FromJson-2.Tests.ps1 b/test/Publish-AdfV2FromJson-2.Tests.ps1 index 6845965..54c7d05 100644 --- a/test/Publish-AdfV2FromJson-2.Tests.ps1 +++ b/test/Publish-AdfV2FromJson-2.Tests.ps1 @@ -66,10 +66,11 @@ InModuleScope azure.datafactory.tools { -DataFactoryName "$DataFactoryName" ` -Location "$Location" -Option $opt } - It 'New GP "adftools_deployment_state" should exist' { - $f = Get-AzDataFactoryV2 -ResourceGroupName $t.ResourceGroupName -DataFactoryName $t.DataFactoryName - $f.GlobalParameters.Keys.Contains("adftools_deployment_state") | Should -Be $true - } + # This is no longer valid as new version keep state in Storage, not in ADF + # It 'New GP "adftools_deployment_state" should exist' { + # $f = Get-AzDataFactoryV2 -ResourceGroupName $t.ResourceGroupName -DataFactoryName $t.DataFactoryName + # $f.GlobalParameters.Keys.Contains("adftools_deployment_state") | Should -Be $true + # } It 'Should run successfully even when no Global Params are in target (exists) ADF' { Publish-AdfV2FromJson -RootFolder "$RootFolder" `