mirror of
https://github.com/actions/go-versions.git
synced 2024-06-09 09:22:29 +02:00
fixed test
This commit is contained in:
parent
534826cfa6
commit
84bf6fea5a
|
@ -15,6 +15,8 @@ BeforeAll {
|
|||
}
|
||||
}
|
||||
|
||||
[version]$Version = $env:VERSION
|
||||
|
||||
Describe "Go" {
|
||||
It "is available" {
|
||||
"go version" | Should -ReturnZeroExitCode
|
||||
|
@ -22,9 +24,9 @@ Describe "Go" {
|
|||
|
||||
It "version is correct" {
|
||||
$versionOutput = Invoke-Expression -Command "go version"
|
||||
$finalVersion = ($env:VERSION).ToString(3)
|
||||
$finalVersion = $Version.ToString(3)
|
||||
If ($Version.Build -eq "0"){
|
||||
$finalVersion = ($env:VERSION).ToString(2)
|
||||
$finalVersion = $Version.ToString(2)
|
||||
}
|
||||
$versionOutput | Should -Match $finalVersion
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue