You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
Hi everyone, I'd like to know if there a way to nest test, but using 'for', it could seem odd, but if you have a case where you have to test for a package installation, and you have a list of packages, could be easy to think the solution as follow:
It works if I use alone, but with a list of packages:
for pkg in openssh-server vim curl
do
@test "Check package $pkg installed" {
run dpkg -l $pkg
[[ "${lines[5]}" == "ii $pkg"* ]]
}
done
The test is only one, not 3, and the output is as follow, the last package:
✓ Check package curl installed
1 test, 0 failures
Is there away to do this?
In other test tools as Pester for Powershell, that is possible, I know that the solution is different, but I just ask for doubt, maybe there is a way that I don't know.
Regards
The text was updated successfully, but these errors were encountered:
Hi everyone, I'd like to know if there a way to nest test, but using 'for', it could seem odd, but if you have a case where you have to test for a package installation, and you have a list of packages, could be easy to think the solution as follow:
It works if I use alone, but with a list of packages:
The test is only one, not 3, and the output is as follow, the last package:
Is there away to do this?
In other test tools as Pester for Powershell, that is possible, I know that the solution is different, but I just ask for doubt, maybe there is a way that I don't know.
Regards
The text was updated successfully, but these errors were encountered: