Files
runner-images/images/ubuntu/scripts/tests/ActionArchiveCache.Tests.ps1
T

19 lines
758 B
PowerShell
Raw Normal View History

2023-10-11 13:31:13 -04:00
Describe "ActionArchiveCache" {
2023-12-14 17:33:34 +01:00
BeforeDiscovery {
$actionArchiveCachePath = "/opt/actionarchivecache"
$tarballTestCases = Get-ChildItem -Path "$actionArchiveCachePath/*.tar.gz" -Recurse | ForEach-Object { @{ ActionTarball = $_.FullName } }
}
2023-10-11 13:31:13 -04:00
Context "Action archive cache directory not empty" {
2023-12-14 17:33:34 +01:00
It "<ActionArchiveCachepath> not empty" -TestCases @{ ActionArchiveCachepath = $actionArchiveCachePath } {
(Get-ChildItem -Path "$ActionArchiveCachepath/*.tar.gz" -Recurse).Count | Should -BeGreaterThan 0
2023-10-11 13:31:13 -04:00
}
}
Context "Action tarball not empty" {
2023-12-14 17:33:34 +01:00
It "<ActionTarball>" -TestCases $tarballTestCases {
2023-10-11 13:31:13 -04:00
(Get-Item "$ActionTarball").Length | Should -BeGreaterThan 0
}
}
}