From 86eeba994c4f5784fddaebd8581b9e40e26b309b Mon Sep 17 00:00:00 2001 From: WangWeiLin-MV <156736127+WangWeiLin-MV@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:00:23 +0800 Subject: [PATCH] [e2e] Test end-to-end-tests.ps1 --- .github/workflows/build.yaml | 3 ++- .../end-to-end-tests-dir/0-expect-1-pass.ps1 | 2 ++ .../end-to-end-tests-dir/0-expect-2-fail.ps1 | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 azure-pipelines/end-to-end-tests-dir/0-expect-1-pass.ps1 create mode 100644 azure-pipelines/end-to-end-tests-dir/0-expect-2-fail.ps1 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 10f693917c..f931593f54 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,6 +80,7 @@ jobs: shell: pwsh run: | cd out/build/${{ matrix.preset }} - ${{ github.workspace }}/azure-pipelines/end-to-end-tests.ps1 -RunArtifactsTests + Get-Module Pester -ListAvailable + ${{ github.workspace }}/azure-pipelines/end-to-end-tests.ps1 -RunArtifactsTests -Filter:'0-expect-' env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg-root diff --git a/azure-pipelines/end-to-end-tests-dir/0-expect-1-pass.ps1 b/azure-pipelines/end-to-end-tests-dir/0-expect-1-pass.ps1 new file mode 100644 index 0000000000..a2da368856 --- /dev/null +++ b/azure-pipelines/end-to-end-tests-dir/0-expect-1-pass.ps1 @@ -0,0 +1,2 @@ + +Write-Host "It's test 1 pass." diff --git a/azure-pipelines/end-to-end-tests-dir/0-expect-2-fail.ps1 b/azure-pipelines/end-to-end-tests-dir/0-expect-2-fail.ps1 new file mode 100644 index 0000000000..64194a403b --- /dev/null +++ b/azure-pipelines/end-to-end-tests-dir/0-expect-2-fail.ps1 @@ -0,0 +1,11 @@ +BeforeAll { + $poshVcpkgModulePath = "$PSScriptRoot/../../scripts/posh-vcpkg.psd1" + # $poshVcpkgInfo = Import-PowerShellDataFile -Path $poshVcpkgModulePath + # $poshVcpkgInfo | Should -BeOfType 'Hashtable' + # Get-Module -Name 'posh-vcpkg' | Should -BeNullOrEmpty + Import-Module $poshVcpkgModulePath +} + +Describe 'Module posh-vcpkg tests' { + It 'Expect fail' {} +}