fix(unix): handle Statfs field types for disk space check (#646)

* fix(unix): handle Statfs field types for disk space check

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix(freebsd): build disk space check without type mismatch

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Hubbard
2025-12-19 17:50:14 -08:00
committed by GitHub
parent 13a471fe45
commit b69df499ea
5 changed files with 57 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ func TestConnectionLimits(t *testing.T) {
}
defer store.Close()
socketPath := filepath.Join(tmpDir, "test.sock")
socketPath := newTestSocketPath(t)
// Set low connection limit for testing
os.Setenv("BEADS_DAEMON_MAX_CONNS", "5")
@@ -158,7 +158,7 @@ func TestRequestTimeout(t *testing.T) {
}
defer store.Close()
socketPath := filepath.Join(tmpDir, "test.sock")
socketPath := newTestSocketPath(t)
// Set very short timeout for testing
os.Setenv("BEADS_DAEMON_REQUEST_TIMEOUT", "100ms")
@@ -199,14 +199,9 @@ func TestRequestTimeout(t *testing.T) {
}
func TestHealthResponseIncludesLimits(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "bd-limits-test-*")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpDir)
tmpDir := t.TempDir()
dbPath := filepath.Join(tmpDir, "test.db")
socketPath := filepath.Join(tmpDir, "test.sock")
socketPath := newTestSocketPath(t)
store, err := sqlite.New(context.Background(), dbPath)
if err != nil {