mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-30 04:50:45 +02:00
test: force constant goversion et al on tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
f3aa9c79fa
commit
007690f154
@ -8,6 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func TestVersion(t *testing.T) {
|
||||
const goVersion = "go1.20.3"
|
||||
const compiler = "gc"
|
||||
const platform = "linux/amd64"
|
||||
|
||||
for name, tt := range map[string]struct {
|
||||
version, commit, date, builtBy string
|
||||
}{
|
||||
@ -34,6 +38,9 @@ func TestVersion(t *testing.T) {
|
||||
tt := tt
|
||||
t.Run(name, func(t *testing.T) {
|
||||
v := buildVersion(tt.version, tt.commit, tt.date, tt.builtBy)
|
||||
v.GoVersion = goVersion
|
||||
v.Compiler = compiler
|
||||
v.Platform = platform
|
||||
out, err := v.JSONString()
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user