Add minimal compilation smoke test; tidy go.mod
Some checks failed
check / check (push) Failing after 59s

Add a smoke test that references the package's exported surface so go
test fails if it stops compiling. Run go mod tidy to promote cobra to
a direct dependency.
This commit is contained in:
2026-06-28 10:09:56 +02:00
parent 7316054b07
commit 8845f0ade6
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
package bsdaily
import "testing"
// TestCompiles is a minimal smoke test that references the package's exported
// surface so that `go test` fails if the package stops compiling. It does not
// touch the filesystem or any of the hard-coded production paths.
func TestCompiles(t *testing.T) {
if DBFilename == "" || WALFilename == "" || SHMFilename == "" {
t.Fatal("expected database filename constants to be set")
}
if SnapshotBase == "" || TmpBase == "" || DailiesBase == "" {
t.Fatal("expected base path constants to be set")
}
if MinTmpFreeBytes == 0 || MinDailiesFreeBytes == 0 {
t.Fatal("expected free-space thresholds to be set")
}
if ErrNoPosts == nil {
t.Fatal("expected ErrNoPosts sentinel to be set")
}
}