Stamp app version into builds
This commit is contained in:
@@ -5517,6 +5517,25 @@ func TestShowAboutSection(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCurrentAppVersion(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
previous := appVersion
|
||||
t.Cleanup(func() {
|
||||
appVersion = previous
|
||||
})
|
||||
|
||||
appVersion = ""
|
||||
if got := currentAppVersion(); got != "dev" {
|
||||
t.Fatalf("currentAppVersion() with empty version = %q, want dev", got)
|
||||
}
|
||||
|
||||
appVersion = " v0.0.1 "
|
||||
if got := currentAppVersion(); got != "v0.0.1" {
|
||||
t.Fatalf("currentAppVersion() with linker version = %q, want v0.0.1", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUIAPIPolicyTargetActionsUseCurrentContext(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user