diff --git a/go.mod b/go.mod index ded4198..a816c8c 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module git.eeqj.de/sneak/bsdaily go 1.26.4 require ( + github.com/spf13/cobra v1.10.2 golang.org/x/sys v0.41.0 modernc.org/sqlite v1.44.3 ) @@ -14,7 +15,6 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/spf13/cobra v1.10.2 // indirect github.com/spf13/pflag v1.0.9 // indirect golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect modernc.org/libc v1.67.6 // indirect diff --git a/internal/bsdaily/bsdaily_test.go b/internal/bsdaily/bsdaily_test.go new file mode 100644 index 0000000..279e81f --- /dev/null +++ b/internal/bsdaily/bsdaily_test.go @@ -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") + } +}