-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed should operators in test hab install script for windows
Signed-off-by: Sougata Bhattacharjee <[email protected]>
- Loading branch information
1 parent
d512920
commit d9bdbef
Showing
1 changed file
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,49 @@ | ||
Describe "Install habitat using install.ps1" { | ||
It "can install the latest version of Habitat" { | ||
components/hab/install.ps1 | ||
$LASTEXITCODE | Should -Be 0 | ||
(Get-Command hab).Path | Should -Be "C:\ProgramData\Habitat\hab.exe" | ||
if ($LASTEXITCODE -ne 0) { | ||
throw "Installation failed with exit code $LASTEXITCODE" | ||
} | ||
|
||
$path = (Get-Command hab).Path | ||
if ($path -ne "C:\ProgramData\Habitat\hab.exe") { | ||
throw "Expected Habitat path 'C:\ProgramData\Habitat\hab.exe' but got '$path'" | ||
} | ||
} | ||
|
||
It "can install a specific version of Habitat" { | ||
components/hab/install.ps1 -v 0.90.6 | ||
$LASTEXITCODE | Should -Be 0 | ||
if ($LASTEXITCODE -ne 0) { | ||
throw "Installation failed with exit code $LASTEXITCODE" | ||
} | ||
|
||
$result = hab --version | ||
$result | Should -Match "hab 0.90.6/*" | ||
if ($result -notmatch "hab 0\.90\.6/.*") { | ||
throw "Expected version 'hab 0.90.6/*' but got '$result'" | ||
} | ||
} | ||
|
||
It "can install a specific version of legacy Habitat package" { | ||
components/hab/install.ps1 -v 0.79.1 | ||
$LASTEXITCODE | Should -Be 0 | ||
if ($LASTEXITCODE -ne 0) { | ||
throw "Installation failed with exit code $LASTEXITCODE" | ||
} | ||
|
||
$result = hab --version | ||
$result | Should -Match "hab 0.79.1/*" | ||
if ($result -notmatch "hab 0\.79\.1/.*") { | ||
throw "Expected version 'hab 0.79.1/*' but got '$result'" | ||
} | ||
} | ||
|
||
It "ignores release when installing from packages.chef.io" { | ||
components/hab/install.ps1 -v "0.90.6/20191112141314" | ||
$LASTEXITCODE | Should -Be 0 | ||
if ($LASTEXITCODE -ne 0) { | ||
throw "Installation failed with exit code $LASTEXITCODE" | ||
} | ||
|
||
$result = hab --version | ||
$result | Should -Match "hab 0.90.6/*" | ||
if ($result -notmatch "hab 0\.90\.6/.*") { | ||
throw "Expected version 'hab 0.90.6/*' but got '$result'" | ||
} | ||
} | ||
} |