blob: 2ba9eda01fad4cea0dc4b4749251021c9fa821d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
BeforeAll {
. $PSScriptRoot/lib/lib.ps1
}
Describe "Systemd Services" {
BeforeAll {
$distro = Install-Distro
}
It "should boot" {
$distro.Launch("true")
$LASTEXITCODE | Should -Be 0
}
It "should not have any failed unit" {
$output = $distro.Launch("sudo systemctl list-units --failed") | Remove-Escapes
$output | Where-Object { $_.trim() -ne "" } | Select-Object -Last 1 | Should -BeExactly "0 loaded units listed."
$LASTEXITCODE | Should -Be 0
}
AfterAll {
$distro.Uninstall()
}
}
|