grokkit/internal/version/version_test.go

41 lines
614 B
Go
Raw Permalink Normal View History

package version
import "testing"
func TestVersionInfo(t *testing.T) {
t.Parallel()
tests := []struct {
name string
check func(*testing.T)
}{
{
name: "Version",
check: func(t *testing.T) {
if Version == "" {
t.Error("Version should be set")
}
},
},
{
name: "Commit",
check: func(t *testing.T) {
// Commit can be empty in dev builds
},
},
{
name: "BuildDate",
check: func(t *testing.T) {
// BuildDate can be empty in dev builds
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tt.check(t)
})
}
}