diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-14 10:37:18 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-14 10:37:18 +0300 |
| commit | b0ac28f90ddf85e85b0308229569292fd6f7f9a2 (patch) | |
| tree | a0598fdb2f598f9f333ae078fb44ab84d5b2f010 /internal/daemon/upload_test.go | |
| parent | 28b49a9e8bd0190679b8f60019676a1dab2bcfcc (diff) | |
daemon: NewHandler returns error instead of panicking (l3)
Replace Handler with NewHandler(statsDir) (http.Handler, error) when the
auth store cannot be opened, matching Run's error wrapping. Tests use a
small helper; add coverage for open failure on a read-only stats dir.
Made-with: Cursor
Diffstat (limited to 'internal/daemon/upload_test.go')
| -rw-r--r-- | internal/daemon/upload_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/daemon/upload_test.go b/internal/daemon/upload_test.go index 5a3755f..2cc52f3 100644 --- a/internal/daemon/upload_test.go +++ b/internal/daemon/upload_test.go @@ -179,7 +179,7 @@ func TestOpenAuthStoreBadPath(t *testing.T) { func TestUploadMethodNotAllowedTable(t *testing.T) { statsDir := t.TempDir() - srv := httptest.NewServer(Handler(statsDir)) + srv := httptest.NewServer(testHandler(t, statsDir)) defer srv.Close() for _, method := range []string{http.MethodGet, http.MethodPost, http.MethodDelete} { t.Run(method, func(t *testing.T) { |
