[ubuntu] Refactor pester tests (#9006)

* [ubuntu] Refactor pester tests

* Fix key name and add BeforeAll

* Fix ActionArchiveCache test
This commit is contained in:
Shamil Mubarakshin
2023-12-14 17:33:34 +01:00
committed by GitHub
parent 2179765026
commit dbb10c67ba
15 changed files with 70 additions and 179 deletions

View File

@@ -1,7 +1,7 @@
Describe "RunnerCache" {
Context "runner cache directory not empty" {
It "/opt/runner-cache not empty" {
(Get-ChildItem -Path "/opt/runner-cache/*.tar.gz" -Recurse).Count | Should -BeGreaterThan 0
It "<RunnerCachePath> not empty" -TestCases @{ RunnerCachePath = "/opt/runner-cache" } {
(Get-ChildItem -Path "$RunnerCachePath/*.tar.gz" -Recurse).Count | Should -BeGreaterThan 0
}
}
}