From 0bc7859de3113d8dcfa6f18ed8a8cf1d5c326a16 Mon Sep 17 00:00:00 2001 From: Freddy Kristiansen Date: Sat, 2 Dec 2023 09:57:08 +0100 Subject: [PATCH] Run tests (#3238) Add a new workflow to be able to run selected tests on a given REF, like: ![image](https://github.com/microsoft/navcontainerhelper/assets/10775043/f89a0ff8-fd5d-40fd-b74f-0eedbcc3dc6c) --------- Co-authored-by: freddydk --- .github/workflows/CI.yaml | 8 +- .github/workflows/Release.yaml | 17 +- .github/workflows/RunTests.yaml | 158 ++++++++++++++++++ LinuxTests/Auth.Tests.ps1 | 3 +- LinuxTests/Saas.Tests.ps1 | 3 +- Tests/Api.Tests.ps1 | 3 +- Tests/AppHandling (NAV).Tests.ps1 | 3 +- Tests/AppHandling.Tests.ps1 | 3 +- Tests/AzureAD.Tests.ps1 | 3 +- Tests/AzureVM.Tests.ps1 | 3 +- Tests/Bacpac (MT).Tests.ps1 | 3 +- Tests/Bacpac (NAV).Tests.ps1 | 3 +- Tests/Bacpac.Tests.ps1 | 3 +- Tests/CompanyHandling.Tests.ps1 | 3 +- Tests/ConfigPackageHandling.Tests.ps1 | 3 +- Tests/ContainerHandling.Tests.ps1 | 3 +- Tests/ContainerInfo.Tests.ps1 | 3 +- Tests/GetAndRunTests (Windows Auth).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 10).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 11).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 14).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 15).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 16).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 17).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 18).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 19).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 20).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 21).Tests.ps1 | 3 +- Tests/GetAndRunTests (version 9).Tests.ps1 | 3 +- Tests/Misc.Tests.ps1 | 3 +- Tests/ObjectHandling (NAV).Tests.ps1 | 3 +- Tests/PackageHandling.Tests.ps1 | 3 +- Tests/Run-AlPipeline (Windows Auth).Tests.ps1 | 3 +- Tests/Run-AlPipeline.Tests.ps1 | 3 +- Tests/SymbolHandling.Tests.ps1 | 3 +- Tests/TenantHandling.Tests.ps1 | 3 +- Tests/UserHandling.Tests.ps1 | 3 +- Tests/_TestRunOne.ps1 | 3 +- Tests/_TestRunner.ps1 | 3 +- 39 files changed, 208 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/RunTests.yaml diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index adaca419d..acfb1fb46 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -24,6 +24,7 @@ defaults: jobs: AnalyzeTests: + if: github.repository == 'Microsoft/NavContainerHelper' runs-on: [ windows-latest ] outputs: tests: ${{ steps.Analyze.outputs.tests }} @@ -37,6 +38,7 @@ jobs: - name: Analyze id: Analyze run: | + $errorActionPreference = "stop" $tests = @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\*.Tests.ps1') | ForEach-Object { $_.BaseName }) | ConvertTo-Json -compress Add-Content -Path $env:GITHUB_OUTPUT -Value "tests=$tests" Write-Host "tests=$tests" @@ -62,7 +64,7 @@ jobs: try { $errorActionPreference = "stop" Set-StrictMode -version 2.0 - $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}'; "insiderSasToken" = '${{ secrets.insiderSasToken }}' } + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } $result = Invoke-Pester -Container $pesterContainer -passthru if ($result.FailedCount -gt 0) { Write-Host "::Error::$($result.FailedCount) tests are failing" @@ -95,7 +97,7 @@ jobs: try { $errorActionPreference = "stop" Set-StrictMode -version 2.0 - $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}'; "insiderSasToken" = '${{ secrets.insiderSasToken }}' } + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } $result = Invoke-Pester -Container $pesterContainer -passthru if ($result.FailedCount -gt 0) { Write-Host "::Error::$($result.FailedCount) tests are failing" @@ -128,7 +130,7 @@ jobs: try { $errorActionPreference = "stop" Set-StrictMode -version 2.0 - $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'LinuxTests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}'; "insiderSasToken" = '${{ secrets.insiderSasToken }}' } + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'LinuxTests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } $result = Invoke-Pester -Container $pesterContainer -passthru if ($result.FailedCount -gt 0) { Write-Host "::Error::$($result.FailedCount) tests are failing" diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 71559c2f6..bf3518140 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -14,6 +14,7 @@ defaults: jobs: Deploy: + if: github.repository == 'Microsoft/NavContainerHelper' runs-on: [ windows-latest ] steps: - name: Checkout @@ -21,6 +22,7 @@ jobs: - name: Deploy run: | + $errorActionPreference = "stop" try { $path = Join-Path ([System.IO.Path]::GetTempPath()) "BcContainerHelper" New-Item -path $path -itemType Directory | Out-Null @@ -56,7 +58,7 @@ jobs: Write-Host "Release Notes:" Write-Host $VersionReleaseNotes - + Write-Host "Update Module Manifest" Update-ModuleManifest -Path (Join-Path $path "BcContainerHelper.psd1") ` -RootModule "BcContainerHelper.psm1" ` @@ -67,28 +69,27 @@ jobs: -CompanyName "Microsoft" ` -ReleaseNotes $versionReleaseNotes - $certFileName = Join-Path ([System.IO.Path]::GetTempPath()) "$([GUID]::NewGuid().ToString()).pfx" Download-File -sourceUrl '${{ secrets.CodeSignCertificateUrl }}' -destinationFile $certFileName - + Remove-Module BcContainerHelper - + Write-Host $path - + Write-Host "Signing scripts" $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certFileName, '${{ secrets.CodeSignCertificatePassword }}') $filesToSign = @((Get-ChildItem $path -Filter "*.ps1" -Recurse -Depth 99).FullName)+ @((Get-ChildItem $path -Filter "*.psm1" -Recurse -Depth 99).FullName) Set-AuthenticodeSignature -Certificate $cert -HashAlgorithm SHA256 -TimestampServer "http://timestamp.digicert.com" -FilePath $filesToSign - + Write-Host "Upload to storage (preview)" $storageContext = New-AzureStorageContext -ConnectionString '${{ secrets.BchStorageConnectionString }}' New-AzureStorageContainer -Name 'public' -Context $storageContext -Permission 'Container' -ErrorAction Ignore | Out-Null - + Compress-Archive -path $path -DestinationPath "$($path).zip" Set-AzureStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "$version.zip" -Force | Out-Null Set-AzureStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "latest.zip" -Force | Out-Null - + Write-Host "Publishing Module" Publish-Module -Path $path -NuGetApiKey '${{ secrets.NugetKey }}' -SkipAutomaticTags } diff --git a/.github/workflows/RunTests.yaml b/.github/workflows/RunTests.yaml new file mode 100644 index 000000000..d22609867 --- /dev/null +++ b/.github/workflows/RunTests.yaml @@ -0,0 +1,158 @@ +name: Run Tests + +on: + workflow_dispatch: + inputs: + ref: + description: ref on which to run the end-2-end tests (default is head_sha on the current branch) + required: false + default: '' + testPatterns: + description: Commaseparated list of patterns to match against test names (default is * for all tests) + required: false + default: '' + +permissions: + contents: read + actions: read + pull-requests: write + checks: write + +concurrency: + group: 'runTests-${{ github.ref }}' + cancel-in-progress: true + +defaults: + run: + shell: powershell + +jobs: + AnalyzeTests: + runs-on: [ windows-latest ] + outputs: + tests: ${{ steps.Analyze.outputs.tests }} + linuxtests: ${{ steps.Analyze.outputs.linuxtests }} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + lfs: true + + - name: Analyze + id: Analyze + env: + testPatterns: ${{ github.event.inputs.testPatterns }} + run: | + $errorActionPreference = "stop" + $testPatterns = $ENV:TESTPATTERNS + if (!$testPatterns) { $testPatterns = '*' } + $testPatternArr = $testPatterns.Split(',') + Write-Host "Running test matching patterns:" + $testPatternArr | ForEach-Object { Write-Host "- $_" } + $tests = ConvertTo-Json -compress -InputObject @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\*.Tests.ps1') | Where-Object { $name = $_.Basename; $testPatternArr | Where-Object { $name -like "$($_).Tests" } } | ForEach-Object { $_.BaseName }) + Add-Content -Path $env:GITHUB_OUTPUT -Value "tests=$tests" + Write-Host "tests=$tests" + $linuxtests = ConvertTo-Json -compress -InputObject @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE 'LinuxTests\*.Tests.ps1') | Where-Object { $name = $_.Basename; $testPatternArr | Where-Object { $name -like "$($_).Tests" } } | ForEach-Object { $_.BaseName }) + Add-Content -Path $env:GITHUB_OUTPUT -Value "linuxtests=$linuxtests" + Write-Host "linuxtests=$linuxtests" + + PS5: + runs-on: [ windows-latest ] + needs: [ AnalyzeTests ] + if: needs.AnalyzeTests.outputs.tests != '[]' + strategy: + matrix: + test: ${{fromJson(needs.AnalyzeTests.outputs.tests)}} + fail-fast: false + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + lfs: true + + - name: Run Tests + run: | + try { + $errorActionPreference = "stop" + Set-StrictMode -version 2.0 + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } + $result = Invoke-Pester -Container $pesterContainer -passthru + if ($result.FailedCount -gt 0) { + Write-Host "::Error::$($result.FailedCount) tests are failing" + $host.SetShouldExit(1) + } + } + catch { + Write-Host "::Error::Exception when running tests. The Error was $($_.Exception.Message)" + $host.SetShouldExit(1) + } + + PS7: + runs-on: [ windows-latest ] + needs: [ AnalyzeTests ] + if: needs.AnalyzeTests.outputs.tests != '[]' + strategy: + matrix: + test: ${{fromJson(needs.AnalyzeTests.outputs.tests)}} + fail-fast: false + defaults: + run: + shell: pwsh + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + lfs: true + + - name: Run Tests + run: | + try { + $errorActionPreference = "stop" + Set-StrictMode -version 2.0 + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'Tests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } + $result = Invoke-Pester -Container $pesterContainer -passthru + if ($result.FailedCount -gt 0) { + Write-Host "::Error::$($result.FailedCount) tests are failing" + $host.SetShouldExit(1) + } + } + catch { + Write-Host "::Error::Exception when running tests. The Error was $($_.Exception.Message)" + $host.SetShouldExit(1) + } + + Linux: + runs-on: [ ubuntu-latest ] + needs: [ AnalyzeTests ] + if: needs.AnalyzeTests.outputs.linuxtests != '[]' + strategy: + matrix: + test: ${{fromJson(needs.AnalyzeTests.outputs.linuxtests)}} + fail-fast: false + defaults: + run: + shell: pwsh + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + lfs: true + + - name: Run Tests + run: | + try { + $errorActionPreference = "stop" + Set-StrictMode -version 2.0 + $pesterContainer = New-PesterContainer -Path (Join-Path $ENV:GITHUB_WORKSPACE 'LinuxTests\${{ matrix.test }}.ps1') -Data @{ "licenseFile" = '${{ secrets.licensefile }}'; "buildLicenseFile" = '${{ secrets.buildLicenseFile }}' } + $result = Invoke-Pester -Container $pesterContainer -passthru + if ($result.FailedCount -gt 0) { + Write-Host "::Error::$($result.FailedCount) tests are failing" + $host.SetShouldExit(1) + } + } + catch { + Write-Host "::Error::Exception when running tests. The Error was $($_.Exception.Message)" + $host.SetShouldExit(1) + } diff --git a/LinuxTests/Auth.Tests.ps1 b/LinuxTests/Auth.Tests.ps1 index 635cc4044..8a0a4b99d 100644 --- a/LinuxTests/Auth.Tests.ps1 +++ b/LinuxTests/Auth.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/LinuxTests/Saas.Tests.ps1 b/LinuxTests/Saas.Tests.ps1 index 635cc4044..8a0a4b99d 100644 --- a/LinuxTests/Saas.Tests.ps1 +++ b/LinuxTests/Saas.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Api.Tests.ps1 b/Tests/Api.Tests.ps1 index 635cc4044..8a0a4b99d 100644 --- a/Tests/Api.Tests.ps1 +++ b/Tests/Api.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/AppHandling (NAV).Tests.ps1 b/Tests/AppHandling (NAV).Tests.ps1 index 45448889f..ce0d7be62 100644 --- a/Tests/AppHandling (NAV).Tests.ps1 +++ b/Tests/AppHandling (NAV).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/AppHandling.Tests.ps1 b/Tests/AppHandling.Tests.ps1 index 3aa422f23..cdd7fd36a 100644 --- a/Tests/AppHandling.Tests.ps1 +++ b/Tests/AppHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/AzureAD.Tests.ps1 b/Tests/AzureAD.Tests.ps1 index 9417884ad..972d8ee5a 100644 --- a/Tests/AzureAD.Tests.ps1 +++ b/Tests/AzureAD.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/AzureVM.Tests.ps1 b/Tests/AzureVM.Tests.ps1 index 28304267b..8c8ca63f7 100644 --- a/Tests/AzureVM.Tests.ps1 +++ b/Tests/AzureVM.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Bacpac (MT).Tests.ps1 b/Tests/Bacpac (MT).Tests.ps1 index e23072c94..d2465fc64 100644 --- a/Tests/Bacpac (MT).Tests.ps1 +++ b/Tests/Bacpac (MT).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Bacpac (NAV).Tests.ps1 b/Tests/Bacpac (NAV).Tests.ps1 index a0ebbcca0..eeb78fe52 100644 --- a/Tests/Bacpac (NAV).Tests.ps1 +++ b/Tests/Bacpac (NAV).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Bacpac.Tests.ps1 b/Tests/Bacpac.Tests.ps1 index 6d1de4352..ccb5429da 100644 --- a/Tests/Bacpac.Tests.ps1 +++ b/Tests/Bacpac.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/CompanyHandling.Tests.ps1 b/Tests/CompanyHandling.Tests.ps1 index 5770bcaf0..d2661fbc9 100644 --- a/Tests/CompanyHandling.Tests.ps1 +++ b/Tests/CompanyHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/ConfigPackageHandling.Tests.ps1 b/Tests/ConfigPackageHandling.Tests.ps1 index b108e3b62..e59853936 100644 --- a/Tests/ConfigPackageHandling.Tests.ps1 +++ b/Tests/ConfigPackageHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/ContainerHandling.Tests.ps1 b/Tests/ContainerHandling.Tests.ps1 index 87538257f..7419f358e 100644 --- a/Tests/ContainerHandling.Tests.ps1 +++ b/Tests/ContainerHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/ContainerInfo.Tests.ps1 b/Tests/ContainerInfo.Tests.ps1 index abe3b5984..214ae1252 100644 --- a/Tests/ContainerInfo.Tests.ps1 +++ b/Tests/ContainerInfo.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (Windows Auth).Tests.ps1 b/Tests/GetAndRunTests (Windows Auth).Tests.ps1 index b6e76e44c..89313e69c 100644 --- a/Tests/GetAndRunTests (Windows Auth).Tests.ps1 +++ b/Tests/GetAndRunTests (Windows Auth).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 10).Tests.ps1 b/Tests/GetAndRunTests (version 10).Tests.ps1 index ba2b8afb7..6b810d4f9 100644 --- a/Tests/GetAndRunTests (version 10).Tests.ps1 +++ b/Tests/GetAndRunTests (version 10).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 11).Tests.ps1 b/Tests/GetAndRunTests (version 11).Tests.ps1 index b5a5f5529..103eb5be5 100644 --- a/Tests/GetAndRunTests (version 11).Tests.ps1 +++ b/Tests/GetAndRunTests (version 11).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 14).Tests.ps1 b/Tests/GetAndRunTests (version 14).Tests.ps1 index 12b96b082..44dd3f079 100644 --- a/Tests/GetAndRunTests (version 14).Tests.ps1 +++ b/Tests/GetAndRunTests (version 14).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 15).Tests.ps1 b/Tests/GetAndRunTests (version 15).Tests.ps1 index e0966f234..82fecee5c 100644 --- a/Tests/GetAndRunTests (version 15).Tests.ps1 +++ b/Tests/GetAndRunTests (version 15).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 16).Tests.ps1 b/Tests/GetAndRunTests (version 16).Tests.ps1 index 73dbcf4c7..8dd7d456a 100644 --- a/Tests/GetAndRunTests (version 16).Tests.ps1 +++ b/Tests/GetAndRunTests (version 16).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 17).Tests.ps1 b/Tests/GetAndRunTests (version 17).Tests.ps1 index edaca0e71..0a524c9b3 100644 --- a/Tests/GetAndRunTests (version 17).Tests.ps1 +++ b/Tests/GetAndRunTests (version 17).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 18).Tests.ps1 b/Tests/GetAndRunTests (version 18).Tests.ps1 index 81d821f8f..e95d51747 100644 --- a/Tests/GetAndRunTests (version 18).Tests.ps1 +++ b/Tests/GetAndRunTests (version 18).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 19).Tests.ps1 b/Tests/GetAndRunTests (version 19).Tests.ps1 index a01b97f9f..d284f8f46 100644 --- a/Tests/GetAndRunTests (version 19).Tests.ps1 +++ b/Tests/GetAndRunTests (version 19).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 20).Tests.ps1 b/Tests/GetAndRunTests (version 20).Tests.ps1 index 30d86680c..e00f40287 100644 --- a/Tests/GetAndRunTests (version 20).Tests.ps1 +++ b/Tests/GetAndRunTests (version 20).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 21).Tests.ps1 b/Tests/GetAndRunTests (version 21).Tests.ps1 index 8da600d7d..fcacb1476 100644 --- a/Tests/GetAndRunTests (version 21).Tests.ps1 +++ b/Tests/GetAndRunTests (version 21).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/GetAndRunTests (version 9).Tests.ps1 b/Tests/GetAndRunTests (version 9).Tests.ps1 index 424f92705..69262be2c 100644 --- a/Tests/GetAndRunTests (version 9).Tests.ps1 +++ b/Tests/GetAndRunTests (version 9).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Misc.Tests.ps1 b/Tests/Misc.Tests.ps1 index 5c6e2d7d9..10b2b0bc7 100644 --- a/Tests/Misc.Tests.ps1 +++ b/Tests/Misc.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/ObjectHandling (NAV).Tests.ps1 b/Tests/ObjectHandling (NAV).Tests.ps1 index a6b39915e..95fa22dff 100644 --- a/Tests/ObjectHandling (NAV).Tests.ps1 +++ b/Tests/ObjectHandling (NAV).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/PackageHandling.Tests.ps1 b/Tests/PackageHandling.Tests.ps1 index 2e7cc921d..160ae6336 100644 --- a/Tests/PackageHandling.Tests.ps1 +++ b/Tests/PackageHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Run-AlPipeline (Windows Auth).Tests.ps1 b/Tests/Run-AlPipeline (Windows Auth).Tests.ps1 index ab224e01e..d57ec2b24 100644 --- a/Tests/Run-AlPipeline (Windows Auth).Tests.ps1 +++ b/Tests/Run-AlPipeline (Windows Auth).Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/Run-AlPipeline.Tests.ps1 b/Tests/Run-AlPipeline.Tests.ps1 index 4b1fa3fdd..52e59bdd9 100644 --- a/Tests/Run-AlPipeline.Tests.ps1 +++ b/Tests/Run-AlPipeline.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/SymbolHandling.Tests.ps1 b/Tests/SymbolHandling.Tests.ps1 index 63d100352..536b55f8f 100644 --- a/Tests/SymbolHandling.Tests.ps1 +++ b/Tests/SymbolHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/TenantHandling.Tests.ps1 b/Tests/TenantHandling.Tests.ps1 index 16f1ac10a..15f4f89e9 100644 --- a/Tests/TenantHandling.Tests.ps1 +++ b/Tests/TenantHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/UserHandling.Tests.ps1 b/Tests/UserHandling.Tests.ps1 index 56ae921c7..e5c7e06f7 100644 --- a/Tests/UserHandling.Tests.ps1 +++ b/Tests/UserHandling.Tests.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile, - [string] $buildlicenseFile, - [string] $insiderSasToken + [string] $buildlicenseFile ) BeforeAll { diff --git a/Tests/_TestRunOne.ps1 b/Tests/_TestRunOne.ps1 index 2193bcbe8..a7ca71931 100644 --- a/Tests/_TestRunOne.ps1 +++ b/Tests/_TestRunOne.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile = ($nchLicensefileSecret.secretValue | Get-PlainText), [string] $buildlicenseFile = ($LicensefileSecret.secretValue | Get-PlainText), - [string] $insiderSasToken = ($InsiderSasTokenSecret.SecretValue | Get-PlainText), [string] $testScript = "AppHandling.Tests.ps1" ) @@ -14,7 +13,7 @@ try { Remove-Module BcContainerHelper -ErrorAction Ignore Import-Module $modulePath -DisableNameChecking - . (Join-Path $PSScriptRoot $testScript) -licenseFile $licenseFile -buildlicenseFile $buildlicenseFile -insiderSasToken $insiderSasToken + . (Join-Path $PSScriptRoot $testScript) -licenseFile $licenseFile -buildlicenseFile $buildlicenseFile } catch { Write-Host "::Error::$($_.Exception.Message)" diff --git a/Tests/_TestRunner.ps1 b/Tests/_TestRunner.ps1 index b284150f0..f010a63ab 100644 --- a/Tests/_TestRunner.ps1 +++ b/Tests/_TestRunner.ps1 @@ -1,7 +1,6 @@ Param( [string] $licenseFile = "c:\temp\nchlicense.flf", - [string] $buildlicenseFile = "c:\temp\build.flf", - [string] $insiderSasToken = "" + [string] $buildlicenseFile = "c:\temp\build.flf" ) . (Join-Path $PSScriptRoot '_TestHelperFunctions.ps1')