21 lines
510 B
Go
21 lines
510 B
Go
|
|
package buildinfo_test
|
||
|
|
|
||
|
|
import (
|
||
|
|
"testing"
|
||
|
|
|
||
|
|
"kode.naiv.no/olemd/forgejo-mcp-broker/internal/buildinfo"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestDefaultsArePopulated(t *testing.T) {
|
||
|
|
// Build-info placeholders must never be empty: they are exposed on /healthz
|
||
|
|
// and an empty value would be observable to operators as a broken build.
|
||
|
|
if buildinfo.Version == "" {
|
||
|
|
t.Error("Version is empty")
|
||
|
|
}
|
||
|
|
if buildinfo.GitRevision == "" {
|
||
|
|
t.Error("GitRevision is empty")
|
||
|
|
}
|
||
|
|
if buildinfo.BuildDate == "" {
|
||
|
|
t.Error("BuildDate is empty")
|
||
|
|
}
|
||
|
|
}
|