Skip to content

Commit 5b624b5

Browse files
committed
github_actions: use Pester to run functional tests
During the functional tests, PowerShell Pester framework will be used to make sure that the pre-functional test environment is as expected, then Cloudbase-Init is run and the post-functional test environment is checked to be as expected. Change-Id: Ibe8ac6b6885f66887737a6932652ffd42b835413 Signed-off-by: Adrian Vladu <[email protected]>
1 parent 4fd9b57 commit 5b624b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/cloudbase_init_tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Cloudbase-Init tests
33
env:
44
UPPER_CONSTRAINTS: "https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt"
55
TEST_RESOURCES: "https://github.com/cloudbase/cloudbase-init-test-resources"
6+
TEST_RESOURCES_BRANCH: "master"
67

78
on: [push, pull_request]
89

@@ -74,7 +75,7 @@ jobs:
7475
- name: Download external dependencies
7576
shell: cmd
7677
run: |
77-
git clone %TEST_RESOURCES% test-resources
78+
git clone %TEST_RESOURCES% -b %TEST_RESOURCES_BRANCH% test-resources
7879
python -W ignore -m pip install --upgrade pip
7980
- name: Install Cloudbase-Init
8081
shell: cmd
@@ -84,6 +85,10 @@ jobs:
8485
- name: Run Cloudbase-Init functional tests
8586
shell: powershell
8687
run: |
88+
Install-Module -Force -AllowClobber -Confirm:$false "Pester"
89+
$ENV:CLOUD = "${{ matrix.cloud }}"
90+
$ENV:TEST_ARCHITECTURE = "${{ matrix.architecture }}"
91+
Invoke-Pester test-resources/functional-tests -Output Detailed -FullNameFilter TestVerifyBeforeAllPlugins
8792
try {
8893
& cmd /c "cloudbase-init.exe --noreset_service_password --config-file ./test-resources/${{ matrix.cloud }}/cloudbase-init.conf 2>&1" | Tee-Object -FilePath cloudbase-init.log
8994
} catch {}
@@ -92,3 +97,4 @@ jobs:
9297
if ($errors -or !$pluginExecution) {
9398
exit 1
9499
}
100+
Invoke-Pester test-resources/functional-tests -Output Detailed -FullNameFilter TestVerifyAfterAllPlugins

0 commit comments

Comments
 (0)