summaryrefslogtreecommitdiff
path: root/tests/exit-codes.Tests.ps1
blob: 8f8bae947988f3a66eba1d9bebdf902e39a56c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
BeforeAll {
  . $PSScriptRoot/lib/lib.ps1
}

Describe "Exit Codes" {
  BeforeAll {
    $distro = Install-Distro
  }

  It "should return 0 when running true" {
    $distro.Launch("true")
    $LASTEXITCODE | Should -Be 0
  }

  It "should return 1 when running false" {
    $distro.Launch("false")
    $LASTEXITCODE | Should -Be 1
  }

  AfterAll {
    $distro.Uninstall()
  }
}