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.
22 lines
733 B
Go
22 lines
733 B
Go
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")
|
|
}
|
|
}
|