- Initialize go.mod with module path kode.naiv.no/olemd/forgejo-mcp-broker
- Create directory layout: cmd/broker + internal/{buildinfo,config,log,store,httpserver}
- Add Makefile with build/test/lint/tidy/clean targets and ldflags-injected build info
- Stub cmd/broker/main.go with --version support; real wiring follows in -t37
- Stub doc.go for each internal/* package, pointing to the issue that fills it in
Closes forgejo-mcp-broker-n84.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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")
|
|
}
|
|
}
|