Add minimal compilation smoke test; tidy go.mod
Some checks failed
check / check (push) Failing after 59s
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:
21
internal/bsdaily/bsdaily_test.go
Normal file
21
internal/bsdaily/bsdaily_test.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user