test: add windows ui and packaging smoke
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Write-Host 'Running Go tests...'
|
||||
go test ./...
|
||||
go vet ./...
|
||||
|
||||
$artifact = Join-Path (Get-Location) 'build/chub.exe'
|
||||
Write-Host 'Building Windows artifact...'
|
||||
go build -o $artifact ./cmd/chub
|
||||
if (-not (Test-Path -LiteralPath $artifact)) {
|
||||
throw "artifact was not created: $artifact"
|
||||
}
|
||||
|
||||
Write-Host 'Checking CLI JSON contract...'
|
||||
$list = & $artifact list
|
||||
if ($LASTEXITCODE -ne 0 -or $list -notmatch '"instances"') {
|
||||
throw "list command did not return the expected JSON contract"
|
||||
}
|
||||
$events = & $artifact events
|
||||
if ($LASTEXITCODE -ne 0 -or $events -notmatch 'browser.snapshot') {
|
||||
throw "events command did not return the expected local snapshot"
|
||||
}
|
||||
|
||||
Write-Host "Windows smoke passed: $artifact"
|
||||
Reference in New Issue
Block a user