[ubuntu] Refactor test helpers (#8938)

* [ubuntu] Refactor test helpers

* [ubuntu] Adjust help comment
This commit is contained in:
Shamil Mubarakshin
2023-12-04 12:05:25 +01:00
committed by GitHub
parent 5ed2615017
commit ff1dc02cbc
4 changed files with 82 additions and 19 deletions

View File

@@ -281,7 +281,7 @@ Describe "Kubernetes tools" {
}
It "kubectl" {
"kubectl version --client=true" | Should -MatchCommandOutput "Client Version: v"
"kubectl version --client=true" | Should -OutputTextMatchingRegex "Client Version: v"
}
It "helm" {
@@ -341,7 +341,7 @@ Describe "Containers" {
# https://github.com/actions/runner-images/issues/7753
It "podman networking" -TestCases "podman CNI plugins" {
"podman network create -d bridge test-net && podman network ls" | Should -Not -MatchCommandOutput "Error"
"podman network create -d bridge test-net && podman network ls" | Should -Not -OutputTextMatchingRegex "Error"
}
}
@@ -382,7 +382,7 @@ Describe "Ruby" {
if ($gemTestCases)
{
It "Gem <gemName> is installed" -TestCases $gemTestCases {
"gem list -i '^$gemName$'" | Should -MatchCommandOutput "true"
"gem list -i '^$gemName$'" | Should -OutputTextMatchingRegex "true"
}
}
}