diff --git a/fix-opds-device-authentication.md b/fix-opds-device-authentication.md deleted file mode 100644 index 3dd39a2..0000000 --- a/fix-opds-device-authentication.md +++ /dev/null @@ -1,175 +0,0 @@ -# Fix OPDS Device Authentication - -## Problem Summary - -**Current State:** -- OPDS routes (`/opds/devices/*`) are **public** - no authentication -- Device sync API (`/api/sync/kobo/*`, `/api/sync/koreader/*`) uses `DeviceAuthMiddleware` → validates `devices.auth_token` -- Anyone can enumerate/access device UUIDs without authentication -- Test `GetDeviceCatalog_WithoutDeviceAuth` expects **401** (auth required) but gets **404** (device not found) - -**Design Principle:** Devices belong to users; OPDS access should require device authentication via `devices.auth_token` (same model as sync API). - ---- - -## Step-by-Step Implementation Plan - -### Step 1: Apply `DeviceAuthMiddleware` to OPDS Routes - -**File:** `internal/router/opds.go` - -**Changes:** -```go -func registerOPDSRoutes(cfg *Config) { - e := cfg.Echo - - // Apply device authentication middleware - opds := e.Group("/opds/devices") - opds.Use(cfg.DeviceAuthMiddleware.Authenticate) // ← ADD THIS - - // OPDS routes now require valid devices.auth_token - opds.GET("/:deviceId/catalog", cfg.OPDSHandler.GetDeviceCatalog) - opds.GET("/:deviceId/search", cfg.OPDSHandler.SearchDeviceCatalog) - opds.GET("/:deviceId/nav", cfg.OPDSHandler.GetDeviceNavigation) - opds.GET("/:deviceId/download/:bookId", cfg.OPDSHandler.DownloadBook) - opds.GET("/:deviceId/cover/:bookId", cfg.OPDSHandler.GetCoverImage) - opds.GET("/:deviceId/formats/:bookId", cfg.OPDSHandler.ListFormats) -} -``` - -**Rationale:** -- Reuses existing authentication pattern (proven on sync endpoints) -- Middleware validates `devices.auth_token` from `Authorization: Bearer {token}` header -- Returns 401 if missing/invalid/expired token -- Device must belong to user (already enforced in device table) - ---- - -### Step 2: Update OPDS Handler Comments - -**File:** `internal/router/opds.go` - -**Change:** -```go -// Register OPDS routes with device authentication -// Devices must use their devices.auth_token (generated during device registration/approval) -// Kobo devices store this token for both sync and OPDS catalog access -// Returns 401 Unauthorized if device token is missing, invalid, or device sync is disabled -func registerOPDSRoutes(cfg *Config) { - e := cfg.Echo - - // Require device authentication for all OPDS endpoints - opds := e.Group("/opds/devices") - opds.Use(cfg.DeviceAuthMiddleware.Authenticate) - ... -} -``` - -**Remove misleading comment:** -```go -- // OPDS routes (public - device authentication optional) -- // Note: OPDSHandler implements its own device authentication -``` - ---- - -### Step 3: Update Test Expectations - -**File:** `cmd/server/tests/opds_test.go` - -**Change 1 - Remove invalid 200 option:** -```go -// Line 18-29: GetDeviceCatalog_WithoutDeviceAuth -t.Run("GetDeviceCatalog_WithoutDeviceAuth", func(t *testing.T) { - deviceID := uuid.New() - httpReq, _ := http.NewRequest("GET", setup.Server.URL+"/opds/devices/"+deviceID.String()+"/catalog", nil) - - resp, err := client.Do(httpReq) - require.NoError(t, err) - defer resp.Body.Close() - - // OPDS endpoints require device authentication - assert.Equal(t, http.StatusUnauthorized, resp.StatusCode) // ← Expect 401 only -}) -``` - -**Change 2 - Update comment:** -```go -// Test: OPDS endpoints require device authentication via devices.auth_token -``` - ---- - -### Step 4: Update Additional OPDS Edge Case Test - -**File:** `cmd/server/tests/opds_test.go` - -**Change:** Update `TestOPDSEdgeCases/Search_SpecialCharacters` to use auth token: -```go -t.Run("Search_SpecialCharacters", func(t *testing.T) { - deviceID := uuid.New() - - // Search with special characters (requires valid device auth token) - httpReq, _ := http.NewRequest("GET", setup.Server.URL+"/opds/devices/"+deviceID.String()+"/search?q=test%20%26%20more", nil) - httpReq.Header.Set("Authorization", "Bearer "+setup.DeviceToken) // ← ADD THIS -``` - ---- - -### Step 5: Update Router Comment - -**File:** `internal/router/opds.go` - -**Add documentation:** -```go -// Register OPDS routes with device authentication -// Devices must use their devices.auth_token (generated during device registration/approval) -// Kobo devices store this token for both sync and OPDS catalog access -// Returns 401 Unauthorized if device token is missing, invalid, or device sync is disabled -func registerOPDSRoutes(cfg *Config) { - e := cfg.Echo - - // Require device authentication for all OPDS endpoints - opds := e.Group("/opds/devices") - opds.Use(cfg.DeviceAuthMiddleware.Authenticate) - ... -} -``` - ---- - -## Test Verification Plan - -After implementing changes, verify: - -1. **`GetDeviceCatalog_WithoutDeviceAuth`** - Should return **401** (no auth token provided) -2. **`GetDeviceCatalog_ValidDevice`** - With `setup.DeviceToken` should return **200** (valid device) -3. **`SearchDeviceCatalog_ValidDevice`** - With device token should return **200** or **404** (no results) -4. **`TestOPDSEdgeCases`** - All should use `setup.DeviceToken` for authentication - ---- - -## Git Commit Structure - -**Commit 1:** Apply DeviceAuthMiddleware to OPDS routes -``` -fix(opds): Require device authentication for OPDS catalog endpoints - -- Apply DeviceAuthMiddleware.Authenticate to /opds/devices/* routes -- OPDS now uses same authentication model as sync API (devices.auth_token) -- Removes security vulnerability allowing unauthorized device enumeration -- Updates router comments to clarify authentication requirements - -Refs: #PROJECT_GUIDELINES.md -``` - -**Commit 2:** Update OPDS test expectations -``` -test(opds): Update test expectations for device authentication - -- GetDeviceCatalog_WithoutDeviceAuth: Expect 401 (auth required) -- TestOPDSEdgeCases: Use setup.DeviceToken for authenticated requests -- Remove misleading "public or 401" test expectations - -Refs: #PROJECT_GUIDELINES.md -``` diff --git a/test-results.txt b/test-results.txt deleted file mode 100644 index 26e50b7..0000000 --- a/test-results.txt +++ /dev/null @@ -1,3021 +0,0 @@ -Building test containers... -podman compose --profile tests build ->>>> Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<< - -[1/3] STEP 1/15: FROM golang:1.25-alpine AS builder -[1/2] STEP 1/15: FROM golang:1.25-alpine AS builder -[1/2] STEP 2/15: WORKDIR /app ---> Using cache 0808b2875456ca99b7a8f5a6cad4e081b60104568bdd05f992cade2aa079e7a8 ---> 0808b2875456 -[1/2] STEP 3/15: RUN apk add --no-cache nodejs npm curl -[1/3] STEP 2/15: WORKDIR /app ---> Using cache eb561d60d14bf9cbadd568a0bc38f7385f4d247a5c5f5944678f62274c1bf699 ---> eb561d60d14b -[1/2] STEP 4/15: RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest ---> Using cache af8c96bd5a986ef93027119dc0adc1981a6eecf1454df089386579f90a907e7b ---> af8c96bd5a98 ---> Using cache 0808b2875456ca99b7a8f5a6cad4e081b60104568bdd05f992cade2aa079e7a8 ---> 0808b2875456 -[1/2] STEP 5/15: RUN go install github.com/a-h/templ/cmd/templ@latest -[1/3] STEP 3/15: RUN apk add --no-cache nodejs npm curl ---> Using cache 92f52680222cf9474514079a50410702a2b85ef2f6d0ea5a43e41c8b2355be0d ---> 92f52680222c -[1/2] STEP 6/15: COPY package*.json ./ ---> Using cache eb561d60d14bf9cbadd568a0bc38f7385f4d247a5c5f5944678f62274c1bf699 ---> eb561d60d14b -[1/3] STEP 4/15: RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest ---> Using cache af8c96bd5a986ef93027119dc0adc1981a6eecf1454df089386579f90a907e7b ---> af8c96bd5a98 -[1/3] STEP 5/15: RUN go install github.com/a-h/templ/cmd/templ@latest ---> Using cache 92f52680222cf9474514079a50410702a2b85ef2f6d0ea5a43e41c8b2355be0d ---> 92f52680222c -[1/3] STEP 6/15: COPY package*.json ./ ---> Using cache c1ac6e2d32bff67b34f42497038f789ab2b937c34871f0e37e49738786636d3f ---> c1ac6e2d32bf -[1/2] STEP 7/15: RUN npm install ---> Using cache b61c1bf0531a5bff95a37f402d121aff95e589972a88c9285d61d99bb7578042 ---> b61c1bf0531a -[1/2] STEP 8/15: COPY . . ---> Using cache c1ac6e2d32bff67b34f42497038f789ab2b937c34871f0e37e49738786636d3f ---> c1ac6e2d32bf -[1/3] STEP 7/15: RUN npm install ---> Using cache b61c1bf0531a5bff95a37f402d121aff95e589972a88c9285d61d99bb7578042 ---> b61c1bf0531a -[1/3] STEP 8/15: COPY . . ---> 16045756d6e8 -[1/3] STEP 9/15: RUN go mod tidy ---> 21e729376562 -[1/2] STEP 9/15: RUN go mod tidy -go: downloading github.com/go-playground/validator/v10 v10.30.1 -go: downloading github.com/jackc/pgx/v5 v5.4.3 -go: downloading github.com/labstack/echo/v4 v4.13.4 -go: downloading golang.org/x/text v0.33.0 -go: downloading github.com/ArcadiaLin/go-epub v0.1.1 -go: downloading github.com/bodgit/sevenzip v1.6.1 -go: downloading github.com/nwaples/rardecode v1.1.3 -go: downloading github.com/stretchr/testify v1.11.1 -go: downloading github.com/fsnotify/fsnotify v1.9.0 -go: downloading github.com/google/uuid v1.4.0 -go: downloading github.com/yuin/goldmark v1.7.16 -go: downloading github.com/jackc/pgx/v5 v5.4.3 -go: downloading github.com/go-playground/validator/v10 v10.30.1 -go: downloading github.com/labstack/echo/v4 v4.13.4 -go: downloading github.com/google/uuid v1.4.0 -go: downloading github.com/stretchr/testify v1.11.1 -go: downloading github.com/yuin/goldmark v1.7.16 -go: downloading golang.org/x/text v0.33.0 -go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 -go: downloading github.com/gorilla/websocket v1.5.3 -go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 -go: downloading github.com/golang-jwt/jwt/v5 v5.3.0 -go: downloading github.com/labstack/echo-jwt/v4 v4.4.0 -go: downloading github.com/gorilla/websocket v1.5.3 -go: downloading github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e -go: downloading golang.org/x/crypto v0.46.0 -go: downloading golang.org/x/sys v0.39.0 -go: downloading github.com/pmezard/go-difflib v1.0.0 -go: downloading github.com/alecthomas/chroma v0.10.0 -go: downloading github.com/gabriel-vasile/mimetype v1.4.12 -go: downloading github.com/go-playground/universal-translator v0.18.1 -go: downloading github.com/leodido/go-urn v1.4.0 -go: downloading github.com/golang-jwt/jwt/v5 v5.3.0 -go: downloading github.com/go-playground/locales v0.14.1 -go: downloading github.com/ArcadiaLin/go-epub v0.1.1 -go: downloading github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e -go: downloading github.com/labstack/echo-jwt/v4 v4.4.0 -go: downloading github.com/bodgit/sevenzip v1.6.1 -go: downloading golang.org/x/crypto v0.46.0 -go: downloading github.com/fsnotify/fsnotify v1.9.0 -go: downloading github.com/nwaples/rardecode v1.1.3 -go: downloading github.com/labstack/gommon v0.4.2 -go: downloading github.com/alecthomas/chroma v0.10.0 -go: downloading golang.org/x/net v0.47.0 -go: downloading github.com/pmezard/go-difflib v1.0.0 -go: downloading github.com/gabriel-vasile/mimetype v1.4.12 -go: downloading github.com/go-playground/universal-translator v0.18.1 -go: downloading github.com/valyala/fasttemplate v1.2.2 -go: downloading golang.org/x/time v0.14.0 -go: downloading github.com/leodido/go-urn v1.4.0 -go: downloading github.com/bodgit/plumbing v1.3.0 -go: downloading github.com/bodgit/windows v1.0.1 -go: downloading github.com/spf13/afero v1.11.0 -go: downloading go4.org v0.0.0-20200411211856-f5505b9728dd -go: downloading github.com/go-playground/locales v0.14.1 -go: downloading golang.org/x/sync v0.19.0 -go: downloading github.com/jackc/puddle/v2 v2.2.1 -go: downloading github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a -go: downloading github.com/labstack/gommon v0.4.2 -go: downloading golang.org/x/net v0.47.0 -go: downloading github.com/dlclark/regexp2 v1.4.0 -go: downloading github.com/mattn/go-colorable v0.1.14 -go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7 -go: downloading github.com/valyala/fasttemplate v1.2.2 -go: downloading golang.org/x/time v0.14.0 -go: downloading github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a -go: downloading github.com/andybalholm/brotli v1.1.1 -go: downloading github.com/pierrec/lz4/v4 v4.1.22 -go: downloading github.com/klauspost/compress v1.17.11 -go: downloading github.com/ulikunitz/xz v0.5.12 -go: downloading github.com/valyala/bytebufferpool v1.0.0 -go: downloading github.com/jackc/puddle/v2 v2.2.1 -go: downloading golang.org/x/sys v0.39.0 -go: downloading github.com/bodgit/plumbing v1.3.0 -go: downloading github.com/bodgit/windows v1.0.1 -go: downloading github.com/spf13/afero v1.11.0 -go: downloading go4.org v0.0.0-20200411211856-f5505b9728dd -go: downloading golang.org/x/sync v0.19.0 -go: downloading github.com/mattn/go-colorable v0.1.14 -go: downloading github.com/google/go-cmp v0.6.0 -go: downloading github.com/go-playground/assert/v2 v2.2.0 -go: downloading github.com/stretchr/objx v0.5.2 -go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c -go: downloading github.com/xyproto/randomstring v1.0.5 -go: downloading github.com/dlclark/regexp2 v1.4.0 -go: downloading github.com/valyala/bytebufferpool v1.0.0 -go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7 -go: downloading github.com/kr/pretty v0.3.0 -go: downloading github.com/andybalholm/brotli v1.1.1 -go: downloading github.com/pierrec/lz4/v4 v4.1.22 -go: downloading github.com/klauspost/compress v1.17.11 -go: downloading github.com/ulikunitz/xz v0.5.12 -go: downloading github.com/rogpeppe/go-internal v1.14.1 -go: downloading github.com/kr/text v0.2.0 -go: downloading github.com/google/go-cmp v0.6.0 -go: downloading github.com/go-playground/assert/v2 v2.2.0 -go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c -go: downloading github.com/stretchr/objx v0.5.2 -go: downloading github.com/xyproto/randomstring v1.0.5 -go: downloading github.com/kr/pretty v0.3.0 -go: downloading github.com/rogpeppe/go-internal v1.14.1 -go: downloading github.com/kr/text v0.2.0 ---> cc68ae016b29 -[1/3] STEP 10/15: RUN cd internal/database && sqlc generate ---> 235f45cc968b ---> 2794f7b87bc7 -[1/2] STEP 10/15: RUN cd internal/database && sqlc generate -[1/3] STEP 11/15: RUN cd templates && templ generate -(✓) Complete [ updates=0 duration=29.093465ms ] ---> e7e6e8704a84 -[1/3] STEP 12/15: RUN npm run build:css:prod - -> bookhoard@1.0.0 build:css:prod -> tailwindcss -i ./web/static/input.css -o ./web/static/style.css --minify - -Browserslist: caniuse-lite is outdated. Please run: - npx update-browserslist-db@latest - Why you should do it regularly: https://github.com/browserslist/update-db#readme - -Rebuilding... ---> 9cfb7cbae45e -[1/2] STEP 11/15: RUN cd templates && templ generate -(✓) Complete [ updates=0 duration=29.673331ms ] ---> 5eec9b6c8d81 -[1/2] STEP 12/15: RUN npm run build:css:prod - -Done in 703ms. ---> 3b9dff87fcd0 -[1/3] STEP 13/15: RUN npm run postinstall - -> bookhoard@1.0.0 build:css:prod -> tailwindcss -i ./web/static/input.css -o ./web/static/style.css --minify - - -> bookhoard@1.0.0 postinstall -> mkdir -p web/static && curl -L https://unpkg.com/htmx.org@1.9.10/dist/htmx.min.js -o web/static/htmx.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js -o web/static/highlight.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css -o web/static/highlight-dark.min.css && curl -L https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js -o web/static/lunr.min.js && curl -L https://cdn.jsdelivr.net/npm/lunr-flex@1.0.5/lunr.flex.min.js -o web/static/lunr-flex.min.js - - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Browserslist: caniuse-lite is outdated. Please run: - npx update-browserslist-db@latest - Why you should do it regularly: https://github.com/browserslist/update-db#readme - -Rebuilding... - 100 47755 100 47755 0 0 334294 0 --:--:-- --:--:-- --:--:-- 336302 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 121727 0 121727 0 0 1019k 0 --:--:-- --:--:-- --:--:-- 1024k - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1315 0 1315 0 0 14434 0 --:--:-- --:--:-- --:--:-- 14450 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 29510 100 29510 0 0 438595 0 --:--:-- --:--:-- --:--:-- 440447 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 -Done in 649ms. ---> 4518c3dfe043 -[1/2] STEP 13/15: RUN npm run postinstall - 100 43 0 43 0 0 73 0 --:--:-- --:--:-- --:--:-- 73 ---> 305941f8a23b -[1/3] STEP 14/15: RUN npm run build:ts - -> bookhoard@1.0.0 postinstall -> mkdir -p web/static && curl -L https://unpkg.com/htmx.org@1.9.10/dist/htmx.min.js -o web/static/htmx.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js -o web/static/highlight.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css -o web/static/highlight-dark.min.css && curl -L https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js -o web/static/lunr.min.js && curl -L https://cdn.jsdelivr.net/npm/lunr-flex@1.0.5/lunr.flex.min.js -o web/static/lunr-flex.min.js - - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 47755 100 47755 0 0 256966 0 --:--:-- --:--:-- --:--:-- 256747 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 -> bookhoard@1.0.0 build:ts -> tsc - - 100 121727 0 121727 0 0 555688 0 --:--:-- --:--:-- --:--:-- 558380 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1315 0 1315 0 0 14002 0 --:--:-- --:--:-- --:--:-- 14139 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 29510 0 29510 0 0 221784 0 --:--:-- --:--:-- --:--:-- 223560 - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 43 0 43 0 0 419 0 --:--:-- --:--:-- --:--:-- 421 ---> b99f7930b556 -[1/2] STEP 14/15: RUN npm run build:ts ---> 5818565b845a -[1/3] STEP 15/15: RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/server - -> bookhoard@1.0.0 build:ts -> tsc - ---> cc49691f3179 -[1/2] STEP 15/15: RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/server ---> aab363885c22 -[3/3] STEP 1/11: FROM alpine:latest -[3/3] STEP 2/11: RUN apk --no-cache add ca-certificates curl ---> Using cache 24f434a4d4b2f86022c7c8601a1c29a1cb847c3474f464de20f96e33a955458a ---> 24f434a4d4b2 -[3/3] STEP 3/11: RUN wget -O /usr/bin/kepubify https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit && chmod +x /usr/bin/kepubify ---> Using cache 89b60cb168ecb44333d5e10e232a5f6c4b8d67e4e6440321834c1ad3670bdf16 ---> 89b60cb168ec -[3/3] STEP 4/11: WORKDIR /root/ ---> a17082ac598e -[2/2] STEP 1/9: FROM golang:1.25-alpine AS test-runner ---> Using cache 868afc2e0de720355d7ba7c5a09cdce664820eb2d65d3771590241e41b6f328e ---> 868afc2e0de7 -[3/3] STEP 5/11: COPY --from=builder /app/main . -[2/2] STEP 2/9: RUN apk --no-cache add ca-certificates curl ---> Using cache 6eb0ced3e2522d1cfd8471f241b417c8471160a7b4bf050f9f43382196ed0af3 ---> 6eb0ced3e252 ---> dd371aa67ccc -[2/2] STEP 3/9: WORKDIR /app -[3/3] STEP 6/11: COPY --from=builder /app/database/schema ./database/schema ---> Using cache 0649cbac642ebe3d774c709a99552fce1677f49223e5f477fa5871980ba91610 ---> 0649cbac642e -[2/2] STEP 4/9: COPY --from=builder /app ./ ---> 3c63efffa856 -[3/3] STEP 7/11: COPY --from=builder /app/templates ./templates ---> ce943ab7ced0 -[3/3] STEP 8/11: COPY --from=builder /app/web ./web ---> 342229017de9 -[3/3] STEP 9/11: COPY --from=builder /app/docs ./docs ---> 592690eeb245 -[3/3] STEP 10/11: EXPOSE 8765 ---> 38116b4db60f -[3/3] STEP 11/11: CMD ["./main"] -[3/3] COMMIT bookhoard_app ---> 0b4657750325 -Successfully tagged localhost/bookhoard_app:latest ---> b946d6d01aa2 -[2/2] STEP 5/9: RUN wget -O /usr/bin/kepubify https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit && chmod +x /usr/bin/kepubify -Connecting to github.com (140.82.112.4:443) -Connecting to github.com (140.82.112.4:443) -0b465775032576fe52cba4cb0c5f8b4ea74cd3c796e321ac987788e3dd462a9b -Connecting to release-assets.githubusercontent.com (185.199.109.133:443) -saving to '/usr/bin/kepubify' -kepubify 100% |********************************| 3492k 0:00:00 ETA -'/usr/bin/kepubify' saved ---> 09386815d9fb -[2/2] STEP 6/9: ENV TEST_MODE=true ---> 76d6fc498b16 -[2/2] STEP 7/9: ENV RATE_LIMIT_ENABLED=false ---> 5872f30b115d -[2/2] STEP 8/9: ENV REQUESTS_PER_MINUTE=1000 ---> 0d4e37654dac -[2/2] STEP 9/9: CMD ["go", "test", "./cmd/server/tests", "-v", "-timeout", "5m"] -[2/2] COMMIT bookhoard_tests ---> 4fca8db99314 -Successfully tagged localhost/bookhoard_tests:latest -4fca8db99314ea216e248bbb02ecd39243e5673031af42914bc315b427d8ba89 -Starting application containers... -podman compose up -d db app ->>>> Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<< - -bookhoard_db -bookhoard -bookhoard -bookhoard_db -4a722ee35bf8e3d1740d7e5d7fa32e578e87b75422d3a016ed5c3a363012a917 -bookhoard_default -7d9286f4836a16f036e94007f68515ce55ae05b91695e60ea3bcfc7ea683cf07 -765d596529daeae605bdefb204d17da5dad2e877b395f16bc7bfb474a17347f3 -4d5b0aeb34fc422911a2f06fd1e6443a2e3aca902469a5e672d7b0db09334bf9 -bookhoard_db -bookhoard -Waiting for services to be healthy... - ✓ Database is ready - ✓ Application is ready - -Running integration tests in container... -podman compose --profile tests run --rm tests ->>>> Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<< - -bookhoard -bookhoard_db -bookhoard -bookhoard_db -4e0d54119fd2973b171ad6f39d26bae293d354c48200d56cb0a6cb0c92ec99d5 -f1acda74a99affa1ac3992fe219758316df9ecefaae9a8384e44914722798a72 -bookhoard_db -bookhoard -time="2026-02-10T12:43:41-05:00" level=warning msg="The input device is not a TTY. The --tty and --interactive flags might not work properly" -go: downloading github.com/labstack/echo/v4 v4.13.4 -go: downloading github.com/go-playground/validator/v10 v10.30.1 -go: downloading github.com/jackc/pgx/v5 v5.4.3 -go: downloading github.com/google/uuid v1.4.0 -go: downloading github.com/stretchr/testify v1.11.1 -go: downloading github.com/gorilla/websocket v1.5.3 -go: downloading github.com/golang-jwt/jwt/v5 v5.3.0 -go: downloading github.com/labstack/echo-jwt/v4 v4.4.0 -go: downloading github.com/ArcadiaLin/go-epub v0.1.1 -go: downloading github.com/bodgit/sevenzip v1.6.1 -go: downloading github.com/fsnotify/fsnotify v1.9.0 -go: downloading github.com/nwaples/rardecode v1.1.3 -go: downloading github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e -go: downloading golang.org/x/crypto v0.46.0 -go: downloading golang.org/x/text v0.33.0 -go: downloading github.com/yuin/goldmark v1.7.16 -go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 -go: downloading github.com/a-h/templ v0.3.977 -go: downloading golang.org/x/sys v0.39.0 -go: downloading github.com/davecgh/go-spew v1.1.1 -go: downloading github.com/pmezard/go-difflib v1.0.0 -go: downloading github.com/bodgit/plumbing v1.3.0 -go: downloading github.com/bodgit/windows v1.0.1 -go: downloading github.com/spf13/afero v1.11.0 -go: downloading go4.org v0.0.0-20200411211856-f5505b9728dd -go: downloading github.com/gabriel-vasile/mimetype v1.4.12 -go: downloading github.com/go-playground/universal-translator v0.18.1 -go: downloading github.com/leodido/go-urn v1.4.0 -go: downloading github.com/labstack/gommon v0.4.2 -go: downloading golang.org/x/net v0.47.0 -go: downloading github.com/valyala/fasttemplate v1.2.2 -go: downloading golang.org/x/time v0.14.0 -go: downloading github.com/jackc/puddle/v2 v2.2.1 -go: downloading github.com/jackc/pgpassfile v1.0.0 -go: downloading github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a -go: downloading gopkg.in/yaml.v3 v3.0.1 -go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7 -go: downloading github.com/andybalholm/brotli v1.1.1 -go: downloading github.com/klauspost/compress v1.17.11 -go: downloading github.com/pierrec/lz4/v4 v4.1.22 -go: downloading github.com/ulikunitz/xz v0.5.12 -go: downloading github.com/alecthomas/chroma v0.10.0 -go: downloading github.com/go-playground/locales v0.14.1 -go: downloading github.com/mattn/go-colorable v0.1.14 -go: downloading github.com/mattn/go-isatty v0.0.20 -go: downloading github.com/valyala/bytebufferpool v1.0.0 -go: downloading golang.org/x/sync v0.19.0 -go: downloading github.com/dlclark/regexp2 v1.4.0 -=== RUN TestAnalyticsReadingStats -=== RUN TestAnalyticsReadingStats/GetReadingStats_WithoutAuth -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 [REQUEST] {"request_id":"f0c6aee1-57c0-4e01-a23c-f5aecf20e902","timestamp":"2026-02-10T17:43:54.720066127Z","method":"GET","path":"/api/analytics/reading-stats","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":18174,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:54.720993117Z","id":"f0c6aee1-57c0-4e01-a23c-f5aecf20e902","remote_ip":"127.0.0.1","host":"127.0.0.1:40335","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":914567,"latency_human":"914.567µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:54.721006061Z","id":"f0c6aee1-57c0-4e01-a23c-f5aecf20e902","remote_ip":"127.0.0.1","host":"127.0.0.1:40335","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":938451,"latency_human":"938.451µs","bytes_in":0,"bytes_out":39} -=== RUN TestAnalyticsReadingStats/GetReadingStats_WithAuth_DefaultDates -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '3b2dc4fb-4f59-4b2f-81c5-c9386105d440' -2026/02/10 17:43:54 [REQUEST] {"request_id":"0ed65f4d-a033-41cc-bb8c-096497d11a6e","timestamp":"2026-02-10T17:43:54.780844355Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50411315,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:54.831312867Z","id":"0ed65f4d-a033-41cc-bb8c-096497d11a6e","remote_ip":"127.0.0.1","host":"127.0.0.1:44523","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50452001,"latency_human":"50.452001ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:54.831331521Z","id":"0ed65f4d-a033-41cc-bb8c-096497d11a6e","remote_ip":"127.0.0.1","host":"127.0.0.1:44523","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50484952,"latency_human":"50.484952ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:54 [REQUEST] {"request_id":"d6f18384-9ff7-412b-9760-3ab1aeff27c6","timestamp":"2026-02-10T17:43:54.831536151Z","method":"GET","path":"/api/analytics/reading-stats","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzQsImlhdCI6MTc3MDc0NTQzNCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjdlNzUzY2Q5LWJhY2QtNDc1YS04NDhmLTIzMTMxNWFlOWZkOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.HqIwPMT930wF44Q72XJ_mc-xUP3_6_GpXaElSR3iC-A","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2977474,"status_code":200,"response_size":218} -{"time":"2026-02-10T17:43:54.834543801Z","id":"d6f18384-9ff7-412b-9760-3ab1aeff27c6","remote_ip":"127.0.0.1","host":"127.0.0.1:44523","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3006778,"latency_human":"3.006778ms","bytes_in":0,"bytes_out":218} -{"time":"2026-02-10T17:43:54.834552457Z","id":"d6f18384-9ff7-412b-9760-3ab1aeff27c6","remote_ip":"127.0.0.1","host":"127.0.0.1:44523","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3016617,"latency_human":"3.016617ms","bytes_in":0,"bytes_out":218} -=== RUN TestAnalyticsReadingStats/GetReadingStats_WithCustomDateRange -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'b8f11830-3a28-4e9e-b796-c305f8ea0cec' -2026/02/10 17:43:54 [REQUEST] {"request_id":"0a840e49-79a7-4987-88cc-e556bffc343e","timestamp":"2026-02-10T17:43:54.856299513Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49679648,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:54.906004347Z","id":"0a840e49-79a7-4987-88cc-e556bffc343e","remote_ip":"127.0.0.1","host":"127.0.0.1:34373","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49702941,"latency_human":"49.702941ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:54.906013214Z","id":"0a840e49-79a7-4987-88cc-e556bffc343e","remote_ip":"127.0.0.1","host":"127.0.0.1:34373","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49713912,"latency_human":"49.713912ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:54 [REQUEST] {"request_id":"e81081d5-6380-48bb-b7f2-79674b599872","timestamp":"2026-02-10T17:43:54.906312699Z","method":"GET","path":"/api/analytics/reading-stats","query_params":{"end_date":"2026-02-10","start_date":"2025-12-10"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzQsImlhdCI6MTc3MDc0NTQzNCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc0NzhkNDQyLTNmZWYtNGUzMS1hOTUyLTNiMTE4MDE3MDI2ZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vwTNV42EXkLbVmAnhyxJHrHC11MVvk4vD6sYWuA-YTc","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1837870,"status_code":200,"response_size":218} -{"time":"2026-02-10T17:43:54.908180505Z","id":"e81081d5-6380-48bb-b7f2-79674b599872","remote_ip":"127.0.0.1","host":"127.0.0.1:34373","method":"GET","uri":"/api/analytics/reading-stats?start_date=2025-12-10&end_date=2026-02-10","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1859209,"latency_human":"1.859209ms","bytes_in":0,"bytes_out":218} -{"time":"2026-02-10T17:43:54.908188389Z","id":"e81081d5-6380-48bb-b7f2-79674b599872","remote_ip":"127.0.0.1","host":"127.0.0.1:34373","method":"GET","uri":"/api/analytics/reading-stats?start_date=2025-12-10&end_date=2026-02-10","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1875480,"latency_human":"1.87548ms","bytes_in":0,"bytes_out":218} -=== RUN TestAnalyticsReadingStats/GetReadingStats_InvalidStartDate -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '12346f43-58ec-40ab-b39d-d10384f4f1ac' -2026/02/10 17:43:54 [REQUEST] {"request_id":"23c3a5a4-6999-4868-84da-79ff8be272b0","timestamp":"2026-02-10T17:43:54.928063692Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50865117,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:54.978952654Z","id":"23c3a5a4-6999-4868-84da-79ff8be272b0","remote_ip":"127.0.0.1","host":"127.0.0.1:45029","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50886867,"latency_human":"50.886867ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:54.978958685Z","id":"23c3a5a4-6999-4868-84da-79ff8be272b0","remote_ip":"127.0.0.1","host":"127.0.0.1:45029","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50895604,"latency_human":"50.895604ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:54 [REQUEST] {"request_id":"6cab80fa-cdbf-44f3-85b7-4572cc1c1327","timestamp":"2026-02-10T17:43:54.979155059Z","method":"GET","path":"/api/analytics/reading-stats","query_params":{"start_date":"invalid-date"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzQsImlhdCI6MTc3MDc0NTQzNCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjEyYTM4YjdmLTg4OTQtNGUzOC04OWJhLTM2ZTIzNWYxMzVhMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.0mnJo6ehxU033Jnh6n9nQprhqxDVPO_2zv8_4cetQ34","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":46296,"status_code":200,"response_size":0,"error":"code=400, message=invalid start_date format"} -{"time":"2026-02-10T17:43:54.979225921Z","id":"6cab80fa-cdbf-44f3-85b7-4572cc1c1327","remote_ip":"127.0.0.1","host":"127.0.0.1:45029","method":"GET","uri":"/api/analytics/reading-stats?start_date=invalid-date","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=invalid start_date format","latency":70661,"latency_human":"70.661µs","bytes_in":0,"bytes_out":40} -{"time":"2026-02-10T17:43:54.9792307Z","id":"6cab80fa-cdbf-44f3-85b7-4572cc1c1327","remote_ip":"127.0.0.1","host":"127.0.0.1:45029","method":"GET","uri":"/api/analytics/reading-stats?start_date=invalid-date","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":76021,"latency_human":"76.021µs","bytes_in":0,"bytes_out":40} -=== RUN TestAnalyticsReadingStats/GetReadingStats_InvalidEndDate -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:54 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'dd3d140e-27d6-4b5c-9d71-6b5f09bb461a' -2026/02/10 17:43:55 [REQUEST] {"request_id":"865987ea-8df6-4fd1-b22d-021a6fd1bfaf","timestamp":"2026-02-10T17:43:54.999826239Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49232969,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.049114771Z","id":"865987ea-8df6-4fd1-b22d-021a6fd1bfaf","remote_ip":"127.0.0.1","host":"127.0.0.1:43173","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49259839,"latency_human":"49.259839ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.049132815Z","id":"865987ea-8df6-4fd1-b22d-021a6fd1bfaf","remote_ip":"127.0.0.1","host":"127.0.0.1:43173","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49302818,"latency_human":"49.302818ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"93cbf70d-2901-4ebe-8a08-6dd8d7153dd7","timestamp":"2026-02-10T17:43:55.049547805Z","method":"GET","path":"/api/analytics/reading-stats","query_params":{"end_date":"not-a-date"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImQ4NmMwMDBjLTkwZGItNDIyNC1iZjgzLTkyOTAyYjc1NDEyOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6p4SP5ioZlDdusNJ-5TFgv0CzxAqzfCwJ0dYf8pepdc","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":66192,"status_code":200,"response_size":0,"error":"code=400, message=invalid end_date format"} -{"time":"2026-02-10T17:43:55.049635107Z","id":"93cbf70d-2901-4ebe-8a08-6dd8d7153dd7","remote_ip":"127.0.0.1","host":"127.0.0.1:43173","method":"GET","uri":"/api/analytics/reading-stats?end_date=not-a-date","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=invalid end_date format","latency":87563,"latency_human":"87.563µs","bytes_in":0,"bytes_out":38} -{"time":"2026-02-10T17:43:55.049638593Z","id":"93cbf70d-2901-4ebe-8a08-6dd8d7153dd7","remote_ip":"127.0.0.1","host":"127.0.0.1:43173","method":"GET","uri":"/api/analytics/reading-stats?end_date=not-a-date","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":92010,"latency_human":"92.01µs","bytes_in":0,"bytes_out":38} -=== RUN TestAnalyticsReadingStats/GetReadingStats_EmptyHistory -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'f8b092e3-1a20-4bb8-8b0d-7a19cf860424' -2026/02/10 17:43:55 [REQUEST] {"request_id":"abc27bed-6f4c-49ad-9dd3-2495c5e53464","timestamp":"2026-02-10T17:43:55.069967598Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48759731,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.118763096Z","id":"abc27bed-6f4c-49ad-9dd3-2495c5e53464","remote_ip":"127.0.0.1","host":"127.0.0.1:39761","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48792061,"latency_human":"48.792061ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.118772603Z","id":"abc27bed-6f4c-49ad-9dd3-2495c5e53464","remote_ip":"127.0.0.1","host":"127.0.0.1:39761","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48804574,"latency_human":"48.804574ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"edd96886-5147-4568-9bfb-bfabfa7b4e89","timestamp":"2026-02-10T17:43:55.119015043Z","method":"GET","path":"/api/analytics/reading-stats","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjllYmJhMGY5LTA4YWQtNDhkMi1hYTBjLWFjYzdhMTM1OWMyNCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.kKB5yM3-IgtvuKRPiZx4hxhqo21PE03NCr2HhNhRVJs","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2479480,"status_code":200,"response_size":218} -{"time":"2026-02-10T17:43:55.121506876Z","id":"edd96886-5147-4568-9bfb-bfabfa7b4e89","remote_ip":"127.0.0.1","host":"127.0.0.1:39761","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2491843,"latency_human":"2.491843ms","bytes_in":0,"bytes_out":218} -{"time":"2026-02-10T17:43:55.121510593Z","id":"edd96886-5147-4568-9bfb-bfabfa7b4e89","remote_ip":"127.0.0.1","host":"127.0.0.1:39761","method":"GET","uri":"/api/analytics/reading-stats","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2496471,"latency_human":"2.496471ms","bytes_in":0,"bytes_out":218} ---- PASS: TestAnalyticsReadingStats (0.40s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_WithoutAuth (0.00s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_WithAuth_DefaultDates (0.11s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_WithCustomDateRange (0.07s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_InvalidStartDate (0.07s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_InvalidEndDate (0.07s) - --- PASS: TestAnalyticsReadingStats/GetReadingStats_EmptyHistory (0.07s) -=== RUN TestAnalyticsDeviceUsage -=== RUN TestAnalyticsDeviceUsage/GetDeviceUsage_WithoutAuth -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 [REQUEST] {"request_id":"3c3b81ed-d624-4220-a7fb-f928a8981b30","timestamp":"2026-02-10T17:43:55.122761173Z","method":"GET","path":"/api/analytics/device-usage","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4739,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:55.122795597Z","id":"3c3b81ed-d624-4220-a7fb-f928a8981b30","remote_ip":"127.0.0.1","host":"127.0.0.1:45341","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":29685,"latency_human":"29.685µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:55.122803982Z","id":"3c3b81ed-d624-4220-a7fb-f928a8981b30","remote_ip":"127.0.0.1","host":"127.0.0.1:45341","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":43320,"latency_human":"43.32µs","bytes_in":0,"bytes_out":39} -=== RUN TestAnalyticsDeviceUsage/GetDeviceUsage_WithAuth_NoDevices -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'fc4c3f4c-4eca-4a43-98ce-01f83a54f0a9' -2026/02/10 17:43:55 [REQUEST] {"request_id":"7ebd32e2-d240-4319-a1be-06fbd5516029","timestamp":"2026-02-10T17:43:55.141061965Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50155821,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.191250877Z","id":"7ebd32e2-d240-4319-a1be-06fbd5516029","remote_ip":"127.0.0.1","host":"127.0.0.1:43599","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50191347,"latency_human":"50.191347ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.191263541Z","id":"7ebd32e2-d240-4319-a1be-06fbd5516029","remote_ip":"127.0.0.1","host":"127.0.0.1:43599","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50214590,"latency_human":"50.21459ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"b816cc74-4f48-4ff9-805b-9ec60aad5d9d","timestamp":"2026-02-10T17:43:55.191591129Z","method":"GET","path":"/api/analytics/device-usage","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImNkODNlOGFjLTdmODMtNDdhZi1hMWZlLWRlZThhNjlmNzNhOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.0asmcJt-oS5plrtFSBHZuO8RPVnlkQqgraqJ7H0lIBs","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3446524,"status_code":200,"response_size":15} -{"time":"2026-02-10T17:43:55.195065234Z","id":"b816cc74-4f48-4ff9-805b-9ec60aad5d9d","remote_ip":"127.0.0.1","host":"127.0.0.1:43599","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3472773,"latency_human":"3.472773ms","bytes_in":0,"bytes_out":15} -{"time":"2026-02-10T17:43:55.195074231Z","id":"b816cc74-4f48-4ff9-805b-9ec60aad5d9d","remote_ip":"127.0.0.1","host":"127.0.0.1:43599","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3483944,"latency_human":"3.483944ms","bytes_in":0,"bytes_out":15} -=== RUN TestAnalyticsDeviceUsage/GetDeviceUsage_WithAuth_WithDevices -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '14feb4a4-4d61-49c8-a3d0-e2625e84a321' -2026/02/10 17:43:55 [REQUEST] {"request_id":"49f7e33d-71cb-4296-bf5e-0ddae317fdc1","timestamp":"2026-02-10T17:43:55.214503907Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":53332024,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.267865797Z","id":"49f7e33d-71cb-4296-bf5e-0ddae317fdc1","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53357491,"latency_human":"53.357491ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.26787333Z","id":"49f7e33d-71cb-4296-bf5e-0ddae317fdc1","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53369704,"latency_human":"53.369704ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"355ef307-ca87-41ee-adea-c97f5bf380cd","timestamp":"2026-02-10T17:43:55.26806687Z","method":"POST","path":"/api/devices/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc5ZTE1MzViLTczNjItNDVhOS1iMjI0LWUxNDhmOGFmMmE5NiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4XS6mcRVb5eG3OQrbGgjv_c7xMpgDg9cl-9elM1rLpE","Content-Length":"48","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"device_name":"Test Kobo","device_type":"kobo"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":82062,"status_code":400,"response_size":137} -{"time":"2026-02-10T17:43:55.268163268Z","id":"355ef307-ca87-41ee-adea-c97f5bf380cd","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"POST","uri":"/api/devices/register","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":96529,"latency_human":"96.529µs","bytes_in":48,"bytes_out":137} -{"time":"2026-02-10T17:43:55.268166444Z","id":"355ef307-ca87-41ee-adea-c97f5bf380cd","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"POST","uri":"/api/devices/register","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":100296,"latency_human":"100.296µs","bytes_in":48,"bytes_out":137} -2026/02/10 17:43:55 [REQUEST] {"request_id":"c3d68e61-74a2-4acc-9c54-1c53345d7e11","timestamp":"2026-02-10T17:43:55.268403965Z","method":"GET","path":"/api/analytics/device-usage","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc5ZTE1MzViLTczNjItNDVhOS1iMjI0LWUxNDhmOGFmMmE5NiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4XS6mcRVb5eG3OQrbGgjv_c7xMpgDg9cl-9elM1rLpE","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1690506,"status_code":200,"response_size":15} -{"time":"2026-02-10T17:43:55.270106804Z","id":"c3d68e61-74a2-4acc-9c54-1c53345d7e11","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1702348,"latency_human":"1.702348ms","bytes_in":0,"bytes_out":15} -{"time":"2026-02-10T17:43:55.270110882Z","id":"c3d68e61-74a2-4acc-9c54-1c53345d7e11","remote_ip":"127.0.0.1","host":"127.0.0.1:37663","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1707738,"latency_human":"1.707738ms","bytes_in":0,"bytes_out":15} -=== RUN TestAnalyticsDeviceUsage/GetDeviceUsage_ResponseStructure -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '68cf64f8-f99c-4a7a-b9c6-76b938dae054' -2026/02/10 17:43:55 [REQUEST] {"request_id":"b8a75bf1-608a-46ee-a077-f9168aae36fe","timestamp":"2026-02-10T17:43:55.289384018Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":47804940,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.337208584Z","id":"b8a75bf1-608a-46ee-a077-f9168aae36fe","remote_ip":"127.0.0.1","host":"127.0.0.1:40735","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":47821921,"latency_human":"47.821921ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.337215106Z","id":"b8a75bf1-608a-46ee-a077-f9168aae36fe","remote_ip":"127.0.0.1","host":"127.0.0.1:40735","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":47831759,"latency_human":"47.831759ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"16961a95-2d0b-4ad4-88d8-3c05c92bd1ca","timestamp":"2026-02-10T17:43:55.337409066Z","method":"GET","path":"/api/analytics/device-usage","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImJkYThiODFkLTMwZGItNGY3OC1iYTNjLTg0MDZlY2NjZTA4NSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.kZ4Wr5b5usxBSjFYuuVAyAK2mVM17ITW-IgzbkS5kM0","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2341724,"status_code":200,"response_size":15} -{"time":"2026-02-10T17:43:55.339771429Z","id":"16961a95-2d0b-4ad4-88d8-3c05c92bd1ca","remote_ip":"127.0.0.1","host":"127.0.0.1:40735","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2359457,"latency_human":"2.359457ms","bytes_in":0,"bytes_out":15} -{"time":"2026-02-10T17:43:55.339776969Z","id":"16961a95-2d0b-4ad4-88d8-3c05c92bd1ca","remote_ip":"127.0.0.1","host":"127.0.0.1:40735","method":"GET","uri":"/api/analytics/device-usage","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2368715,"latency_human":"2.368715ms","bytes_in":0,"bytes_out":15} ---- PASS: TestAnalyticsDeviceUsage (0.22s) - --- PASS: TestAnalyticsDeviceUsage/GetDeviceUsage_WithoutAuth (0.00s) - --- PASS: TestAnalyticsDeviceUsage/GetDeviceUsage_WithAuth_NoDevices (0.07s) - --- PASS: TestAnalyticsDeviceUsage/GetDeviceUsage_WithAuth_WithDevices (0.07s) - --- PASS: TestAnalyticsDeviceUsage/GetDeviceUsage_ResponseStructure (0.07s) -=== RUN TestAnalyticsPopularBooks -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_WithoutAuth -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 [REQUEST] {"request_id":"cb3de75d-89c7-41ca-b749-a82232bab265","timestamp":"2026-02-10T17:43:55.341706358Z","method":"GET","path":"/api/analytics/popular-books","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":17493,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:55.341845426Z","id":"cb3de75d-89c7-41ca-b749-a82232bab265","remote_ip":"127.0.0.1","host":"127.0.0.1:36639","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":167401,"latency_human":"167.401µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:55.341862869Z","id":"cb3de75d-89c7-41ca-b749-a82232bab265","remote_ip":"127.0.0.1","host":"127.0.0.1:36639","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":182608,"latency_human":"182.608µs","bytes_in":0,"bytes_out":39} -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_WithAuth_DefaultLimit -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'b48a6bb6-f5f4-48fb-90ae-6d259bca96ff' -2026/02/10 17:43:55 [REQUEST] {"request_id":"23c9142c-1412-483e-bca9-37595094d795","timestamp":"2026-02-10T17:43:55.360756391Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49014283,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.409802553Z","id":"23c9142c-1412-483e-bca9-37595094d795","remote_ip":"127.0.0.1","host":"127.0.0.1:41717","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49040862,"latency_human":"49.040862ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.409824223Z","id":"23c9142c-1412-483e-bca9-37595094d795","remote_ip":"127.0.0.1","host":"127.0.0.1:41717","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49055269,"latency_human":"49.055269ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"a719d8e3-215d-4f26-ab49-475639c0847d","timestamp":"2026-02-10T17:43:55.410135521Z","method":"GET","path":"/api/analytics/popular-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjJkZTRjZDQ5LTAzNGEtNDJiMy04ZDI4LWVlYjY2ODNjMjJhMSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.8Q4Sw6CNe06Uo43oAjK0dBH5jGQZwD3cQp52TwoA4fc","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2932641,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.413090773Z","id":"a719d8e3-215d-4f26-ab49-475639c0847d","remote_ip":"127.0.0.1","host":"127.0.0.1:41717","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2955293,"latency_human":"2.955293ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.413097907Z","id":"a719d8e3-215d-4f26-ab49-475639c0847d","remote_ip":"127.0.0.1","host":"127.0.0.1:41717","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2964129,"latency_human":"2.964129ms","bytes_in":0,"bytes_out":13} -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_WithCustomLimit -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '7e140d50-a38c-4b29-ad74-ba86f80854ef' -2026/02/10 17:43:55 [REQUEST] {"request_id":"e37899a1-fa40-4094-b34b-a6f037dca976","timestamp":"2026-02-10T17:43:55.433299486Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50631533,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.483984328Z","id":"e37899a1-fa40-4094-b34b-a6f037dca976","remote_ip":"127.0.0.1","host":"127.0.0.1:34289","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50682538,"latency_human":"50.682538ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.483994697Z","id":"e37899a1-fa40-4094-b34b-a6f037dca976","remote_ip":"127.0.0.1","host":"127.0.0.1:34289","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50695071,"latency_human":"50.695071ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"6b2b9714-f454-4bc5-9429-9bf733385066","timestamp":"2026-02-10T17:43:55.484303941Z","method":"GET","path":"/api/analytics/popular-books","query_params":{"limit":"5"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjEzMGE5MGY5LWM1YTQtNDU5ZC05YTY5LTU3YjVhMTU1NGE0MiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.9x4ER_436SIeCBbO-BKMe4qu7mYzxeXvvhuNprlyW4w","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2166910,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.486488173Z","id":"6b2b9714-f454-4bc5-9429-9bf733385066","remote_ip":"127.0.0.1","host":"127.0.0.1:34289","method":"GET","uri":"/api/analytics/popular-books?limit=5","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2183941,"latency_human":"2.183941ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.486492952Z","id":"6b2b9714-f454-4bc5-9429-9bf733385066","remote_ip":"127.0.0.1","host":"127.0.0.1:34289","method":"GET","uri":"/api/analytics/popular-books?limit=5","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2190534,"latency_human":"2.190534ms","bytes_in":0,"bytes_out":13} -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_InvalidLimit -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '2a7a5dba-6ca1-434a-8bbf-2d195248de8b' -2026/02/10 17:43:55 [REQUEST] {"request_id":"3d5ebbc5-8910-465b-9880-22cb10fc1649","timestamp":"2026-02-10T17:43:55.505503411Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50760823,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.556292868Z","id":"3d5ebbc5-8910-465b-9880-22cb10fc1649","remote_ip":"127.0.0.1","host":"127.0.0.1:40709","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50786952,"latency_human":"50.786952ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.556311953Z","id":"3d5ebbc5-8910-465b-9880-22cb10fc1649","remote_ip":"127.0.0.1","host":"127.0.0.1:40709","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50798664,"latency_human":"50.798664ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"b4d986a2-38a6-44b3-9da1-34ceb8889ac5","timestamp":"2026-02-10T17:43:55.556584929Z","method":"GET","path":"/api/analytics/popular-books","query_params":{"limit":"invalid"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM2YjZmNWVkLWMxYmYtNDI5YS1iYjE5LTFlN2MwZDFmZjMzNCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.3pK0ek8JY5afIcCPQbhpv4H1JKkDqXIAQFlf5V7owTc","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2315796,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.558918258Z","id":"b4d986a2-38a6-44b3-9da1-34ceb8889ac5","remote_ip":"127.0.0.1","host":"127.0.0.1:40709","method":"GET","uri":"/api/analytics/popular-books?limit=invalid","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2333069,"latency_human":"2.333069ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.558922707Z","id":"b4d986a2-38a6-44b3-9da1-34ceb8889ac5","remote_ip":"127.0.0.1","host":"127.0.0.1:40709","method":"GET","uri":"/api/analytics/popular-books?limit=invalid","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2339360,"latency_human":"2.33936ms","bytes_in":0,"bytes_out":13} -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_ResponseStructure -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '50cfb64d-0035-4bb7-a5e9-3addcd0d60df' -2026/02/10 17:43:55 [REQUEST] {"request_id":"cb881184-8de7-47fd-ade1-689b3dd172b5","timestamp":"2026-02-10T17:43:55.585763162Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49196401,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.634980362Z","id":"cb881184-8de7-47fd-ade1-689b3dd172b5","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49215136,"latency_human":"49.215136ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.634987335Z","id":"cb881184-8de7-47fd-ade1-689b3dd172b5","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49223752,"latency_human":"49.223752ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"823bd421-5de5-4217-8d3d-58470ae6f51b","timestamp":"2026-02-10T17:43:55.635229544Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk0ODY0OTZhLTk3NDAtNGE5Ni1hNWFmLWM2MmNhYzVkMmJjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6_p_xNDZTTONLvEXckzPfmKCZO1Dn2fValz_Nb6uUj0","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4734684,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:55.639989905Z","id":"823bd421-5de5-4217-8d3d-58470ae6f51b","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4759620,"latency_human":"4.75962ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:55.6399978Z","id":"823bd421-5de5-4217-8d3d-58470ae6f51b","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4768266,"latency_human":"4.768266ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:55 [REQUEST] {"request_id":"0aec55a9-c9a2-483f-b28b-7172714c92d5","timestamp":"2026-02-10T17:43:55.640219071Z","method":"POST","path":"/api/libraries/6ffcaf25-6759-444a-8c17-705e3dcb21a4/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk0ODY0OTZhLTk3NDAtNGE5Ni1hNWFmLWM2MmNhYzVkMmJjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6_p_xNDZTTONLvEXckzPfmKCZO1Dn2fValz_Nb6uUj0","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4279459,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:55.644531922Z","id":"0aec55a9-c9a2-483f-b28b-7172714c92d5","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/libraries/6ffcaf25-6759-444a-8c17-705e3dcb21a4/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4311278,"latency_human":"4.311278ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:55.644539496Z","id":"0aec55a9-c9a2-483f-b28b-7172714c92d5","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/libraries/6ffcaf25-6759-444a-8c17-705e3dcb21a4/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4320877,"latency_human":"4.320877ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:55 [REQUEST] {"request_id":"95ee61bd-9d1c-4d17-8619-c1f5b0ee6a65","timestamp":"2026-02-10T17:43:55.644799589Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk0ODY0OTZhLTk3NDAtNGE5Ni1hNWFmLWM2MmNhYzVkMmJjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6_p_xNDZTTONLvEXckzPfmKCZO1Dn2fValz_Nb6uUj0","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"6ffcaf25-6759-444a-8c17-705e3dcb21a4","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":10240789,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:55.655073179Z","id":"95ee61bd-9d1c-4d17-8619-c1f5b0ee6a65","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":10272598,"latency_human":"10.272598ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:55.655081254Z","id":"95ee61bd-9d1c-4d17-8619-c1f5b0ee6a65","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":10281865,"latency_human":"10.281865ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:55 [REQUEST] {"request_id":"45f320f2-cf43-4d83-92bd-4e1345d21866","timestamp":"2026-02-10T17:43:55.655340024Z","method":"POST","path":"/api/media-items/edd21509-1aec-4c65-b739-8168873f54fd/progress","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk0ODY0OTZhLTk3NDAtNGE5Ni1hNWFmLWM2MmNhYzVkMmJjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6_p_xNDZTTONLvEXckzPfmKCZO1Dn2fValz_Nb6uUj0","Content-Length":"124","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"media_item_id":"edd21509-1aec-4c65-b739-8168873f54fd","pages_read":100,"progress_percentage":50,"time_spent_seconds":1800},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":100977,"status_code":200,"response_size":0,"error":"code=404, message=Not Found"} -{"time":"2026-02-10T17:43:55.655485494Z","id":"45f320f2-cf43-4d83-92bd-4e1345d21866","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/media-items/edd21509-1aec-4c65-b739-8168873f54fd/progress","user_agent":"Go-http-client/1.1","status":404,"error":"code=404, message=Not Found","latency":144809,"latency_human":"144.809µs","bytes_in":124,"bytes_out":24} -{"time":"2026-02-10T17:43:55.655494089Z","id":"45f320f2-cf43-4d83-92bd-4e1345d21866","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"POST","uri":"/api/media-items/edd21509-1aec-4c65-b739-8168873f54fd/progress","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":154888,"latency_human":"154.888µs","bytes_in":124,"bytes_out":24} -2026/02/10 17:43:55 [REQUEST] {"request_id":"81207c76-7d73-449d-84eb-b3b557cbcd86","timestamp":"2026-02-10T17:43:55.655751146Z","method":"GET","path":"/api/analytics/popular-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk0ODY0OTZhLTk3NDAtNGE5Ni1hNWFmLWM2MmNhYzVkMmJjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.6_p_xNDZTTONLvEXckzPfmKCZO1Dn2fValz_Nb6uUj0","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1485967,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.657254245Z","id":"81207c76-7d73-449d-84eb-b3b557cbcd86","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1502698,"latency_human":"1.502698ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.657258433Z","id":"81207c76-7d73-449d-84eb-b3b557cbcd86","remote_ip":"127.0.0.1","host":"127.0.0.1:40919","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1507587,"latency_human":"1.507587ms","bytes_in":0,"bytes_out":13} -=== RUN TestAnalyticsPopularBooks/GetPopularBooks_NoReadingHistory -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '4d5b8801-9984-4576-9465-937e12b55120' -2026/02/10 17:43:55 [REQUEST] {"request_id":"1e1896e2-f500-4788-a0ab-c50fec0c0507","timestamp":"2026-02-10T17:43:55.679025075Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50230410,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.72927976Z","id":"1e1896e2-f500-4788-a0ab-c50fec0c0507","remote_ip":"127.0.0.1","host":"127.0.0.1:41255","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50251649,"latency_human":"50.251649ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.729289147Z","id":"1e1896e2-f500-4788-a0ab-c50fec0c0507","remote_ip":"127.0.0.1","host":"127.0.0.1:41255","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50264042,"latency_human":"50.264042ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"f97941f3-8223-4109-82dc-5b64e4cfaccb","timestamp":"2026-02-10T17:43:55.729518112Z","method":"GET","path":"/api/analytics/popular-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjkxN2U1YTg2LWY5YWMtNGJjOS05MjE3LTdlMjkwNDBhMTIyYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.GqmpqiPXCW71ickmpl-dpXLyOhYBnuKfDsY0qKPw74o","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2241679,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.731900372Z","id":"f97941f3-8223-4109-82dc-5b64e4cfaccb","remote_ip":"127.0.0.1","host":"127.0.0.1:41255","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2369366,"latency_human":"2.369366ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.731932561Z","id":"f97941f3-8223-4109-82dc-5b64e4cfaccb","remote_ip":"127.0.0.1","host":"127.0.0.1:41255","method":"GET","uri":"/api/analytics/popular-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2411885,"latency_human":"2.411885ms","bytes_in":0,"bytes_out":13} ---- PASS: TestAnalyticsPopularBooks (0.39s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_WithoutAuth (0.00s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_WithAuth_DefaultLimit (0.07s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_WithCustomLimit (0.07s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_InvalidLimit (0.07s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_ResponseStructure (0.10s) - --- PASS: TestAnalyticsPopularBooks/GetPopularBooks_NoReadingHistory (0.08s) -=== RUN TestAnalyticsEdgeCases -=== RUN TestAnalyticsEdgeCases/ReadingStats_FutureDateRange -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '10916e43-3803-470c-a96f-994d0aab3d51' -2026/02/10 17:43:55 [REQUEST] {"request_id":"bb324870-e4f9-4903-9dd7-21cc74349989","timestamp":"2026-02-10T17:43:55.751606451Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49682954,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.801318358Z","id":"bb324870-e4f9-4903-9dd7-21cc74349989","remote_ip":"127.0.0.1","host":"127.0.0.1:43557","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49707920,"latency_human":"49.70792ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.801366578Z","id":"bb324870-e4f9-4903-9dd7-21cc74349989","remote_ip":"127.0.0.1","host":"127.0.0.1:43557","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49725092,"latency_human":"49.725092ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"69864708-0803-4bdd-a46b-bd3bd8a91f51","timestamp":"2026-02-10T17:43:55.801582879Z","method":"GET","path":"/api/analytics/reading-stats","query_params":{"end_date":"2026-02-24","start_date":"2026-02-17"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjA1NTMyZDUzLWNjYTktNGNiYi05M2QwLWE2NDNhMjY1MDAwZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.D6I8eXhghIPfZCahhcScbf_MPGK7uEmJiDt9R-s4ehE","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2138057,"status_code":200,"response_size":218} -{"time":"2026-02-10T17:43:55.803743217Z","id":"69864708-0803-4bdd-a46b-bd3bd8a91f51","remote_ip":"127.0.0.1","host":"127.0.0.1:43557","method":"GET","uri":"/api/analytics/reading-stats?start_date=2026-02-17&end_date=2026-02-24","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2158905,"latency_human":"2.158905ms","bytes_in":0,"bytes_out":218} -{"time":"2026-02-10T17:43:55.80375017Z","id":"69864708-0803-4bdd-a46b-bd3bd8a91f51","remote_ip":"127.0.0.1","host":"127.0.0.1:43557","method":"GET","uri":"/api/analytics/reading-stats?start_date=2026-02-17&end_date=2026-02-24","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2167922,"latency_human":"2.167922ms","bytes_in":0,"bytes_out":218} -=== RUN TestAnalyticsEdgeCases/PopularBooks_LimitZero -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'a5acc74e-bc09-4956-b0ae-a92410a24156' -2026/02/10 17:43:55 [REQUEST] {"request_id":"da0927e4-74e8-495f-bda6-5e9753f8c0c8","timestamp":"2026-02-10T17:43:55.822892333Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49599168,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.872513562Z","id":"da0927e4-74e8-495f-bda6-5e9753f8c0c8","remote_ip":"127.0.0.1","host":"127.0.0.1:46033","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49618153,"latency_human":"49.618153ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.872524322Z","id":"da0927e4-74e8-495f-bda6-5e9753f8c0c8","remote_ip":"127.0.0.1","host":"127.0.0.1:46033","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49629444,"latency_human":"49.629444ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"4e690da8-0df9-415c-8d1d-aab6ed87f56f","timestamp":"2026-02-10T17:43:55.872837924Z","method":"GET","path":"/api/analytics/popular-books","query_params":{"limit":"0"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjhiMDQzMWY3LTE4N2YtNDc4MS05YjRiLWJmN2YyNTI4OWI1OSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bdFT22N6DSBhIgBq_PqsYJemQvfuAY9SAL9Ys64bM0c","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2451208,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.875306574Z","id":"4e690da8-0df9-415c-8d1d-aab6ed87f56f","remote_ip":"127.0.0.1","host":"127.0.0.1:46033","method":"GET","uri":"/api/analytics/popular-books?limit=0","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2468440,"latency_human":"2.46844ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.875311313Z","id":"4e690da8-0df9-415c-8d1d-aab6ed87f56f","remote_ip":"127.0.0.1","host":"127.0.0.1:46033","method":"GET","uri":"/api/analytics/popular-books?limit=0","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2474120,"latency_human":"2.47412ms","bytes_in":0,"bytes_out":13} -=== RUN TestAnalyticsEdgeCases/PopularBooks_VeryLargeLimit -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'a9e87539-30a8-40c4-a36b-77a77929f377' -2026/02/10 17:43:55 [REQUEST] {"request_id":"7c1711de-b102-4c5d-abc4-2bff045cc97b","timestamp":"2026-02-10T17:43:55.895066093Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50372172,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:55.945463251Z","id":"7c1711de-b102-4c5d-abc4-2bff045cc97b","remote_ip":"127.0.0.1","host":"127.0.0.1:38391","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50390526,"latency_human":"50.390526ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:55.945474512Z","id":"7c1711de-b102-4c5d-abc4-2bff045cc97b","remote_ip":"127.0.0.1","host":"127.0.0.1:38391","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50405575,"latency_human":"50.405575ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:55 [REQUEST] {"request_id":"bfa56218-5753-4f9d-a0e9-8b786b902f05","timestamp":"2026-02-10T17:43:55.945730888Z","method":"GET","path":"/api/analytics/popular-books","query_params":{"limit":"999999"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzUsImlhdCI6MTc3MDc0NTQzNSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjE0MTA2ZjQxLTY3YWEtNDI4NC1hODYxLWI5N2Q5NDk0ZjJlMyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.lQmD1N9UCHccU1viBUFIAIgrXYKB_Bp0AA9-6S0H9AY","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3878065,"status_code":200,"response_size":13} -{"time":"2026-02-10T17:43:55.949664396Z","id":"bfa56218-5753-4f9d-a0e9-8b786b902f05","remote_ip":"127.0.0.1","host":"127.0.0.1:38391","method":"GET","uri":"/api/analytics/popular-books?limit=999999","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3930262,"latency_human":"3.930262ms","bytes_in":0,"bytes_out":13} -{"time":"2026-02-10T17:43:55.949680766Z","id":"bfa56218-5753-4f9d-a0e9-8b786b902f05","remote_ip":"127.0.0.1","host":"127.0.0.1:38391","method":"GET","uri":"/api/analytics/popular-books?limit=999999","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3949377,"latency_human":"3.949377ms","bytes_in":0,"bytes_out":13} ---- PASS: TestAnalyticsEdgeCases (0.22s) - --- PASS: TestAnalyticsEdgeCases/ReadingStats_FutureDateRange (0.07s) - --- PASS: TestAnalyticsEdgeCases/PopularBooks_LimitZero (0.07s) - --- PASS: TestAnalyticsEdgeCases/PopularBooks_VeryLargeLimit (0.07s) -=== RUN TestAuthMiddlewareAlt -=== RUN TestAuthMiddlewareAlt/Missing_JWT -=== RUN TestAuthMiddlewareAlt/Invalid_JWT_format -=== RUN TestAuthMiddlewareAlt/Valid_JWT_format ---- PASS: TestAuthMiddlewareAlt (0.00s) - --- PASS: TestAuthMiddlewareAlt/Missing_JWT (0.00s) - --- PASS: TestAuthMiddlewareAlt/Invalid_JWT_format (0.00s) - --- PASS: TestAuthMiddlewareAlt/Valid_JWT_format (0.00s) -=== RUN TestBookMatchingQueryBooks -=== RUN TestBookMatchingQueryBooks/QueryBooks_WithoutAuth -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 [REQUEST] {"request_id":"d4566c3f-3d49-497c-a6c0-7dc81ad65aeb","timestamp":"2026-02-10T17:43:55.951139993Z","method":"POST","path":"/api/sync/books/query","headers":{"Accept-Encoding":"gzip","Content-Length":"21","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"title":"Test Book"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":13776,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:55.951180549Z","id":"d4566c3f-3d49-497c-a6c0-7dc81ad65aeb","remote_ip":"127.0.0.1","host":"127.0.0.1:38049","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":45815,"latency_human":"45.815µs","bytes_in":21,"bytes_out":39} -{"time":"2026-02-10T17:43:55.951185007Z","id":"d4566c3f-3d49-497c-a6c0-7dc81ad65aeb","remote_ip":"127.0.0.1","host":"127.0.0.1:38049","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":53539,"latency_human":"53.539µs","bytes_in":21,"bytes_out":39} -=== RUN TestBookMatchingQueryBooks/QueryBooks_WithAuth_ByTitle -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:55 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'f8b246c6-edf2-42b8-876e-80cb7c20320b' -2026/02/10 17:43:56 [REQUEST] {"request_id":"293f850d-cd9f-43b4-ae7f-f5879a57ec25","timestamp":"2026-02-10T17:43:55.971539679Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49497880,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.021061264Z","id":"293f850d-cd9f-43b4-ae7f-f5879a57ec25","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49512738,"latency_human":"49.512738ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.021070871Z","id":"293f850d-cd9f-43b4-ae7f-f5879a57ec25","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49532033,"latency_human":"49.532033ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"6c38c1ec-ce12-4998-a7ba-8863ea60b925","timestamp":"2026-02-10T17:43:56.02124265Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM5ZmJlN2JmLWY4NWEtNDk1Yi1iMWQ3LWQ4MDI0YzVhYzAxYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VDM0j3SgGIH7qSZ0drm_iogtahZcar3UqiItY4URuUo","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3049358,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:56.024323165Z","id":"6c38c1ec-ce12-4998-a7ba-8863ea60b925","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3079153,"latency_human":"3.079153ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:56.02433084Z","id":"6c38c1ec-ce12-4998-a7ba-8863ea60b925","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3088440,"latency_human":"3.08844ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:56 [REQUEST] {"request_id":"e2b114b5-9c9f-44b3-8ce9-f77dcb18cccc","timestamp":"2026-02-10T17:43:56.024548453Z","method":"POST","path":"/api/libraries/5f72526e-f232-418e-93e3-592f0f15d9e7/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM5ZmJlN2JmLWY4NWEtNDk1Yi1iMWQ3LWQ4MDI0YzVhYzAxYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VDM0j3SgGIH7qSZ0drm_iogtahZcar3UqiItY4URuUo","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3026145,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:56.027595537Z","id":"e2b114b5-9c9f-44b3-8ce9-f77dcb18cccc","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/libraries/5f72526e-f232-418e-93e3-592f0f15d9e7/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3045721,"latency_human":"3.045721ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:56.02760271Z","id":"e2b114b5-9c9f-44b3-8ce9-f77dcb18cccc","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/libraries/5f72526e-f232-418e-93e3-592f0f15d9e7/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3055008,"latency_human":"3.055008ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:56 [REQUEST] {"request_id":"7d3935ce-561f-4337-977b-d1c9ba238e73","timestamp":"2026-02-10T17:43:56.027921311Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM5ZmJlN2JmLWY4NWEtNDk1Yi1iMWQ3LWQ4MDI0YzVhYzAxYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VDM0j3SgGIH7qSZ0drm_iogtahZcar3UqiItY4URuUo","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"5f72526e-f232-418e-93e3-592f0f15d9e7","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":8293526,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:56.036246336Z","id":"7d3935ce-561f-4337-977b-d1c9ba238e73","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":8324223,"latency_human":"8.324223ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:56.036252497Z","id":"7d3935ce-561f-4337-977b-d1c9ba238e73","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":8331937,"latency_human":"8.331937ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:56 [REQUEST] {"request_id":"5c1d0a4c-b94c-42b8-8caa-96a969a99100","timestamp":"2026-02-10T17:43:56.036440706Z","method":"POST","path":"/api/sync/books/query","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM5ZmJlN2JmLWY4NWEtNDk1Yi1iMWQ3LWQ4MDI0YzVhYzAxYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VDM0j3SgGIH7qSZ0drm_iogtahZcar3UqiItY4URuUo","Content-Length":"22","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"title":"Test Ebook"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4171009,"status_code":200,"response_size":37} -{"time":"2026-02-10T17:43:56.04063615Z","id":"5c1d0a4c-b94c-42b8-8caa-96a969a99100","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":4194642,"latency_human":"4.194642ms","bytes_in":22,"bytes_out":37} -{"time":"2026-02-10T17:43:56.040642672Z","id":"5c1d0a4c-b94c-42b8-8caa-96a969a99100","remote_ip":"127.0.0.1","host":"127.0.0.1:39621","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":4201896,"latency_human":"4.201896ms","bytes_in":22,"bytes_out":37} -=== RUN TestBookMatchingQueryBooks/QueryBooks_InvalidRequestBody -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '13a93396-04ca-4ad7-b71c-d49be77231b0' -2026/02/10 17:43:56 [REQUEST] {"request_id":"71fe629b-3afe-4a25-ba13-e31f167e407a","timestamp":"2026-02-10T17:43:56.060591041Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":52096642,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.112712749Z","id":"71fe629b-3afe-4a25-ba13-e31f167e407a","remote_ip":"127.0.0.1","host":"127.0.0.1:37081","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52118523,"latency_human":"52.118523ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.112721255Z","id":"71fe629b-3afe-4a25-ba13-e31f167e407a","remote_ip":"127.0.0.1","host":"127.0.0.1:37081","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52130364,"latency_human":"52.130364ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"0dc556f3-1ead-483a-adef-95f47d859393","timestamp":"2026-02-10T17:43:56.113002467Z","method":"POST","path":"/api/sync/books/query","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjZhYWZhMDZiLTE3NTQtNGIyOC1iYzMwLTkwZGY0YjA0NGViNCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.UIMNffbwYJijwqOE8sHnTPp-gunhCxEVHjHr7_A3ndA","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":74809,"status_code":400,"response_size":33} -{"time":"2026-02-10T17:43:56.113115006Z","id":"0dc556f3-1ead-483a-adef-95f47d859393","remote_ip":"127.0.0.1","host":"127.0.0.1:37081","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":111196,"latency_human":"111.196µs","bytes_in":12,"bytes_out":33} -{"time":"2026-02-10T17:43:56.113126166Z","id":"0dc556f3-1ead-483a-adef-95f47d859393","remote_ip":"127.0.0.1","host":"127.0.0.1:37081","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":124511,"latency_human":"124.511µs","bytes_in":12,"bytes_out":33} -=== RUN TestBookMatchingQueryBooks/QueryBooks_NoResults -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '5495674e-2a4c-484b-b04c-2e64a7b924f8' -2026/02/10 17:43:56 [REQUEST] {"request_id":"692dd2c6-be6b-4fcd-acbd-613365e0ebec","timestamp":"2026-02-10T17:43:56.133855815Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48194372,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.182109066Z","id":"692dd2c6-be6b-4fcd-acbd-613365e0ebec","remote_ip":"127.0.0.1","host":"127.0.0.1:42943","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48246038,"latency_human":"48.246038ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.182125677Z","id":"692dd2c6-be6b-4fcd-acbd-613365e0ebec","remote_ip":"127.0.0.1","host":"127.0.0.1:42943","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48266837,"latency_human":"48.266837ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"4f7e3c5d-54de-4220-9c53-7abd98f73067","timestamp":"2026-02-10T17:43:56.182610506Z","method":"POST","path":"/api/sync/books/query","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImZiMDJiNmI4LTA1ZDgtNDU1Zi1iMmQxLTVjMTcwOTNjZjZhYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VN6RAxj19zfk_iCH4ud1q2cuT7duoYF_unMnBL0aYGQ","Content-Length":"57","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"title":"NonExistentBookTitleThatDoesNotExist123456789"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":5656174,"status_code":200,"response_size":37} -{"time":"2026-02-10T17:43:56.188297146Z","id":"4f7e3c5d-54de-4220-9c53-7abd98f73067","remote_ip":"127.0.0.1","host":"127.0.0.1:42943","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":5685739,"latency_human":"5.685739ms","bytes_in":57,"bytes_out":37} -{"time":"2026-02-10T17:43:56.188305872Z","id":"4f7e3c5d-54de-4220-9c53-7abd98f73067","remote_ip":"127.0.0.1","host":"127.0.0.1:42943","method":"POST","uri":"/api/sync/books/query","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":5695967,"latency_human":"5.695967ms","bytes_in":57,"bytes_out":37} ---- PASS: TestBookMatchingQueryBooks (0.24s) - --- PASS: TestBookMatchingQueryBooks/QueryBooks_WithoutAuth (0.00s) - --- PASS: TestBookMatchingQueryBooks/QueryBooks_WithAuth_ByTitle (0.09s) - --- PASS: TestBookMatchingQueryBooks/QueryBooks_InvalidRequestBody (0.07s) - --- PASS: TestBookMatchingQueryBooks/QueryBooks_NoResults (0.08s) -=== RUN TestBookMatchingBulkLink -=== RUN TestBookMatchingBulkLink/BulkLinkBooks_WithoutAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 [REQUEST] {"request_id":"99d91fef-aa88-4194-adec-2d6678daf16a","timestamp":"2026-02-10T17:43:56.189270612Z","method":"POST","path":"/api/sync/bulk-link-books","headers":{"Accept-Encoding":"gzip","Content-Length":"149","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"links":[{"confidence_score":0.9,"media_item_id":"0316155c-7605-4104-9ded-7cf26bf2ad29","unlinked_book_id":"47404458-4b76-45fe-a489-bb73f04bbad4"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":11362,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:56.189312109Z","id":"99d91fef-aa88-4194-adec-2d6678daf16a","remote_ip":"127.0.0.1","host":"127.0.0.1:38523","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":45995,"latency_human":"45.995µs","bytes_in":149,"bytes_out":39} -{"time":"2026-02-10T17:43:56.189316768Z","id":"99d91fef-aa88-4194-adec-2d6678daf16a","remote_ip":"127.0.0.1","host":"127.0.0.1:38523","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":56775,"latency_human":"56.775µs","bytes_in":149,"bytes_out":39} -=== RUN TestBookMatchingBulkLink/BulkLinkBooks_WithAuth_EmptyLinks -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'f5fa9c76-ab34-4bd6-8a95-58c505627ad5' -2026/02/10 17:43:56 [REQUEST] {"request_id":"6c9bcdeb-99ea-4ae0-9de0-3f6e3d702392","timestamp":"2026-02-10T17:43:56.207899423Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51014354,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.258939154Z","id":"6c9bcdeb-99ea-4ae0-9de0-3f6e3d702392","remote_ip":"127.0.0.1","host":"127.0.0.1:45725","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51035062,"latency_human":"51.035062ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.258948852Z","id":"6c9bcdeb-99ea-4ae0-9de0-3f6e3d702392","remote_ip":"127.0.0.1","host":"127.0.0.1:45725","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51048928,"latency_human":"51.048928ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"3bc2d796-8382-4f8e-89a4-0f92dbc53afc","timestamp":"2026-02-10T17:43:56.259238539Z","method":"POST","path":"/api/sync/bulk-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImVkZWY0NDA4LTA0MTItNGE5NS05NWQwLTM3YzhmMGQ1OThlOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.nGEpmsgB5ER5IH_dVpRbEhjBpxeHO54nnr-W7DsFEmc","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"links":[]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":96089,"status_code":200,"response_size":51} -{"time":"2026-02-10T17:43:56.259358081Z","id":"3bc2d796-8382-4f8e-89a4-0f92dbc53afc","remote_ip":"127.0.0.1","host":"127.0.0.1:45725","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":118529,"latency_human":"118.529µs","bytes_in":12,"bytes_out":51} -{"time":"2026-02-10T17:43:56.259366136Z","id":"3bc2d796-8382-4f8e-89a4-0f92dbc53afc","remote_ip":"127.0.0.1","host":"127.0.0.1:45725","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":128448,"latency_human":"128.448µs","bytes_in":12,"bytes_out":51} -=== RUN TestBookMatchingBulkLink/BulkLinkBooks_InvalidUnlinkedBookID -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'cc9d7bb6-8943-422c-b958-c99f5006894a' -2026/02/10 17:43:56 [REQUEST] {"request_id":"b7373bf3-1524-46e7-9eaa-96aa1120bb09","timestamp":"2026-02-10T17:43:56.279393672Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50596920,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.330015708Z","id":"b7373bf3-1524-46e7-9eaa-96aa1120bb09","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50618570,"latency_human":"50.61857ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.330025126Z","id":"b7373bf3-1524-46e7-9eaa-96aa1120bb09","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50631634,"latency_human":"50.631634ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"8dc2c288-7a8c-4b88-ae22-638619f11538","timestamp":"2026-02-10T17:43:56.330378922Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg3MGMzOTM5LWQ5ODEtNDgyYy04NDM1LTNjZjNkOGI0Mjc3YiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4qTQM5J5wiy_bZuOFJB4n7vDVIcVe6J1CQuLLgP7icw","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4391217,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:56.334819921Z","id":"8dc2c288-7a8c-4b88-ae22-638619f11538","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4440017,"latency_human":"4.440017ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:56.334826473Z","id":"8dc2c288-7a8c-4b88-ae22-638619f11538","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4448813,"latency_human":"4.448813ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:56 [REQUEST] {"request_id":"d939af46-fa8c-415d-8a18-46325c6e7714","timestamp":"2026-02-10T17:43:56.335019792Z","method":"POST","path":"/api/libraries/60d1cc40-c849-4184-b726-06750d194a31/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg3MGMzOTM5LWQ5ODEtNDgyYy04NDM1LTNjZjNkOGI0Mjc3YiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4qTQM5J5wiy_bZuOFJB4n7vDVIcVe6J1CQuLLgP7icw","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2587530,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:56.337627099Z","id":"d939af46-fa8c-415d-8a18-46325c6e7714","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/libraries/60d1cc40-c849-4184-b726-06750d194a31/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2606987,"latency_human":"2.606987ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:56.337631307Z","id":"d939af46-fa8c-415d-8a18-46325c6e7714","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/libraries/60d1cc40-c849-4184-b726-06750d194a31/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2612267,"latency_human":"2.612267ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:56 [REQUEST] {"request_id":"9bbd8838-ec52-487c-b361-c359f02cf94a","timestamp":"2026-02-10T17:43:56.337897781Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg3MGMzOTM5LWQ5ODEtNDgyYy04NDM1LTNjZjNkOGI0Mjc3YiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4qTQM5J5wiy_bZuOFJB4n7vDVIcVe6J1CQuLLgP7icw","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"60d1cc40-c849-4184-b726-06750d194a31","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":5397013,"status_code":201,"response_size":1043} -{"time":"2026-02-10T17:43:56.343320702Z","id":"9bbd8838-ec52-487c-b361-c359f02cf94a","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5421147,"latency_human":"5.421147ms","bytes_in":183,"bytes_out":1043} -{"time":"2026-02-10T17:43:56.343329678Z","id":"9bbd8838-ec52-487c-b361-c359f02cf94a","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5431757,"latency_human":"5.431757ms","bytes_in":183,"bytes_out":1043} -2026/02/10 17:43:56 [REQUEST] {"request_id":"b7d723b5-ce9b-4e79-b4da-726e12f674c1","timestamp":"2026-02-10T17:43:56.343516104Z","method":"POST","path":"/api/sync/bulk-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg3MGMzOTM5LWQ5ODEtNDgyYy04NDM1LTNjZjNkOGI0Mjc3YiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.4qTQM5J5wiy_bZuOFJB4n7vDVIcVe6J1CQuLLgP7icw","Content-Length":"149","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"links":[{"confidence_score":0.9,"media_item_id":"28384376-59e4-4f5f-b6fb-abddbcd7469b","unlinked_book_id":"7bae51e1-5b60-4064-b294-03b838c6fd89"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":676295,"status_code":200,"response_size":161} -{"time":"2026-02-10T17:43:56.34420914Z","id":"b7d723b5-ce9b-4e79-b4da-726e12f674c1","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":692815,"latency_human":"692.815µs","bytes_in":149,"bytes_out":161} -{"time":"2026-02-10T17:43:56.344212707Z","id":"b7d723b5-ce9b-4e79-b4da-726e12f674c1","remote_ip":"127.0.0.1","host":"127.0.0.1:36287","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":696923,"latency_human":"696.923µs","bytes_in":149,"bytes_out":161} -=== RUN TestBookMatchingBulkLink/BulkLinkBooks_MultipleLinks -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '0651b76b-95b2-4f22-bc28-c06a655de8de' -2026/02/10 17:43:56 [REQUEST] {"request_id":"a2e3dc66-68b2-4dc3-b6f3-d960a4510f5a","timestamp":"2026-02-10T17:43:56.363885314Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50062468,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.413981364Z","id":"a2e3dc66-68b2-4dc3-b6f3-d960a4510f5a","remote_ip":"127.0.0.1","host":"127.0.0.1:33175","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50098785,"latency_human":"50.098785ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.413997003Z","id":"a2e3dc66-68b2-4dc3-b6f3-d960a4510f5a","remote_ip":"127.0.0.1","host":"127.0.0.1:33175","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50119363,"latency_human":"50.119363ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"001444d0-0e78-4915-a8b9-9a21b78b3865","timestamp":"2026-02-10T17:43:56.414312539Z","method":"POST","path":"/api/sync/bulk-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg2NWIzM2NiLWM5NzgtNGRjYi04NDUxLTg2ZWI3MjdlZDU0OSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.nn_WMa7iTa-Gp6hBr_QKx9UKf84gjuKnlIG8xjzwILA","Content-Length":"426","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"links":[{"confidence_score":0.9,"media_item_id":"6a616aec-0711-451a-948b-996f479afaea","unlinked_book_id":"1991e744-2ab2-4ba9-a7fb-cea6c8e21b09"},{"confidence_score":0.8,"media_item_id":"563c2b83-fd59-47c8-86d1-62bccb207740","unlinked_book_id":"0b014fb5-3914-4eee-bf2e-900216e26eb7"},{"confidence_score":0.95,"media_item_id":"116ec346-05bb-40a1-a973-67ba988cc63f","unlinked_book_id":"ae7e61f0-e1d1-46f7-b8ef-93080ad826a4"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1681359,"status_code":200,"response_size":383} -{"time":"2026-02-10T17:43:56.416057015Z","id":"001444d0-0e78-4915-a8b9-9a21b78b3865","remote_ip":"127.0.0.1","host":"127.0.0.1:33175","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1741531,"latency_human":"1.741531ms","bytes_in":426,"bytes_out":383} -{"time":"2026-02-10T17:43:56.416064529Z","id":"001444d0-0e78-4915-a8b9-9a21b78b3865","remote_ip":"127.0.0.1","host":"127.0.0.1:33175","method":"POST","uri":"/api/sync/bulk-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":1752441,"latency_human":"1.752441ms","bytes_in":426,"bytes_out":383} ---- PASS: TestBookMatchingBulkLink (0.23s) - --- PASS: TestBookMatchingBulkLink/BulkLinkBooks_WithoutAuth (0.00s) - --- PASS: TestBookMatchingBulkLink/BulkLinkBooks_WithAuth_EmptyLinks (0.07s) - --- PASS: TestBookMatchingBulkLink/BulkLinkBooks_InvalidUnlinkedBookID (0.08s) - --- PASS: TestBookMatchingBulkLink/BulkLinkBooks_MultipleLinks (0.07s) -=== RUN TestBookMatchingAutoLink -=== RUN TestBookMatchingAutoLink/AutoLinkBooks_WithoutAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 [REQUEST] {"request_id":"79f6ec9f-5150-4a78-8196-76f9080b3fac","timestamp":"2026-02-10T17:43:56.417252222Z","method":"POST","path":"/api/sync/auto-link-books","headers":{"Accept-Encoding":"gzip","Content-Length":"39","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_threshold":0.8,"limit":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":15169,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:56.417290173Z","id":"79f6ec9f-5150-4a78-8196-76f9080b3fac","remote_ip":"127.0.0.1","host":"127.0.0.1:36529","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":37269,"latency_human":"37.269µs","bytes_in":39,"bytes_out":39} -{"time":"2026-02-10T17:43:56.417295613Z","id":"79f6ec9f-5150-4a78-8196-76f9080b3fac","remote_ip":"127.0.0.1","host":"127.0.0.1:36529","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":42819,"latency_human":"42.819µs","bytes_in":39,"bytes_out":39} -=== RUN TestBookMatchingAutoLink/AutoLinkBooks_WithAuth_DefaultThreshold -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'aba23c5c-c5d3-429e-bb8b-ce130ed8fbe3' -2026/02/10 17:43:56 [REQUEST] {"request_id":"419ea477-e93b-44d1-b7b5-0dcd87a57482","timestamp":"2026-02-10T17:43:56.436515771Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51220096,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.487762726Z","id":"419ea477-e93b-44d1-b7b5-0dcd87a57482","remote_ip":"127.0.0.1","host":"127.0.0.1:36899","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51240564,"latency_human":"51.240564ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.487788234Z","id":"419ea477-e93b-44d1-b7b5-0dcd87a57482","remote_ip":"127.0.0.1","host":"127.0.0.1:36899","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51266783,"latency_human":"51.266783ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"322280b1-c372-43e9-bcbb-17d3608a3169","timestamp":"2026-02-10T17:43:56.488065578Z","method":"POST","path":"/api/sync/auto-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjBiNTBiZGNkLWY5ZDctNDA2Zi1iMzcwLWFjMDUwOGEwODVhOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.u1e9ybih-0YGHAFM7MYEyuBTgdKOqDEqnBVwzLCw-wQ","Content-Length":"2","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2646019,"status_code":200,"response_size":31} -{"time":"2026-02-10T17:43:56.490737786Z","id":"322280b1-c372-43e9-bcbb-17d3608a3169","remote_ip":"127.0.0.1","host":"127.0.0.1:36899","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2671065,"latency_human":"2.671065ms","bytes_in":2,"bytes_out":31} -{"time":"2026-02-10T17:43:56.490745981Z","id":"322280b1-c372-43e9-bcbb-17d3608a3169","remote_ip":"127.0.0.1","host":"127.0.0.1:36899","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2680954,"latency_human":"2.680954ms","bytes_in":2,"bytes_out":31} -=== RUN TestBookMatchingAutoLink/AutoLinkBooks_CustomThreshold -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '80026848-3b53-4547-8a4f-8fa403f4ca4e' -2026/02/10 17:43:56 [REQUEST] {"request_id":"d4695585-ea2e-4e81-893b-1d9459ff09cc","timestamp":"2026-02-10T17:43:56.511999752Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48404151,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.560423129Z","id":"d4695585-ea2e-4e81-893b-1d9459ff09cc","remote_ip":"127.0.0.1","host":"127.0.0.1:38905","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48420862,"latency_human":"48.420862ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.560430532Z","id":"d4695585-ea2e-4e81-893b-1d9459ff09cc","remote_ip":"127.0.0.1","host":"127.0.0.1:38905","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48429889,"latency_human":"48.429889ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"30e756bc-6e09-486a-9295-a1dc3870dda9","timestamp":"2026-02-10T17:43:56.560661681Z","method":"POST","path":"/api/sync/auto-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjcwODdjZGFkLTI4OTQtNDA3OC1hZGEyLTU4OTQ3YTJmZTE0ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.22CWcjd4_hlRX8PeTuaMVB5au0Y96lW97aNE-29leqs","Content-Length":"40","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_threshold":0.95,"limit":20},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2255966,"status_code":200,"response_size":31} -{"time":"2026-02-10T17:43:56.562939858Z","id":"30e756bc-6e09-486a-9295-a1dc3870dda9","remote_ip":"127.0.0.1","host":"127.0.0.1:38905","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2276394,"latency_human":"2.276394ms","bytes_in":40,"bytes_out":31} -{"time":"2026-02-10T17:43:56.56294664Z","id":"30e756bc-6e09-486a-9295-a1dc3870dda9","remote_ip":"127.0.0.1","host":"127.0.0.1:38905","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2285069,"latency_human":"2.285069ms","bytes_in":40,"bytes_out":31} -=== RUN TestBookMatchingAutoLink/AutoLinkBooks_NoUnlinkedBooks -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'b6182744-cc81-4056-a723-164ad58849a4' -2026/02/10 17:43:56 [REQUEST] {"request_id":"eb649146-fe9d-49bf-993f-71e3afd8950e","timestamp":"2026-02-10T17:43:56.582999864Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49041303,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.632095568Z","id":"eb649146-fe9d-49bf-993f-71e3afd8950e","remote_ip":"127.0.0.1","host":"127.0.0.1:36025","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49089463,"latency_human":"49.089463ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.632126786Z","id":"eb649146-fe9d-49bf-993f-71e3afd8950e","remote_ip":"127.0.0.1","host":"127.0.0.1:36025","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49115060,"latency_human":"49.11506ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"528ff852-7626-438e-aae5-d30d20d897e8","timestamp":"2026-02-10T17:43:56.632441821Z","method":"POST","path":"/api/sync/auto-link-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRjZjA1NjNkLTAxNjMtNDliNi04NDhiLTU3MjBlZGUxZjIzZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.GjW8Qysod0dGQcESf-WYOw_E1XrNjGbed5IEz1qKzls","Content-Length":"11","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"limit":5},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3010525,"status_code":200,"response_size":31} -{"time":"2026-02-10T17:43:56.635484325Z","id":"528ff852-7626-438e-aae5-d30d20d897e8","remote_ip":"127.0.0.1","host":"127.0.0.1:36025","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3041072,"latency_human":"3.041072ms","bytes_in":11,"bytes_out":31} -{"time":"2026-02-10T17:43:56.63549243Z","id":"528ff852-7626-438e-aae5-d30d20d897e8","remote_ip":"127.0.0.1","host":"127.0.0.1:36025","method":"POST","uri":"/api/sync/auto-link-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3051091,"latency_human":"3.051091ms","bytes_in":11,"bytes_out":31} ---- PASS: TestBookMatchingAutoLink (0.22s) - --- PASS: TestBookMatchingAutoLink/AutoLinkBooks_WithoutAuth (0.00s) - --- PASS: TestBookMatchingAutoLink/AutoLinkBooks_WithAuth_DefaultThreshold (0.07s) - --- PASS: TestBookMatchingAutoLink/AutoLinkBooks_CustomThreshold (0.07s) - --- PASS: TestBookMatchingAutoLink/AutoLinkBooks_NoUnlinkedBooks (0.07s) -=== RUN TestBookMatchingSuggestions -=== RUN TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_WithoutAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 [REQUEST] {"request_id":"6977af28-99c2-4e41-b3ce-c41f9cf4a332","timestamp":"2026-02-10T17:43:56.636638807Z","method":"GET","path":"/api/sync/unlinked-books/9fb7022a-c22d-4344-92f2-8f7bb4745b17/suggestions","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4098,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:56.636662681Z","id":"6977af28-99c2-4e41-b3ce-c41f9cf4a332","remote_ip":"127.0.0.1","host":"127.0.0.1:40987","method":"GET","uri":"/api/sync/unlinked-books/9fb7022a-c22d-4344-92f2-8f7bb4745b17/suggestions","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":21910,"latency_human":"21.91µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:56.636668332Z","id":"6977af28-99c2-4e41-b3ce-c41f9cf4a332","remote_ip":"127.0.0.1","host":"127.0.0.1:40987","method":"GET","uri":"/api/sync/unlinked-books/9fb7022a-c22d-4344-92f2-8f7bb4745b17/suggestions","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":29725,"latency_human":"29.725µs","bytes_in":0,"bytes_out":39} -=== RUN TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_InvalidUUID -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '144bae00-0705-4c1e-a35b-8232c5047594' -2026/02/10 17:43:56 [REQUEST] {"request_id":"7917d970-e7d8-4aa3-a615-080f9b73d587","timestamp":"2026-02-10T17:43:56.656503501Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50993625,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.707521231Z","id":"7917d970-e7d8-4aa3-a615-080f9b73d587","remote_ip":"127.0.0.1","host":"127.0.0.1:34345","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51013392,"latency_human":"51.013392ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.707541508Z","id":"7917d970-e7d8-4aa3-a615-080f9b73d587","remote_ip":"127.0.0.1","host":"127.0.0.1:34345","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51033149,"latency_human":"51.033149ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"753ee038-a439-4681-b1e0-852d58442fe7","timestamp":"2026-02-10T17:43:56.707792073Z","method":"GET","path":"/api/sync/unlinked-books/invalid-uuid/suggestions","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImQ5MWZlODE3LTRkMGMtNDEwZS04YTQ0LTUxOGE3OWU1YjljNiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.46eDDQAqA-x1_XJawWRqmFeuN5_udl8b8MJDoTwLxXg","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48761,"status_code":400,"response_size":37} -{"time":"2026-02-10T17:43:56.707859038Z","id":"753ee038-a439-4681-b1e0-852d58442fe7","remote_ip":"127.0.0.1","host":"127.0.0.1:34345","method":"GET","uri":"/api/sync/unlinked-books/invalid-uuid/suggestions","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":66383,"latency_human":"66.383µs","bytes_in":0,"bytes_out":37} -{"time":"2026-02-10T17:43:56.707865239Z","id":"753ee038-a439-4681-b1e0-852d58442fe7","remote_ip":"127.0.0.1","host":"127.0.0.1:34345","method":"GET","uri":"/api/sync/unlinked-books/invalid-uuid/suggestions","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":73837,"latency_human":"73.837µs","bytes_in":0,"bytes_out":37} -=== RUN TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_BookNotFound -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '3293f4d5-5aaf-4dbd-a903-5de7e1f0652d' -2026/02/10 17:43:56 [REQUEST] {"request_id":"33472788-b605-4395-a5bb-c26d5d911b64","timestamp":"2026-02-10T17:43:56.727233542Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48921491,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.776185469Z","id":"33472788-b605-4395-a5bb-c26d5d911b64","remote_ip":"127.0.0.1","host":"127.0.0.1:43377","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48948552,"latency_human":"48.948552ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.776199195Z","id":"33472788-b605-4395-a5bb-c26d5d911b64","remote_ip":"127.0.0.1","host":"127.0.0.1:43377","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48961135,"latency_human":"48.961135ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"2d42c6ee-713b-4ab4-b1f6-26198c175aee","timestamp":"2026-02-10T17:43:56.77650374Z","method":"GET","path":"/api/sync/unlinked-books/878f0bb3-cd8e-460c-9cba-741329393915/suggestions","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjVkNTQ3MTJhLTgxYzEtNDA2Ny1hM2I0LThmYjMzNTFmODJhMSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bTcmEz5gKC0hCG5U-OBN8QDu7J_hIOtZSbTbiB6FA-I","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1491417,"status_code":404,"response_size":36} -{"time":"2026-02-10T17:43:56.778017909Z","id":"2d42c6ee-713b-4ab4-b1f6-26198c175aee","remote_ip":"127.0.0.1","host":"127.0.0.1:43377","method":"GET","uri":"/api/sync/unlinked-books/878f0bb3-cd8e-460c-9cba-741329393915/suggestions","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":1513608,"latency_human":"1.513608ms","bytes_in":0,"bytes_out":36} -{"time":"2026-02-10T17:43:56.778025112Z","id":"2d42c6ee-713b-4ab4-b1f6-26198c175aee","remote_ip":"127.0.0.1","host":"127.0.0.1:43377","method":"GET","uri":"/api/sync/unlinked-books/878f0bb3-cd8e-460c-9cba-741329393915/suggestions","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":1521843,"latency_human":"1.521843ms","bytes_in":0,"bytes_out":36} -=== RUN TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_ResponseStructure -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '877b3b07-82ea-4353-9a34-70bd865597f2' -2026/02/10 17:43:56 [REQUEST] {"request_id":"3e8f0f11-c95f-43f4-bd33-d0b032f632ef","timestamp":"2026-02-10T17:43:56.797073071Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49750789,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.846856521Z","id":"3e8f0f11-c95f-43f4-bd33-d0b032f632ef","remote_ip":"127.0.0.1","host":"127.0.0.1:42499","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49780094,"latency_human":"49.780094ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.846865888Z","id":"3e8f0f11-c95f-43f4-bd33-d0b032f632ef","remote_ip":"127.0.0.1","host":"127.0.0.1:42499","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49792757,"latency_human":"49.792757ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"916c3d8e-b835-4b7b-8d0d-ed4818c798ae","timestamp":"2026-02-10T17:43:56.847117255Z","method":"GET","path":"/api/sync/unlinked-books/3fc7f303-46e6-4582-8f1d-5b28d1a02190/suggestions","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjI2YzYxYmU5LTczYTgtNDlmYy05NTc4LTFiMmUzNDI0ZWVlNiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0._pl-sFe9PCvAq1KwjIbkTofwjxr_awwywGL0GWvma5Q","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2022131,"status_code":404,"response_size":36} -{"time":"2026-02-10T17:43:56.849167679Z","id":"916c3d8e-b835-4b7b-8d0d-ed4818c798ae","remote_ip":"127.0.0.1","host":"127.0.0.1:42499","method":"GET","uri":"/api/sync/unlinked-books/3fc7f303-46e6-4582-8f1d-5b28d1a02190/suggestions","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":2047288,"latency_human":"2.047288ms","bytes_in":0,"bytes_out":36} -{"time":"2026-02-10T17:43:56.849188157Z","id":"916c3d8e-b835-4b7b-8d0d-ed4818c798ae","remote_ip":"127.0.0.1","host":"127.0.0.1:42499","method":"GET","uri":"/api/sync/unlinked-books/3fc7f303-46e6-4582-8f1d-5b28d1a02190/suggestions","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":2070340,"latency_human":"2.07034ms","bytes_in":0,"bytes_out":36} ---- PASS: TestBookMatchingSuggestions (0.21s) - --- PASS: TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_WithoutAuth (0.00s) - --- PASS: TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_InvalidUUID (0.07s) - --- PASS: TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_BookNotFound (0.07s) - --- PASS: TestBookMatchingSuggestions/GetUnlinkedBookSuggestions_ResponseStructure (0.07s) -=== RUN TestBookMatchingDeviceFileAliases -=== RUN TestBookMatchingDeviceFileAliases/GetDeviceFileAliases_WithoutAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 [REQUEST] {"request_id":"e961aed1-fd67-4145-9b0e-d32a11b20981","timestamp":"2026-02-10T17:43:56.850987134Z","method":"GET","path":"/api/devices/5eb07322-03be-4da2-932e-3f694234cc51/file-aliases","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":14848,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:56.851079556Z","id":"e961aed1-fd67-4145-9b0e-d32a11b20981","remote_ip":"127.0.0.1","host":"127.0.0.1:39455","method":"GET","uri":"/api/devices/5eb07322-03be-4da2-932e-3f694234cc51/file-aliases","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":94054,"latency_human":"94.054µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:56.851091828Z","id":"e961aed1-fd67-4145-9b0e-d32a11b20981","remote_ip":"127.0.0.1","host":"127.0.0.1:39455","method":"GET","uri":"/api/devices/5eb07322-03be-4da2-932e-3f694234cc51/file-aliases","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":113741,"latency_human":"113.741µs","bytes_in":0,"bytes_out":39} -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -=== RUN TestBookMatchingDeviceFileAliases/GetDeviceFileAliases_WithAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '85438531-70dc-4305-b07a-9f8e2ee3a39d' -2026/02/10 17:43:56 [REQUEST] {"request_id":"769f67e1-4247-4501-9538-c2a2c8417630","timestamp":"2026-02-10T17:43:56.86992586Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50307893,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.920261244Z","id":"769f67e1-4247-4501-9538-c2a2c8417630","remote_ip":"127.0.0.1","host":"127.0.0.1:36295","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50330485,"latency_human":"50.330485ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.920276813Z","id":"769f67e1-4247-4501-9538-c2a2c8417630","remote_ip":"127.0.0.1","host":"127.0.0.1:36295","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50344441,"latency_human":"50.344441ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"d5efe95c-4411-4725-8233-a1856b135cea","timestamp":"2026-02-10T17:43:56.920557153Z","method":"GET","path":"/api/devices/1a49212a-ff0d-464f-beda-5be475811f91/file-aliases","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk3N2VmYjFmLTUzOWQtNGE0MC05ZWMzLWE3M2JkODExM2YzZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.K9JfUMpbXCHitsinn4LDzj6Au3LoTTTvoj_bJwOkLVU","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2603340,"status_code":200,"response_size":76} -{"time":"2026-02-10T17:43:56.923181252Z","id":"d5efe95c-4411-4725-8233-a1856b135cea","remote_ip":"127.0.0.1","host":"127.0.0.1:36295","method":"GET","uri":"/api/devices/1a49212a-ff0d-464f-beda-5be475811f91/file-aliases","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2624089,"latency_human":"2.624089ms","bytes_in":0,"bytes_out":76} -{"time":"2026-02-10T17:43:56.923184498Z","id":"d5efe95c-4411-4725-8233-a1856b135cea","remote_ip":"127.0.0.1","host":"127.0.0.1:36295","method":"GET","uri":"/api/devices/1a49212a-ff0d-464f-beda-5be475811f91/file-aliases","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2628446,"latency_human":"2.628446ms","bytes_in":0,"bytes_out":76} -=== RUN TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_WithoutAuth -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 [REQUEST] {"request_id":"169d8a7f-bf27-4cd9-956e-80179703e9a5","timestamp":"2026-02-10T17:43:56.923975946Z","method":"POST","path":"/api/devices/e58b68d2-ff79-4343-b9e2-8243231970cc/file-aliases","headers":{"Accept-Encoding":"gzip","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_score":0.9,"file_path":"/mnt/sd/test.epub","file_sha256":"","media_item_id":"3000a902-111b-4e4b-a35c-cf7baa4d10c4"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":28122,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:56.924038081Z","id":"169d8a7f-bf27-4cd9-956e-80179703e9a5","remote_ip":"127.0.0.1","host":"127.0.0.1:36603","method":"POST","uri":"/api/devices/e58b68d2-ff79-4343-b9e2-8243231970cc/file-aliases","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":61264,"latency_human":"61.264µs","bytes_in":128,"bytes_out":39} -{"time":"2026-02-10T17:43:56.924047118Z","id":"169d8a7f-bf27-4cd9-956e-80179703e9a5","remote_ip":"127.0.0.1","host":"127.0.0.1:36603","method":"POST","uri":"/api/devices/e58b68d2-ff79-4343-b9e2-8243231970cc/file-aliases","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":71983,"latency_human":"71.983µs","bytes_in":128,"bytes_out":39} -=== RUN TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_InvalidDeviceID -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '31450548-13e1-44e4-ace8-bdba48ad90e7' -2026/02/10 17:43:56 [REQUEST] {"request_id":"9a38402b-efe4-4c75-b29e-96e27469776d","timestamp":"2026-02-10T17:43:56.942565765Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48589926,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:56.991192308Z","id":"9a38402b-efe4-4c75-b29e-96e27469776d","remote_ip":"127.0.0.1","host":"127.0.0.1:42325","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48621665,"latency_human":"48.621665ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:56.99120906Z","id":"9a38402b-efe4-4c75-b29e-96e27469776d","remote_ip":"127.0.0.1","host":"127.0.0.1:42325","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48635972,"latency_human":"48.635972ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:56 [REQUEST] {"request_id":"892c8429-ccf3-4ba3-9ce5-b531d4e44e3e","timestamp":"2026-02-10T17:43:56.991455096Z","method":"POST","path":"/api/devices/invalid-uuid/file-aliases","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzYsImlhdCI6MTc3MDc0NTQzNiwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjJmNGM4Zjc4LTYwZjEtNGVhMS05Njk4LTZmZGE1MjgwMjUwZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.YjnnhALgYk6UKPImV9broUwltNwyFlj5BpH3nOGp7QE","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_score":0.9,"file_path":"/mnt/sd/test.epub","file_sha256":"","media_item_id":"8e881ffa-7524-4ccb-84a1-a877806285c3"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":37299,"status_code":400,"response_size":30} -{"time":"2026-02-10T17:43:56.991505329Z","id":"892c8429-ccf3-4ba3-9ce5-b531d4e44e3e","remote_ip":"127.0.0.1","host":"127.0.0.1:42325","method":"POST","uri":"/api/devices/invalid-uuid/file-aliases","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":49161,"latency_human":"49.161µs","bytes_in":128,"bytes_out":30} -{"time":"2026-02-10T17:43:56.991512843Z","id":"892c8429-ccf3-4ba3-9ce5-b531d4e44e3e","remote_ip":"127.0.0.1","host":"127.0.0.1:42325","method":"POST","uri":"/api/devices/invalid-uuid/file-aliases","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":58128,"latency_human":"58.128µs","bytes_in":128,"bytes_out":30} -=== RUN TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_InvalidMediaItemID -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:56 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '70a8a7bf-cd26-4534-a7a8-698b6b686523' -2026/02/10 17:43:57 [REQUEST] {"request_id":"b865861c-0240-4861-8e63-4e74308273f8","timestamp":"2026-02-10T17:43:57.010496823Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51109480,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.061655935Z","id":"b865861c-0240-4861-8e63-4e74308273f8","remote_ip":"127.0.0.1","host":"127.0.0.1:41447","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51152540,"latency_human":"51.15254ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.061668879Z","id":"b865861c-0240-4861-8e63-4e74308273f8","remote_ip":"127.0.0.1","host":"127.0.0.1:41447","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51171315,"latency_human":"51.171315ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"7b4632de-abe0-4f48-8f60-0eba99a89b9c","timestamp":"2026-02-10T17:43:57.062128332Z","method":"POST","path":"/api/devices/d5a621bf-e246-489e-b1c7-a462e03b0923/file-aliases","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjhhOWU0OTI1LWZlZTktNGQ0OC05YWQ2LWQzNGE0YTJhZjcyZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.NIOyTQ1jt-qgs7pvxl8WSJDssW1urupzpF6J7rUiElI","Content-Length":"104","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_score":0.9,"file_path":"/mnt/sd/test.epub","file_sha256":"","media_item_id":"invalid-uuid"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":129740,"status_code":400,"response_size":34} -{"time":"2026-02-10T17:43:57.062293939Z","id":"7b4632de-abe0-4f48-8f60-0eba99a89b9c","remote_ip":"127.0.0.1","host":"127.0.0.1:41447","method":"POST","uri":"/api/devices/d5a621bf-e246-489e-b1c7-a462e03b0923/file-aliases","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":164996,"latency_human":"164.996µs","bytes_in":104,"bytes_out":34} -{"time":"2026-02-10T17:43:57.062301593Z","id":"7b4632de-abe0-4f48-8f60-0eba99a89b9c","remote_ip":"127.0.0.1","host":"127.0.0.1:41447","method":"POST","uri":"/api/devices/d5a621bf-e246-489e-b1c7-a462e03b0923/file-aliases","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":206863,"latency_human":"206.863µs","bytes_in":104,"bytes_out":34} -=== RUN TestBookMatchingDeviceFileAliases/UpdateDeviceFileAlias_InvalidAliasID -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '21dd4e7a-6074-4785-8b02-5e9619d6f0d3' -2026/02/10 17:43:57 [REQUEST] {"request_id":"a01b9d45-7775-4ad3-a9c8-a88dde5dcda0","timestamp":"2026-02-10T17:43:57.082440626Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48683890,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.131161114Z","id":"a01b9d45-7775-4ad3-a9c8-a88dde5dcda0","remote_ip":"127.0.0.1","host":"127.0.0.1:44737","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48711992,"latency_human":"48.711992ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.131191009Z","id":"a01b9d45-7775-4ad3-a9c8-a88dde5dcda0","remote_ip":"127.0.0.1","host":"127.0.0.1:44737","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48732059,"latency_human":"48.732059ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"177ecf50-225d-499a-af69-2cb2d297f113","timestamp":"2026-02-10T17:43:57.131506555Z","method":"PUT","path":"/api/devices/11ea8c20-abda-4664-97e7-eaf9501fcc0e/file-aliases/invalid-uuid","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjMxOTMyNzZjLTI2MGQtNGIxYi04OTEyLTQ2YjIyYmMwOWM3OCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.2ftmEUXgEhARsG1ZCvT6vF8uAX2rOHgH9XOlYzd9mcE","Content-Length":"25","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"confidence_score":0.95},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":61885,"status_code":400,"response_size":29} -{"time":"2026-02-10T17:43:57.13159039Z","id":"177ecf50-225d-499a-af69-2cb2d297f113","remote_ip":"127.0.0.1","host":"127.0.0.1:44737","method":"PUT","uri":"/api/devices/11ea8c20-abda-4664-97e7-eaf9501fcc0e/file-aliases/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":82994,"latency_human":"82.994µs","bytes_in":25,"bytes_out":29} -{"time":"2026-02-10T17:43:57.131597864Z","id":"177ecf50-225d-499a-af69-2cb2d297f113","remote_ip":"127.0.0.1","host":"127.0.0.1:44737","method":"PUT","uri":"/api/devices/11ea8c20-abda-4664-97e7-eaf9501fcc0e/file-aliases/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":92451,"latency_human":"92.451µs","bytes_in":25,"bytes_out":29} -=== RUN TestBookMatchingDeviceFileAliases/DeleteDeviceFileAlias_InvalidAliasID -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'fe9c9010-58a6-4efe-8bea-ccd24181683f' -2026/02/10 17:43:57 [REQUEST] {"request_id":"19b486c8-c2c2-469e-b3c0-40f462be380f","timestamp":"2026-02-10T17:43:57.15114571Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50075282,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.201242682Z","id":"19b486c8-c2c2-469e-b3c0-40f462be380f","remote_ip":"127.0.0.1","host":"127.0.0.1:44629","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50094447,"latency_human":"50.094447ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.201248513Z","id":"19b486c8-c2c2-469e-b3c0-40f462be380f","remote_ip":"127.0.0.1","host":"127.0.0.1:44629","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50105407,"latency_human":"50.105407ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"245b8caa-a0fe-46f9-8918-16267aa6b8a2","timestamp":"2026-02-10T17:43:57.201441641Z","method":"DELETE","path":"/api/devices/8078f44f-be58-4eef-927b-c853634f0dbb/file-aliases/invalid-uuid","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk2MjE3NDFkLThkMDQtNDRkZS05N2FhLWRjZWI0ODJhOGE2YiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.VYASObFbts30z1AsXPb1PLifHjJLXobQAWKH3VW_EGs","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49762,"status_code":400,"response_size":29} -{"time":"2026-02-10T17:43:57.201509166Z","id":"245b8caa-a0fe-46f9-8918-16267aa6b8a2","remote_ip":"127.0.0.1","host":"127.0.0.1:44629","method":"DELETE","uri":"/api/devices/8078f44f-be58-4eef-927b-c853634f0dbb/file-aliases/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":67465,"latency_human":"67.465µs","bytes_in":0,"bytes_out":29} -{"time":"2026-02-10T17:43:57.201515959Z","id":"245b8caa-a0fe-46f9-8918-16267aa6b8a2","remote_ip":"127.0.0.1","host":"127.0.0.1:44629","method":"DELETE","uri":"/api/devices/8078f44f-be58-4eef-927b-c853634f0dbb/file-aliases/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":75379,"latency_human":"75.379µs","bytes_in":0,"bytes_out":29} ---- PASS: TestBookMatchingDeviceFileAliases (0.35s) - --- PASS: TestBookMatchingDeviceFileAliases/GetDeviceFileAliases_WithoutAuth (0.00s) - --- PASS: TestBookMatchingDeviceFileAliases/GetDeviceFileAliases_WithAuth (0.07s) - --- PASS: TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_WithoutAuth (0.00s) - --- PASS: TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_InvalidDeviceID (0.07s) - --- PASS: TestBookMatchingDeviceFileAliases/CreateDeviceFileAlias_InvalidMediaItemID (0.07s) - --- PASS: TestBookMatchingDeviceFileAliases/UpdateDeviceFileAlias_InvalidAliasID (0.07s) - --- PASS: TestBookMatchingDeviceFileAliases/DeleteDeviceFileAlias_InvalidAliasID (0.07s) -=== RUN TestBookMatchingGetBookMatches -=== RUN TestBookMatchingGetBookMatches/GetBookMatches_WithoutAuth -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 [REQUEST] {"request_id":"9a73d3db-5b8e-4948-8065-c2300d66d38b","timestamp":"2026-02-10T17:43:57.202623644Z","method":"GET","path":"/api/books/match","query_params":{"title":"Test"},"headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":8205,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:57.202658959Z","id":"9a73d3db-5b8e-4948-8065-c2300d66d38b","remote_ip":"127.0.0.1","host":"127.0.0.1:45293","method":"GET","uri":"/api/books/match?title=Test","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":33823,"latency_human":"33.823µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:43:57.202670791Z","id":"9a73d3db-5b8e-4948-8065-c2300d66d38b","remote_ip":"127.0.0.1","host":"127.0.0.1:45293","method":"GET","uri":"/api/books/match?title=Test","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":47568,"latency_human":"47.568µs","bytes_in":0,"bytes_out":39} -=== RUN TestBookMatchingGetBookMatches/GetBookMatches_WithAuth_ByTitle -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'a1fd9eb3-7f9e-455d-9503-c38cb04d859c' -2026/02/10 17:43:57 [REQUEST] {"request_id":"3495d428-588a-45a6-8a3c-a9083beebf9e","timestamp":"2026-02-10T17:43:57.221998439Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48454535,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.270490563Z","id":"3495d428-588a-45a6-8a3c-a9083beebf9e","remote_ip":"127.0.0.1","host":"127.0.0.1:35327","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48486925,"latency_human":"48.486925ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.270503838Z","id":"3495d428-588a-45a6-8a3c-a9083beebf9e","remote_ip":"127.0.0.1","host":"127.0.0.1:35327","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48504357,"latency_human":"48.504357ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"4925bd8c-d36e-4081-8ef9-491482ee1a92","timestamp":"2026-02-10T17:43:57.270713407Z","method":"GET","path":"/api/books/match","query_params":{"title":"Test"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjJhMzA2YTZlLWNjNWQtNGY0Mi04MTFkLWZhM2FmZGZlZmIxZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.uFqp2OYSWlVeIUNEIq-XKvQiceJo2gN08ocSRQc95L8","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":5279244,"status_code":200,"response_size":37} -{"time":"2026-02-10T17:43:57.276014171Z","id":"4925bd8c-d36e-4081-8ef9-491482ee1a92","remote_ip":"127.0.0.1","host":"127.0.0.1:35327","method":"GET","uri":"/api/books/match?title=Test","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":5300053,"latency_human":"5.300053ms","bytes_in":0,"bytes_out":37} -{"time":"2026-02-10T17:43:57.276020132Z","id":"4925bd8c-d36e-4081-8ef9-491482ee1a92","remote_ip":"127.0.0.1","host":"127.0.0.1:35327","method":"GET","uri":"/api/books/match?title=Test","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":5307486,"latency_human":"5.307486ms","bytes_in":0,"bytes_out":37} -=== RUN TestBookMatchingGetBookMatches/GetBookMatches_InvalidFileSize -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '360003f3-5de1-4381-829b-501df3efedfa' -2026/02/10 17:43:57 [REQUEST] {"request_id":"72d4f5e7-3bcd-4994-ab71-64a0c0b2bab8","timestamp":"2026-02-10T17:43:57.296090347Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49930222,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.346038883Z","id":"72d4f5e7-3bcd-4994-ab71-64a0c0b2bab8","remote_ip":"127.0.0.1","host":"127.0.0.1:39569","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49945971,"latency_human":"49.945971ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.346045926Z","id":"72d4f5e7-3bcd-4994-ab71-64a0c0b2bab8","remote_ip":"127.0.0.1","host":"127.0.0.1:39569","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49954728,"latency_human":"49.954728ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"c9d08d4a-797f-41da-b0d2-f2b51678561a","timestamp":"2026-02-10T17:43:57.346217825Z","method":"GET","path":"/api/books/match","query_params":{"file_size":"invalid","title":"Test"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjVhNzc3MzA0LWUzMmUtNGU4NC05Y2UzLTczZDBhODliNmQ0ZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wNYIIHeJ5O6ptqln70Ify8L-DZ5EHprbXG2ZpSRti3M","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":30196,"status_code":400,"response_size":40} -{"time":"2026-02-10T17:43:57.34625803Z","id":"c9d08d4a-797f-41da-b0d2-f2b51678561a","remote_ip":"127.0.0.1","host":"127.0.0.1:39569","method":"GET","uri":"/api/books/match?title=Test&file_size=invalid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":39684,"latency_human":"39.684µs","bytes_in":0,"bytes_out":40} -{"time":"2026-02-10T17:43:57.346261927Z","id":"c9d08d4a-797f-41da-b0d2-f2b51678561a","remote_ip":"127.0.0.1","host":"127.0.0.1:39569","method":"GET","uri":"/api/books/match?title=Test&file_size=invalid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":44343,"latency_human":"44.343µs","bytes_in":0,"bytes_out":40} -=== RUN TestBookMatchingGetBookMatches/GetBookMatches_MultipleIdentifiers -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '5215389b-2a6e-472f-a2b8-6327e89370e4' -2026/02/10 17:43:57 [REQUEST] {"request_id":"38884c42-09c4-4fc4-b336-4c007fcc7347","timestamp":"2026-02-10T17:43:57.367431191Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48061526,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.415545815Z","id":"38884c42-09c4-4fc4-b336-4c007fcc7347","remote_ip":"127.0.0.1","host":"127.0.0.1:41553","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48107291,"latency_human":"48.107291ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.415558819Z","id":"38884c42-09c4-4fc4-b336-4c007fcc7347","remote_ip":"127.0.0.1","host":"127.0.0.1:41553","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48126546,"latency_human":"48.126546ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"2ae93c17-e11d-494e-a63f-0d73bccf0b63","timestamp":"2026-02-10T17:43:57.415880166Z","method":"GET","path":"/api/books/match","query_params":{"identifier":"id1","title":"Test"},"headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM2NjU5NGE2LTFkZDItNDc2OC1hOWNjLWM1M2ZjYWFhYmM5MCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.-b9LW1bgAa1yqZzMrxfH90kI2zhM7UGyeeqrltxCOT0","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4383903,"status_code":200,"response_size":37} -{"time":"2026-02-10T17:43:57.420283815Z","id":"2ae93c17-e11d-494e-a63f-0d73bccf0b63","remote_ip":"127.0.0.1","host":"127.0.0.1:41553","method":"GET","uri":"/api/books/match?identifier=id1&identifier=id2&title=Test","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":4402898,"latency_human":"4.402898ms","bytes_in":0,"bytes_out":37} -{"time":"2026-02-10T17:43:57.420289817Z","id":"2ae93c17-e11d-494e-a63f-0d73bccf0b63","remote_ip":"127.0.0.1","host":"127.0.0.1:41553","method":"GET","uri":"/api/books/match?identifier=id1&identifier=id2&title=Test","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":4410732,"latency_human":"4.410732ms","bytes_in":0,"bytes_out":37} ---- PASS: TestBookMatchingGetBookMatches (0.22s) - --- PASS: TestBookMatchingGetBookMatches/GetBookMatches_WithoutAuth (0.00s) - --- PASS: TestBookMatchingGetBookMatches/GetBookMatches_WithAuth_ByTitle (0.07s) - --- PASS: TestBookMatchingGetBookMatches/GetBookMatches_InvalidFileSize (0.07s) - --- PASS: TestBookMatchingGetBookMatches/GetBookMatches_MultipleIdentifiers (0.07s) -=== RUN TestCollectionsBulkOperations -=== RUN TestCollectionsBulkOperations/BulkAddBooks_WithoutAuth -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 [REQUEST] {"request_id":"78b8d0a3-6a92-4624-8e3f-ed46083e9392","timestamp":"2026-02-10T17:43:57.421186901Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Content-Length":"125","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["70d79f0f-d83c-4509-8623-25f8547883e3"],"collection_id":"a0ec1c25-a4d4-449a-9900-7614e0f58a02"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":9127,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:57.421212448Z","id":"78b8d0a3-6a92-4624-8e3f-ed46083e9392","remote_ip":"127.0.0.1","host":"127.0.0.1:44877","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":24836,"latency_human":"24.836µs","bytes_in":125,"bytes_out":39} -{"time":"2026-02-10T17:43:57.421219371Z","id":"78b8d0a3-6a92-4624-8e3f-ed46083e9392","remote_ip":"127.0.0.1","host":"127.0.0.1:44877","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":32531,"latency_human":"32.531µs","bytes_in":125,"bytes_out":39} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_EmptyOperations -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '95944567-7192-467b-adbb-d47bec0018e5' -2026/02/10 17:43:57 [REQUEST] {"request_id":"7ac46acf-4ac8-47d2-9b92-cc1503ecd49c","timestamp":"2026-02-10T17:43:57.440841084Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51459500,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.49233621Z","id":"7ac46acf-4ac8-47d2-9b92-cc1503ecd49c","remote_ip":"127.0.0.1","host":"127.0.0.1:36333","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51488012,"latency_human":"51.488012ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.492345738Z","id":"7ac46acf-4ac8-47d2-9b92-cc1503ecd49c","remote_ip":"127.0.0.1","host":"127.0.0.1:36333","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51503732,"latency_human":"51.503732ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"935d3799-c565-439a-9c77-7b9b52850f09","timestamp":"2026-02-10T17:43:57.492584991Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM2Yzk0YmU5LTJiYmEtNDY0My1hMzVmLWEyYTNiNTA5NjVmOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.MsyY7mTo_s0l8ijQV4YyaPdt3jIDglcKun4Nkzy6jgc","Content-Length":"17","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":88575,"status_code":400,"response_size":32} -{"time":"2026-02-10T17:43:57.492687972Z","id":"935d3799-c565-439a-9c77-7b9b52850f09","remote_ip":"127.0.0.1","host":"127.0.0.1:36333","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":102550,"latency_human":"102.55µs","bytes_in":17,"bytes_out":32} -{"time":"2026-02-10T17:43:57.492691519Z","id":"935d3799-c565-439a-9c77-7b9b52850f09","remote_ip":"127.0.0.1","host":"127.0.0.1:36333","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":106778,"latency_human":"106.778µs","bytes_in":17,"bytes_out":32} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_InvalidCollectionID -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '26569022-cad0-498c-b584-59efe4ef6662' -2026/02/10 17:43:57 [REQUEST] {"request_id":"9d70e800-8708-4084-8124-5a4eefd6142a","timestamp":"2026-02-10T17:43:57.5139183Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48494318,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.562435611Z","id":"9d70e800-8708-4084-8124-5a4eefd6142a","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48513885,"latency_human":"48.513885ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.562444577Z","id":"9d70e800-8708-4084-8124-5a4eefd6142a","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48526028,"latency_human":"48.526028ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"57c3f803-04e7-4629-818c-b673da98eaf5","timestamp":"2026-02-10T17:43:57.562631695Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjAyODcxYzM5LWNhM2MtNGJmZi1hYzVmLWUwZGY2NDE1OGE1ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bVzT7htiAXcaBB7_soerQh3D63vpvGsVSkYJiuMlgRM","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3767930,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.566449017Z","id":"57c3f803-04e7-4629-818c-b673da98eaf5","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3813886,"latency_human":"3.813886ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.56646171Z","id":"57c3f803-04e7-4629-818c-b673da98eaf5","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3829545,"latency_human":"3.829545ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"2e3fa0e3-dc6b-4ff8-97a8-0177a8695172","timestamp":"2026-02-10T17:43:57.56674694Z","method":"POST","path":"/api/libraries/a1df2e88-c533-46bb-bcc5-9c22656df7bc/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjAyODcxYzM5LWNhM2MtNGJmZi1hYzVmLWUwZGY2NDE1OGE1ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bVzT7htiAXcaBB7_soerQh3D63vpvGsVSkYJiuMlgRM","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3155484,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.569945333Z","id":"2e3fa0e3-dc6b-4ff8-97a8-0177a8695172","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/libraries/a1df2e88-c533-46bb-bcc5-9c22656df7bc/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3196701,"latency_human":"3.196701ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.569953118Z","id":"2e3fa0e3-dc6b-4ff8-97a8-0177a8695172","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/libraries/a1df2e88-c533-46bb-bcc5-9c22656df7bc/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3206569,"latency_human":"3.206569ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"9f63f24c-fda4-4566-b2b9-21dbfb554af4","timestamp":"2026-02-10T17:43:57.570322493Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjAyODcxYzM5LWNhM2MtNGJmZi1hYzVmLWUwZGY2NDE1OGE1ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bVzT7htiAXcaBB7_soerQh3D63vpvGsVSkYJiuMlgRM","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"a1df2e88-c533-46bb-bcc5-9c22656df7bc","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":5677163,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.576029401Z","id":"9f63f24c-fda4-4566-b2b9-21dbfb554af4","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5705245,"latency_human":"5.705245ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.576037265Z","id":"9f63f24c-fda4-4566-b2b9-21dbfb554af4","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5715393,"latency_human":"5.715393ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"efe0f8ce-e311-4000-ae7c-b95e7de75515","timestamp":"2026-02-10T17:43:57.576343764Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjAyODcxYzM5LWNhM2MtNGJmZi1hYzVmLWUwZGY2NDE1OGE1ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.bVzT7htiAXcaBB7_soerQh3D63vpvGsVSkYJiuMlgRM","Content-Length":"101","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["d93717ec-f67b-4873-8a61-5be4c8475a51"],"collection_id":"invalid-uuid"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":94165,"status_code":200,"response_size":131} -{"time":"2026-02-10T17:43:57.576463406Z","id":"efe0f8ce-e311-4000-ae7c-b95e7de75515","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":119171,"latency_human":"119.171µs","bytes_in":101,"bytes_out":131} -{"time":"2026-02-10T17:43:57.57647117Z","id":"efe0f8ce-e311-4000-ae7c-b95e7de75515","remote_ip":"127.0.0.1","host":"127.0.0.1:36809","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":128217,"latency_human":"128.217µs","bytes_in":101,"bytes_out":131} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_InvalidBookID -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'c7cd9253-d1b5-41b3-8252-854f03022835' -2026/02/10 17:43:57 [REQUEST] {"request_id":"aea72d04-db21-403f-99b0-7a4149f01e7f","timestamp":"2026-02-10T17:43:57.596785618Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50512413,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.647322617Z","id":"aea72d04-db21-403f-99b0-7a4149f01e7f","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50533762,"latency_human":"50.533762ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.647332775Z","id":"aea72d04-db21-403f-99b0-7a4149f01e7f","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50547157,"latency_human":"50.547157ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"cf331486-30fb-4cc3-bc9c-a940c86b84db","timestamp":"2026-02-10T17:43:57.64756699Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc5NmZmYjE3LTMxZmEtNDU2ZC05ZWY2LTRhZTVjNjliMjAyZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.CqqNzbezrk4gzlWAm3xRID_Jpr1e70TD37ZBB3Rm0vA","Content-Length":"60","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test collection","name":"Test Collection"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3503129,"status_code":201,"response_size":288} -{"time":"2026-02-10T17:43:57.651091479Z","id":"cf331486-30fb-4cc3-bc9c-a940c86b84db","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3522535,"latency_human":"3.522535ms","bytes_in":60,"bytes_out":288} -{"time":"2026-02-10T17:43:57.651100756Z","id":"cf331486-30fb-4cc3-bc9c-a940c86b84db","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3534808,"latency_human":"3.534808ms","bytes_in":60,"bytes_out":288} -2026/02/10 17:43:57 [REQUEST] {"request_id":"02534438-3f32-4276-bfc2-62e2c694adb8","timestamp":"2026-02-10T17:43:57.651295126Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc5NmZmYjE3LTMxZmEtNDU2ZC05ZWY2LTRhZTVjNjliMjAyZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.CqqNzbezrk4gzlWAm3xRID_Jpr1e70TD37ZBB3Rm0vA","Content-Length":"101","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["invalid-uuid"],"collection_id":"8c225aed-0a46-4c50-815c-51fcd4d2cab9"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49452,"status_code":200,"response_size":174} -{"time":"2026-02-10T17:43:57.651365096Z","id":"02534438-3f32-4276-bfc2-62e2c694adb8","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":69800,"latency_human":"69.8µs","bytes_in":101,"bytes_out":174} -{"time":"2026-02-10T17:43:57.651368442Z","id":"02534438-3f32-4276-bfc2-62e2c694adb8","remote_ip":"127.0.0.1","host":"127.0.0.1:46613","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":73677,"latency_human":"73.677µs","bytes_in":101,"bytes_out":174} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_SingleOperation -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'a0364057-e64e-49c4-a318-c10c22fa08b6' -2026/02/10 17:43:57 [REQUEST] {"request_id":"c314c721-9f15-460b-852f-4a99ad329f55","timestamp":"2026-02-10T17:43:57.6749437Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49115802,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.724118391Z","id":"c314c721-9f15-460b-852f-4a99ad329f55","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49170803,"latency_human":"49.170803ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.724129521Z","id":"c314c721-9f15-460b-852f-4a99ad329f55","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49185360,"latency_human":"49.18536ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"6a27a0f1-36c3-4836-832f-5d3a9e59f7cf","timestamp":"2026-02-10T17:43:57.724411024Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExNDAyNDhhLTZjOGQtNDFkOC04NzVjLTJmODczMjE3ZTVmYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.P51ZZ6TExM1XDv-eJoqM0EZdwsPG_8hxJhxjA-WNvKQ","Content-Length":"60","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test collection","name":"Test Collection"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2709897,"status_code":201,"response_size":288} -{"time":"2026-02-10T17:43:57.72714194Z","id":"6a27a0f1-36c3-4836-832f-5d3a9e59f7cf","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2729544,"latency_human":"2.729544ms","bytes_in":60,"bytes_out":288} -{"time":"2026-02-10T17:43:57.727166897Z","id":"6a27a0f1-36c3-4836-832f-5d3a9e59f7cf","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2740645,"latency_human":"2.740645ms","bytes_in":60,"bytes_out":288} -2026/02/10 17:43:57 [REQUEST] {"request_id":"37179aea-8da8-4a35-927a-c14f3d046fb8","timestamp":"2026-02-10T17:43:57.727361708Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExNDAyNDhhLTZjOGQtNDFkOC04NzVjLTJmODczMjE3ZTVmYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.P51ZZ6TExM1XDv-eJoqM0EZdwsPG_8hxJhxjA-WNvKQ","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3330399,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.730726621Z","id":"37179aea-8da8-4a35-927a-c14f3d046fb8","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3364422,"latency_human":"3.364422ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.730734656Z","id":"37179aea-8da8-4a35-927a-c14f3d046fb8","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3373679,"latency_human":"3.373679ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"bef7fea9-acb1-48f8-875f-59ce965d5fbf","timestamp":"2026-02-10T17:43:57.730982626Z","method":"POST","path":"/api/libraries/706f07ef-51e6-44b6-a41b-e5f93fd20ef5/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExNDAyNDhhLTZjOGQtNDFkOC04NzVjLTJmODczMjE3ZTVmYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.P51ZZ6TExM1XDv-eJoqM0EZdwsPG_8hxJhxjA-WNvKQ","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3608394,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.734629952Z","id":"bef7fea9-acb1-48f8-875f-59ce965d5fbf","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/libraries/706f07ef-51e6-44b6-a41b-e5f93fd20ef5/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3646555,"latency_human":"3.646555ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.734637006Z","id":"bef7fea9-acb1-48f8-875f-59ce965d5fbf","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/libraries/706f07ef-51e6-44b6-a41b-e5f93fd20ef5/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3655161,"latency_human":"3.655161ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"0f740848-f1f0-480b-bba1-e824465145f7","timestamp":"2026-02-10T17:43:57.735147863Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExNDAyNDhhLTZjOGQtNDFkOC04NzVjLTJmODczMjE3ZTVmYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.P51ZZ6TExM1XDv-eJoqM0EZdwsPG_8hxJhxjA-WNvKQ","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"706f07ef-51e6-44b6-a41b-e5f93fd20ef5","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":6092173,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.741269039Z","id":"0f740848-f1f0-480b-bba1-e824465145f7","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6120595,"latency_human":"6.120595ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.741277215Z","id":"0f740848-f1f0-480b-bba1-e824465145f7","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6130474,"latency_human":"6.130474ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"f10a7bbe-cd73-47aa-bc92-7bbb896342d3","timestamp":"2026-02-10T17:43:57.741621543Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExNDAyNDhhLTZjOGQtNDFkOC04NzVjLTJmODczMjE3ZTVmYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.P51ZZ6TExM1XDv-eJoqM0EZdwsPG_8hxJhxjA-WNvKQ","Content-Length":"125","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["663b338d-18e5-4ea4-a064-4407d7aaca6e"],"collection_id":"64482d7b-2510-4805-a176-fdca394f35ed"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3090193,"status_code":200,"response_size":172} -{"time":"2026-02-10T17:43:57.744731453Z","id":"f10a7bbe-cd73-47aa-bc92-7bbb896342d3","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3109238,"latency_human":"3.109238ms","bytes_in":125,"bytes_out":172} -{"time":"2026-02-10T17:43:57.744737434Z","id":"f10a7bbe-cd73-47aa-bc92-7bbb896342d3","remote_ip":"127.0.0.1","host":"127.0.0.1:35083","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":3116422,"latency_human":"3.116422ms","bytes_in":125,"bytes_out":172} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_MultipleBooksSingleCollection -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'f3089b49-96d9-4315-84fe-75817e284201' -2026/02/10 17:43:57 [REQUEST] {"request_id":"98cd9025-fca7-48ab-984a-07094599c821","timestamp":"2026-02-10T17:43:57.76581042Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48426102,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.814272398Z","id":"98cd9025-fca7-48ab-984a-07094599c821","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48447031,"latency_human":"48.447031ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.814285913Z","id":"98cd9025-fca7-48ab-984a-07094599c821","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48471887,"latency_human":"48.471887ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"3e5a30dc-2c13-420d-8c3f-0d754508d2a9","timestamp":"2026-02-10T17:43:57.814556034Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"60","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test collection","name":"Test Collection"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2881465,"status_code":201,"response_size":288} -{"time":"2026-02-10T17:43:57.817468117Z","id":"3e5a30dc-2c13-420d-8c3f-0d754508d2a9","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2909678,"latency_human":"2.909678ms","bytes_in":60,"bytes_out":288} -{"time":"2026-02-10T17:43:57.817482714Z","id":"3e5a30dc-2c13-420d-8c3f-0d754508d2a9","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2920899,"latency_human":"2.920899ms","bytes_in":60,"bytes_out":288} -2026/02/10 17:43:57 [REQUEST] {"request_id":"4934f802-e8fb-443d-8a8a-2cdaa3da2563","timestamp":"2026-02-10T17:43:57.817718031Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3482020,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.821234414Z","id":"4934f802-e8fb-443d-8a8a-2cdaa3da2563","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3514941,"latency_human":"3.514941ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.821247408Z","id":"4934f802-e8fb-443d-8a8a-2cdaa3da2563","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3525931,"latency_human":"3.525931ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"7819e3c9-fe5d-4859-8523-e476e00a0cb7","timestamp":"2026-02-10T17:43:57.821434566Z","method":"POST","path":"/api/libraries/b70dcafc-81a8-420c-aa68-0aa5b7b3eef6/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2999234,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.824454789Z","id":"7819e3c9-fe5d-4859-8523-e476e00a0cb7","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/b70dcafc-81a8-420c-aa68-0aa5b7b3eef6/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3019372,"latency_human":"3.019372ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.82446047Z","id":"7819e3c9-fe5d-4859-8523-e476e00a0cb7","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/b70dcafc-81a8-420c-aa68-0aa5b7b3eef6/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3026515,"latency_human":"3.026515ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"59f0552a-25df-4c80-8119-197d3fb4e876","timestamp":"2026-02-10T17:43:57.824715944Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"b70dcafc-81a8-420c-aa68-0aa5b7b3eef6","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":5485657,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.830225054Z","id":"59f0552a-25df-4c80-8119-197d3fb4e876","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5508429,"latency_human":"5.508429ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.830230364Z","id":"59f0552a-25df-4c80-8119-197d3fb4e876","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":5514681,"latency_human":"5.514681ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"2a67a127-6c8b-4e26-9ce1-11cb3dd85dc1","timestamp":"2026-02-10T17:43:57.830474798Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2598531,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.833121929Z","id":"2a67a127-6c8b-4e26-9ce1-11cb3dd85dc1","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2645448,"latency_human":"2.645448ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.83313362Z","id":"2a67a127-6c8b-4e26-9ce1-11cb3dd85dc1","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2658583,"latency_human":"2.658583ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"cf49c4b6-fce2-4332-9e1c-7839708c4f1c","timestamp":"2026-02-10T17:43:57.833418559Z","method":"POST","path":"/api/libraries/20c5747f-e3e8-42af-9b25-0c27009fe9dc/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2714406,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.83615206Z","id":"cf49c4b6-fce2-4332-9e1c-7839708c4f1c","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/20c5747f-e3e8-42af-9b25-0c27009fe9dc/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2732880,"latency_human":"2.73288ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.836157991Z","id":"cf49c4b6-fce2-4332-9e1c-7839708c4f1c","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/20c5747f-e3e8-42af-9b25-0c27009fe9dc/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2740094,"latency_human":"2.740094ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"b44f5e15-8c6c-4437-8347-2c93f39f24e4","timestamp":"2026-02-10T17:43:57.836517719Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"20c5747f-e3e8-42af-9b25-0c27009fe9dc","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3107294,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.83963933Z","id":"b44f5e15-8c6c-4437-8347-2c93f39f24e4","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3120870,"latency_human":"3.12087ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.839645481Z","id":"b44f5e15-8c6c-4437-8347-2c93f39f24e4","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3128664,"latency_human":"3.128664ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"7bb36315-0806-4ec2-94c5-d27f911dc0dc","timestamp":"2026-02-10T17:43:57.839880908Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2440297,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.842337596Z","id":"7bb36315-0806-4ec2-94c5-d27f911dc0dc","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2456508,"latency_human":"2.456508ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.842343637Z","id":"7bb36315-0806-4ec2-94c5-d27f911dc0dc","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2463460,"latency_human":"2.46346ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"0bc8db77-e1e1-4ac9-a337-855390fc5971","timestamp":"2026-02-10T17:43:57.84245336Z","method":"POST","path":"/api/libraries/d1cc297f-3df4-44f3-be3b-6623af540072/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2040866,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.844504706Z","id":"0bc8db77-e1e1-4ac9-a337-855390fc5971","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/d1cc297f-3df4-44f3-be3b-6623af540072/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2050995,"latency_human":"2.050995ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.844508503Z","id":"0bc8db77-e1e1-4ac9-a337-855390fc5971","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/libraries/d1cc297f-3df4-44f3-be3b-6623af540072/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2055864,"latency_human":"2.055864ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"5f8773c4-344c-4cec-aeee-9609febe1bf1","timestamp":"2026-02-10T17:43:57.844674111Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"d1cc297f-3df4-44f3-be3b-6623af540072","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":4522680,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.849238118Z","id":"5f8773c4-344c-4cec-aeee-9609febe1bf1","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4562054,"latency_human":"4.562054ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.849251493Z","id":"5f8773c4-344c-4cec-aeee-9609febe1bf1","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":4577833,"latency_human":"4.577833ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"d0134137-0223-4255-bd54-2bfea8d35f50","timestamp":"2026-02-10T17:43:57.8496383Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijg4ZTc0MzMwLTA3ZTQtNDY5My1hZTc5LTI2NjdiMTMwNzI4NCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.q4APVlBBM7z5sCwgY9JuETUKM_cAiY5HnMlmxThQxfo","Content-Length":"203","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["66b5887c-9254-4d70-bbe7-986853df426f","c94be95e-660b-4df2-a73f-9f2b409661cd","a2716c75-7e51-4b8a-889e-8f082a6c328d"],"collection_id":"87592e4c-24d1-4cc6-a817-17831a6a3951"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":7340589,"status_code":200,"response_size":422} -{"time":"2026-02-10T17:43:57.857008173Z","id":"d0134137-0223-4255-bd54-2bfea8d35f50","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":7368850,"latency_human":"7.36885ms","bytes_in":203,"bytes_out":422} -{"time":"2026-02-10T17:43:57.85701741Z","id":"d0134137-0223-4255-bd54-2bfea8d35f50","remote_ip":"127.0.0.1","host":"127.0.0.1:44059","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":7379811,"latency_human":"7.379811ms","bytes_in":203,"bytes_out":422} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_MultipleCollections -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '87c86c80-41e2-4712-8288-ea2111947e2c' -2026/02/10 17:43:57 [REQUEST] {"request_id":"8ef8cfec-33e3-4ced-84aa-c013e33ec5e2","timestamp":"2026-02-10T17:43:57.878841299Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49156327,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:57.928033623Z","id":"8ef8cfec-33e3-4ced-84aa-c013e33ec5e2","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49177486,"latency_human":"49.177486ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:57.928047889Z","id":"8ef8cfec-33e3-4ced-84aa-c013e33ec5e2","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49203765,"latency_human":"49.203765ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:57 [REQUEST] {"request_id":"f3085d1c-88fe-4a6e-868c-cd011ddf282b","timestamp":"2026-02-10T17:43:57.928307561Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"66","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"First test collection","name":"Test Collection 1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2423546,"status_code":201,"response_size":294} -{"time":"2026-02-10T17:43:57.930755131Z","id":"f3085d1c-88fe-4a6e-868c-cd011ddf282b","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2446649,"latency_human":"2.446649ms","bytes_in":66,"bytes_out":294} -{"time":"2026-02-10T17:43:57.930760311Z","id":"f3085d1c-88fe-4a6e-868c-cd011ddf282b","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2453261,"latency_human":"2.453261ms","bytes_in":66,"bytes_out":294} -2026/02/10 17:43:57 [REQUEST] {"request_id":"515a4b66-49c7-496f-a413-81ae091755b7","timestamp":"2026-02-10T17:43:57.930895822Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"67","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"Second test collection","name":"Test Collection 2"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2744292,"status_code":201,"response_size":295} -{"time":"2026-02-10T17:43:57.933686941Z","id":"515a4b66-49c7-496f-a413-81ae091755b7","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2787251,"latency_human":"2.787251ms","bytes_in":67,"bytes_out":295} -{"time":"2026-02-10T17:43:57.933700756Z","id":"515a4b66-49c7-496f-a413-81ae091755b7","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2804293,"latency_human":"2.804293ms","bytes_in":67,"bytes_out":295} -2026/02/10 17:43:57 [REQUEST] {"request_id":"d3242de4-b235-4956-a48a-825ce7a487e4","timestamp":"2026-02-10T17:43:57.934022012Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3231976,"status_code":201,"response_size":317} -{"time":"2026-02-10T17:43:57.937291939Z","id":"d3242de4-b235-4956-a48a-825ce7a487e4","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3280496,"latency_human":"3.280496ms","bytes_in":86,"bytes_out":317} -{"time":"2026-02-10T17:43:57.937304111Z","id":"d3242de4-b235-4956-a48a-825ce7a487e4","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3295323,"latency_human":"3.295323ms","bytes_in":86,"bytes_out":317} -2026/02/10 17:43:57 [REQUEST] {"request_id":"35134612-9b85-48f3-b8c6-ebe3967627fe","timestamp":"2026-02-10T17:43:57.937568923Z","method":"POST","path":"/api/libraries/0d22da54-8ede-4c35-8bb7-38024261e99e/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3150124,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.940743602Z","id":"35134612-9b85-48f3-b8c6-ebe3967627fe","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries/0d22da54-8ede-4c35-8bb7-38024261e99e/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3174028,"latency_human":"3.174028ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.940752629Z","id":"35134612-9b85-48f3-b8c6-ebe3967627fe","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries/0d22da54-8ede-4c35-8bb7-38024261e99e/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3184508,"latency_human":"3.184508ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"512b16bf-3d0a-4f44-9f14-287d0d47f215","timestamp":"2026-02-10T17:43:57.941157069Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"0d22da54-8ede-4c35-8bb7-38024261e99e","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":6075723,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.947288896Z","id":"512b16bf-3d0a-4f44-9f14-287d0d47f215","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6129943,"latency_human":"6.129943ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.947298083Z","id":"512b16bf-3d0a-4f44-9f14-287d0d47f215","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6140913,"latency_human":"6.140913ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"f4f2f424-a0f8-4973-82c0-2c499632dbc2","timestamp":"2026-02-10T17:43:57.947558285Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2695732,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:57.950273142Z","id":"f4f2f424-a0f8-4973-82c0-2c499632dbc2","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2714125,"latency_human":"2.714125ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:57.950278813Z","id":"f4f2f424-a0f8-4973-82c0-2c499632dbc2","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2720618,"latency_human":"2.720618ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:57 [REQUEST] {"request_id":"7b212c65-6a3e-4821-9178-c57353b3ba94","timestamp":"2026-02-10T17:43:57.950454468Z","method":"POST","path":"/api/libraries/9d765c0f-802e-440e-abb6-36d84730941e/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2365780,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:57.952836548Z","id":"7b212c65-6a3e-4821-9178-c57353b3ba94","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries/9d765c0f-802e-440e-abb6-36d84730941e/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2381478,"latency_human":"2.381478ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:57.952840275Z","id":"7b212c65-6a3e-4821-9178-c57353b3ba94","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/libraries/9d765c0f-802e-440e-abb6-36d84730941e/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2386037,"latency_human":"2.386037ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:57 [REQUEST] {"request_id":"620d31ad-9d57-46a2-b624-d55c9b14df7d","timestamp":"2026-02-10T17:43:57.953081001Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"9d765c0f-802e-440e-abb6-36d84730941e","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3305262,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:57.956412552Z","id":"620d31ad-9d57-46a2-b624-d55c9b14df7d","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3331280,"latency_human":"3.33128ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:57.956418733Z","id":"620d31ad-9d57-46a2-b624-d55c9b14df7d","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3338273,"latency_human":"3.338273ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:57 [REQUEST] {"request_id":"0c9c9458-afd1-49f2-96d7-dbaf42848125","timestamp":"2026-02-10T17:43:57.956618103Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzcsImlhdCI6MTc3MDc0NTQzNywidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjRkZmZhYWY4LTQzYTMtNDQ5MC1iODlkLTE1MjJjMjMxOWE1NyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Fyd0drVAGNJF55qqwSCT-TeiCfaimG0p5dy75eCAKKY","Content-Length":"273","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["c59f405e-3ee7-4fe5-9988-41f53a0f4fbb"],"collection_id":"458564ce-ebe8-411b-a1c1-c6bf4dbc0bb8"},{"book_ids":["c59f405e-3ee7-4fe5-9988-41f53a0f4fbb","782b8f79-5a7c-492e-b559-c20e7a3912f1"],"collection_id":"e9b7086a-a662-45bd-90ce-ba00f6effd50"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":7095584,"status_code":200,"response_size":422} -{"time":"2026-02-10T17:43:57.963737191Z","id":"0c9c9458-afd1-49f2-96d7-dbaf42848125","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":7118536,"latency_human":"7.118536ms","bytes_in":273,"bytes_out":422} -{"time":"2026-02-10T17:43:57.963743272Z","id":"0c9c9458-afd1-49f2-96d7-dbaf42848125","remote_ip":"127.0.0.1","host":"127.0.0.1:42759","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":7125479,"latency_human":"7.125479ms","bytes_in":273,"bytes_out":422} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_DuplicateBooks -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:57 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '9760cd43-564f-4526-ae12-f8f2826384c3' -2026/02/10 17:43:58 [REQUEST] {"request_id":"295bd816-d6f3-40c2-b97e-55d869fda973","timestamp":"2026-02-10T17:43:57.986031051Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":52864347,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.038918811Z","id":"295bd816-d6f3-40c2-b97e-55d869fda973","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52884924,"latency_human":"52.884924ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.038930553Z","id":"295bd816-d6f3-40c2-b97e-55d869fda973","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52896916,"latency_human":"52.896916ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"02be5ab8-2ada-4e73-9a5a-46c86a2a966d","timestamp":"2026-02-10T17:43:58.039135483Z","method":"POST","path":"/api/collections","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"60","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test collection","name":"Test Collection"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2360810,"status_code":201,"response_size":288} -{"time":"2026-02-10T17:43:58.041519085Z","id":"02be5ab8-2ada-4e73-9a5a-46c86a2a966d","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2382360,"latency_human":"2.38236ms","bytes_in":60,"bytes_out":288} -{"time":"2026-02-10T17:43:58.041526148Z","id":"02be5ab8-2ada-4e73-9a5a-46c86a2a966d","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":2390615,"latency_human":"2.390615ms","bytes_in":60,"bytes_out":288} -2026/02/10 17:43:58 [REQUEST] {"request_id":"a1571098-3ce8-4ea8-9917-5a1afe3903fe","timestamp":"2026-02-10T17:43:58.041642855Z","method":"POST","path":"/api/libraries","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"86","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"description":"A test library for media items","name":"Test Library","type":"ebooks"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3115930,"status_code":201,"response_size":319} -{"time":"2026-02-10T17:43:58.044794031Z","id":"a1571098-3ce8-4ea8-9917-5a1afe3903fe","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3149313,"latency_human":"3.149313ms","bytes_in":86,"bytes_out":319} -{"time":"2026-02-10T17:43:58.044803398Z","id":"a1571098-3ce8-4ea8-9917-5a1afe3903fe","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/libraries","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3160172,"latency_human":"3.160172ms","bytes_in":86,"bytes_out":319} -2026/02/10 17:43:58 [REQUEST] {"request_id":"e449b235-45ac-4e6c-9115-4e7a0e32f867","timestamp":"2026-02-10T17:43:58.044953096Z","method":"POST","path":"/api/libraries/39024e18-f67e-42cc-8a07-c6a852106595/folders","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"30","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"folder_path":"/app/uploads"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":3120910,"status_code":201,"response_size":170} -{"time":"2026-02-10T17:43:58.048099814Z","id":"e449b235-45ac-4e6c-9115-4e7a0e32f867","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/libraries/39024e18-f67e-42cc-8a07-c6a852106595/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3145496,"latency_human":"3.145496ms","bytes_in":30,"bytes_out":170} -{"time":"2026-02-10T17:43:58.048106907Z","id":"e449b235-45ac-4e6c-9115-4e7a0e32f867","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/libraries/39024e18-f67e-42cc-8a07-c6a852106595/folders","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":3154272,"latency_human":"3.154272ms","bytes_in":30,"bytes_out":170} -2026/02/10 17:43:58 [REQUEST] {"request_id":"dd7b66b8-e6b1-489e-ad7b-e6b6d563954d","timestamp":"2026-02-10T17:43:58.04846981Z","method":"POST","path":"/api/media-items","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"183","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"author":"Test Author","file_path":"/tmp/test.epub","file_size":1024,"library_id":"39024e18-f67e-42cc-8a07-c6a852106595","mime_type":"application/epub+zip","title":"Test Media Item"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":6348258,"status_code":201,"response_size":1045} -{"time":"2026-02-10T17:43:58.054839568Z","id":"dd7b66b8-e6b1-489e-ad7b-e6b6d563954d","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6369186,"latency_human":"6.369186ms","bytes_in":183,"bytes_out":1045} -{"time":"2026-02-10T17:43:58.054845298Z","id":"dd7b66b8-e6b1-489e-ad7b-e6b6d563954d","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/media-items","user_agent":"Go-http-client/1.1","status":201,"error":"","latency":6376469,"latency_human":"6.376469ms","bytes_in":183,"bytes_out":1045} -2026/02/10 17:43:58 [REQUEST] {"request_id":"51c952c8-a6e8-4c49-b742-6c24e5f17d8b","timestamp":"2026-02-10T17:43:58.055060948Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"125","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["e0d86d83-da50-493a-b67c-6f170b16340f"],"collection_id":"4d49424e-6fdd-486e-9336-8c2411dffc41"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2865196,"status_code":200,"response_size":172} -{"time":"2026-02-10T17:43:58.05795092Z","id":"51c952c8-a6e8-4c49-b742-6c24e5f17d8b","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2888800,"latency_human":"2.8888ms","bytes_in":125,"bytes_out":172} -{"time":"2026-02-10T17:43:58.057959616Z","id":"51c952c8-a6e8-4c49-b742-6c24e5f17d8b","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2898708,"latency_human":"2.898708ms","bytes_in":125,"bytes_out":172} -2026/02/10 17:43:58 [REQUEST] {"request_id":"5ade409c-589d-4e32-ba20-96ace8772eeb","timestamp":"2026-02-10T17:43:58.058229587Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY4YjE3YjI3LTM2M2YtNGNmNi1iZDE1LWMyNzFmMDcyMjRkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.vKkZWe3i-jm_Mm-Zv4izJ8HYhBq8T2LuU8cO-j6B8lU","Content-Length":"125","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"operations":[{"book_ids":["e0d86d83-da50-493a-b67c-6f170b16340f"],"collection_id":"4d49424e-6fdd-486e-9336-8c2411dffc41"}]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":198138,"status_code":200,"response_size":202} -{"time":"2026-02-10T17:43:58.058438755Z","id":"5ade409c-589d-4e32-ba20-96ace8772eeb","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":209479,"latency_human":"209.479µs","bytes_in":125,"bytes_out":202} -{"time":"2026-02-10T17:43:58.058441089Z","id":"5ade409c-589d-4e32-ba20-96ace8772eeb","remote_ip":"127.0.0.1","host":"127.0.0.1:44135","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":212404,"latency_human":"212.404µs","bytes_in":125,"bytes_out":202} -=== RUN TestCollectionsBulkOperations/BulkAddBooks_InvalidRequestBody -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '484d5590-e429-4ec7-94b4-9bd4e30d480e' -2026/02/10 17:43:58 [REQUEST] {"request_id":"10489e37-3455-4679-ad82-6b4580f08b13","timestamp":"2026-02-10T17:43:58.080522455Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49931875,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.130477444Z","id":"10489e37-3455-4679-ad82-6b4580f08b13","remote_ip":"127.0.0.1","host":"127.0.0.1:32875","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49952494,"latency_human":"49.952494ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.130489997Z","id":"10489e37-3455-4679-ad82-6b4580f08b13","remote_ip":"127.0.0.1","host":"127.0.0.1:32875","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49964797,"latency_human":"49.964797ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"9b22da24-4658-4ea0-a426-04f07f4a22b5","timestamp":"2026-02-10T17:43:58.130792438Z","method":"POST","path":"/api/collections/bulk-add-books","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjllYTkzZDNlLTgyOWQtNDgzOC1hYWVhLWJmZWQyZTIyZWRmYyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.m-fyfTQBDZREuT_8_bdmAJIQLZgifEHTsZbcQD7PzDs","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":75100,"status_code":400,"response_size":28} -{"time":"2026-02-10T17:43:58.130900779Z","id":"9b22da24-4658-4ea0-a426-04f07f4a22b5","remote_ip":"127.0.0.1","host":"127.0.0.1:32875","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":108381,"latency_human":"108.381µs","bytes_in":12,"bytes_out":28} -{"time":"2026-02-10T17:43:58.130910337Z","id":"9b22da24-4658-4ea0-a426-04f07f4a22b5","remote_ip":"127.0.0.1","host":"127.0.0.1:32875","method":"POST","uri":"/api/collections/bulk-add-books","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":118980,"latency_human":"118.98µs","bytes_in":12,"bytes_out":28} ---- PASS: TestCollectionsBulkOperations (0.71s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_WithoutAuth (0.00s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_EmptyOperations (0.07s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_InvalidCollectionID (0.08s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_InvalidBookID (0.07s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_SingleOperation (0.09s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_MultipleBooksSingleCollection (0.11s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_MultipleCollections (0.11s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_DuplicateBooks (0.09s) - --- PASS: TestCollectionsBulkOperations/BulkAddBooks_InvalidRequestBody (0.07s) -=== RUN TestConflictDetection_TriggeringConditions -=== RUN TestConflictDetection_TriggeringConditions/conflict_detected_when_different_devices_sync_within_5_minutes -=== RUN TestConflictDetection_TriggeringConditions/no_conflict_when_progress_difference_is_less_than_1% -=== RUN TestConflictDetection_TriggeringConditions/no_conflict_when_sync_timestamps_are_more_than_5_minutes_apart ---- PASS: TestConflictDetection_TriggeringConditions (0.00s) - --- PASS: TestConflictDetection_TriggeringConditions/conflict_detected_when_different_devices_sync_within_5_minutes (0.00s) - --- PASS: TestConflictDetection_TriggeringConditions/no_conflict_when_progress_difference_is_less_than_1% (0.00s) - --- PASS: TestConflictDetection_TriggeringConditions/no_conflict_when_sync_timestamps_are_more_than_5_minutes_apart (0.00s) -=== RUN TestConflictResolution_ChoosingWinner -=== RUN TestConflictResolution_ChoosingWinner/resolve_conflict_by_choosing_koreader_source -=== RUN TestConflictResolution_ChoosingWinner/resolve_conflict_with_manual_merge_data -=== RUN TestConflictResolution_ChoosingWinner/error_when_winner_is_manual_but_no_manual_data_provided ---- PASS: TestConflictResolution_ChoosingWinner (0.00s) - --- PASS: TestConflictResolution_ChoosingWinner/resolve_conflict_by_choosing_koreader_source (0.00s) - --- PASS: TestConflictResolution_ChoosingWinner/resolve_conflict_with_manual_merge_data (0.00s) - --- PASS: TestConflictResolution_ChoosingWinner/error_when_winner_is_manual_but_no_manual_data_provided (0.00s) -=== RUN TestConflictListing_Filtering -=== RUN TestConflictListing_Filtering/list_only_unresolved_conflicts -=== RUN TestConflictListing_Filtering/list_all_conflicts_regardless_of_status -=== RUN TestConflictListing_Filtering/list_only_resolved_conflicts ---- PASS: TestConflictListing_Filtering (0.00s) - --- PASS: TestConflictListing_Filtering/list_only_unresolved_conflicts (0.00s) - --- PASS: TestConflictListing_Filtering/list_all_conflicts_regardless_of_status (0.00s) - --- PASS: TestConflictListing_Filtering/list_only_resolved_conflicts (0.00s) -=== RUN TestConflictResponse_Structure -=== RUN TestConflictResponse_Structure/conflict_detail_response_includes_all_required_fields -=== RUN TestConflictResponse_Structure/conflict_list_response_includes_summary_counts ---- PASS: TestConflictResponse_Structure (0.00s) - --- PASS: TestConflictResponse_Structure/conflict_detail_response_includes_all_required_fields (0.00s) - --- PASS: TestConflictResponse_Structure/conflict_list_response_includes_summary_counts (0.00s) -=== RUN TestConflictDeletion -=== RUN TestConflictDeletion/delete_single_conflict_by_ID -=== RUN TestConflictDeletion/dismiss_all_resolved_conflicts ---- PASS: TestConflictDeletion (0.00s) - --- PASS: TestConflictDeletion/delete_single_conflict_by_ID (0.00s) - --- PASS: TestConflictDeletion/dismiss_all_resolved_conflicts (0.00s) -=== RUN TestConflictNotification_WebSocketBroadcast -=== RUN TestConflictNotification_WebSocketBroadcast/conflict_detection_notification -=== RUN TestConflictNotification_WebSocketBroadcast/conflict_resolved_notification ---- PASS: TestConflictNotification_WebSocketBroadcast (0.00s) - --- PASS: TestConflictNotification_WebSocketBroadcast/conflict_detection_notification (0.00s) - --- PASS: TestConflictNotification_WebSocketBroadcast/conflict_resolved_notification (0.00s) -=== RUN TestConflictsBulkOperations -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_WithoutAuth -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 [REQUEST] {"request_id":"954d7a08-5f77-4373-ba04-e38bdb63de4b","timestamp":"2026-02-10T17:43:58.133126819Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Content-Length":"82","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["107f024d-7458-4bca-a4fa-bf8829854fe0"],"strategy":"most_recent"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":12854,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:58.133186009Z","id":"954d7a08-5f77-4373-ba04-e38bdb63de4b","remote_ip":"127.0.0.1","host":"127.0.0.1:33393","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":69339,"latency_human":"69.339µs","bytes_in":82,"bytes_out":39} -{"time":"2026-02-10T17:43:58.133194254Z","id":"954d7a08-5f77-4373-ba04-e38bdb63de4b","remote_ip":"127.0.0.1","host":"127.0.0.1:33393","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":81842,"latency_human":"81.842µs","bytes_in":82,"bytes_out":39} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_EmptyConflictIDs -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '3de24b76-ed22-45b3-ba70-9d51a2578671' -2026/02/10 17:43:58 [REQUEST] {"request_id":"d4b3cebe-f32d-46c4-b9f8-1e9c38b56b21","timestamp":"2026-02-10T17:43:58.153729552Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49229543,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.202986115Z","id":"d4b3cebe-f32d-46c4-b9f8-1e9c38b56b21","remote_ip":"127.0.0.1","host":"127.0.0.1:39295","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49249970,"latency_human":"49.24997ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.20299432Z","id":"d4b3cebe-f32d-46c4-b9f8-1e9c38b56b21","remote_ip":"127.0.0.1","host":"127.0.0.1:39295","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49264848,"latency_human":"49.264848ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"d0eb8a43-4a68-436a-80da-3fe030f44f87","timestamp":"2026-02-10T17:43:58.203212836Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjBhNTk5ZjA0LTJiZmYtNDQ1OC05ODg5LTk2OGY1NTFjZThkZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0._ug56nIOftZ-QIJV2dzcmrKFpOdNxN97YdcLh12Ol30","Content-Length":"44","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":[],"strategy":"most_recent"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51335,"status_code":200,"response_size":0,"error":"code=400, message=conflict_ids required"} -{"time":"2026-02-10T17:43:58.203283366Z","id":"d0eb8a43-4a68-436a-80da-3fe030f44f87","remote_ip":"127.0.0.1","host":"127.0.0.1:39295","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=conflict_ids required","latency":70301,"latency_human":"70.301µs","bytes_in":44,"bytes_out":36} -{"time":"2026-02-10T17:43:58.203286582Z","id":"d0eb8a43-4a68-436a-80da-3fe030f44f87","remote_ip":"127.0.0.1","host":"127.0.0.1:39295","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":74158,"latency_human":"74.158µs","bytes_in":44,"bytes_out":36} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_InvalidConflictID -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '25d5d91b-bcea-4b17-8772-08bbcb962efe' -2026/02/10 17:43:58 [REQUEST] {"request_id":"aa8619d3-21b3-47c0-81b7-5a3841020862","timestamp":"2026-02-10T17:43:58.223701056Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":53899356,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.277626691Z","id":"aa8619d3-21b3-47c0-81b7-5a3841020862","remote_ip":"127.0.0.1","host":"127.0.0.1:45251","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53921357,"latency_human":"53.921357ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.277635648Z","id":"aa8619d3-21b3-47c0-81b7-5a3841020862","remote_ip":"127.0.0.1","host":"127.0.0.1:45251","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53934441,"latency_human":"53.934441ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"41a34db1-8916-4468-8f92-322020e5a165","timestamp":"2026-02-10T17:43:58.277895189Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjkzZGQzNTg2LTBlZGMtNGE3ZC1hNmY1LWRmNjk0YWRhYzhjZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.jwCkYjVgmePOmCPi2G_4WoIKleHckoikBLdDsMPS_TI","Content-Length":"58","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["invalid-uuid"],"strategy":"most_recent"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":139529,"status_code":200,"response_size":125} -{"time":"2026-02-10T17:43:58.278061077Z","id":"41a34db1-8916-4468-8f92-322020e5a165","remote_ip":"127.0.0.1","host":"127.0.0.1:45251","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":165647,"latency_human":"165.647µs","bytes_in":58,"bytes_out":125} -{"time":"2026-02-10T17:43:58.278068931Z","id":"41a34db1-8916-4468-8f92-322020e5a165","remote_ip":"127.0.0.1","host":"127.0.0.1:45251","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":174924,"latency_human":"174.924µs","bytes_in":58,"bytes_out":125} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_InvalidStrategy -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'a183561d-d6da-45a9-9fc8-ecd1a2874070' -2026/02/10 17:43:58 [REQUEST] {"request_id":"6a6c7e2e-fbc5-4776-bfc3-082c794cd636","timestamp":"2026-02-10T17:43:58.298531955Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":53234643,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.351792045Z","id":"6a6c7e2e-fbc5-4776-bfc3-082c794cd636","remote_ip":"127.0.0.1","host":"127.0.0.1:33469","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53257095,"latency_human":"53.257095ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.351835897Z","id":"6a6c7e2e-fbc5-4776-bfc3-082c794cd636","remote_ip":"127.0.0.1","host":"127.0.0.1:33469","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":53303020,"latency_human":"53.30302ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"70a0cd3d-9e41-4e5f-b69a-80a8590dbf04","timestamp":"2026-02-10T17:43:58.352095398Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjcwNTZlOWE0LTFiZWUtNGI2NC1iNTBmLWUzNjE5ZTFhNDkwNCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.Z3wVSHjEBmgvwRWWgmlCftUhn4cFRy-VkO7WxmLZ3fs","Content-Length":"87","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["c525a753-d9ae-41e7-8b8c-fab44c2bb707"],"strategy":"invalid_strategy"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":464923,"status_code":200,"response_size":148} -{"time":"2026-02-10T17:43:58.352585908Z","id":"70a0cd3d-9e41-4e5f-b69a-80a8590dbf04","remote_ip":"127.0.0.1","host":"127.0.0.1:33469","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":489889,"latency_human":"489.889µs","bytes_in":87,"bytes_out":148} -{"time":"2026-02-10T17:43:58.352593071Z","id":"70a0cd3d-9e41-4e5f-b69a-80a8590dbf04","remote_ip":"127.0.0.1","host":"127.0.0.1:33469","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":498265,"latency_human":"498.265µs","bytes_in":87,"bytes_out":148} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_MostRecentStrategy -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'd0342545-d5bf-4804-93e1-76f72ad4b7f2' -2026/02/10 17:43:58 [REQUEST] {"request_id":"a8e45589-201b-4dae-9fee-08531166c7e5","timestamp":"2026-02-10T17:43:58.373162873Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50775721,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.423978719Z","id":"a8e45589-201b-4dae-9fee-08531166c7e5","remote_ip":"127.0.0.1","host":"127.0.0.1:42609","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50808822,"latency_human":"50.808822ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.423992044Z","id":"a8e45589-201b-4dae-9fee-08531166c7e5","remote_ip":"127.0.0.1","host":"127.0.0.1:42609","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50827347,"latency_human":"50.827347ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"3cf54965-b75d-4178-84be-eaa16d42358f","timestamp":"2026-02-10T17:43:58.424379042Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImRjMDI1OWFmLTY2MTctNGQ4OS1iNjcwLWZmYzNkYjNjYWE5ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.TmkQiiJKJJ92NLhauDO88ufdZMDj_waI1SLAqzvDhZA","Content-Length":"121","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["22282ff7-d9ca-4e6e-8990-11cdb5e482c4","9da48e6d-9d6a-47f4-994f-97fc9b67e6c6"],"strategy":"most_recent"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":494868,"status_code":200,"response_size":249} -{"time":"2026-02-10T17:43:58.424896311Z","id":"3cf54965-b75d-4178-84be-eaa16d42358f","remote_ip":"127.0.0.1","host":"127.0.0.1:42609","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":517570,"latency_human":"517.57µs","bytes_in":121,"bytes_out":249} -{"time":"2026-02-10T17:43:58.424902893Z","id":"3cf54965-b75d-4178-84be-eaa16d42358f","remote_ip":"127.0.0.1","host":"127.0.0.1:42609","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":525535,"latency_human":"525.535µs","bytes_in":121,"bytes_out":249} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_HighestProgressStrategy -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '80617763-dda1-453f-b232-785eddc1d447' -2026/02/10 17:43:58 [REQUEST] {"request_id":"141ecaea-fc1a-45b1-ba10-7c4f17be831b","timestamp":"2026-02-10T17:43:58.44412783Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50400085,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.494553271Z","id":"141ecaea-fc1a-45b1-ba10-7c4f17be831b","remote_ip":"127.0.0.1","host":"127.0.0.1:37539","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50422366,"latency_human":"50.422366ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.494563581Z","id":"141ecaea-fc1a-45b1-ba10-7c4f17be831b","remote_ip":"127.0.0.1","host":"127.0.0.1:37539","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50435991,"latency_human":"50.435991ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"8c785ec9-206a-4cc8-8197-0d3956092352","timestamp":"2026-02-10T17:43:58.494802384Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM5YmI1MjVlLTIxNGYtNGY3NC05MzQ1LWY4OTljOGRmYmNlOCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.9tXBPo3MxHOfFDU3v32m43CEaAaiv3F4EhUzNOC85kA","Content-Length":"126","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["6a9b8c45-a89e-49a3-8cbe-ac819c613c25","353d7c5f-354b-42f9-bdb7-d52a97fcefb7"],"strategy":"highest_progress"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":446398,"status_code":200,"response_size":249} -{"time":"2026-02-10T17:43:58.495268378Z","id":"8c785ec9-206a-4cc8-8197-0d3956092352","remote_ip":"127.0.0.1","host":"127.0.0.1:37539","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":464822,"latency_human":"464.822µs","bytes_in":126,"bytes_out":249} -{"time":"2026-02-10T17:43:58.495275441Z","id":"8c785ec9-206a-4cc8-8197-0d3956092352","remote_ip":"127.0.0.1","host":"127.0.0.1:37539","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":473659,"latency_human":"473.659µs","bytes_in":126,"bytes_out":249} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_ManualStrategy_WithoutWinner -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'e7204376-e4e8-4472-bd6d-79d633a95a85' -2026/02/10 17:43:58 [REQUEST] {"request_id":"2caa176f-82f0-4e66-a6fd-d7419e0f2317","timestamp":"2026-02-10T17:43:58.514483367Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48859836,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.563361527Z","id":"2caa176f-82f0-4e66-a6fd-d7419e0f2317","remote_ip":"127.0.0.1","host":"127.0.0.1:41641","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48875586,"latency_human":"48.875586ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.563388106Z","id":"2caa176f-82f0-4e66-a6fd-d7419e0f2317","remote_ip":"127.0.0.1","host":"127.0.0.1:41641","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48884423,"latency_human":"48.884423ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"ad365d8c-38e4-4790-a35b-1a15ab9d9aca","timestamp":"2026-02-10T17:43:58.563692862Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM2NjE2ZjIwLTRlNzQtNDczYS1hZDlhLWM0NDQwMjg1YjU4MCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.ejvkNTRzMZc4wfqNLzZtGMIPA7zHhSaS0_zxK9IMruo","Content-Length":"77","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["89512544-6471-4c00-a259-d0880a133e89"],"strategy":"manual"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":534491,"status_code":200,"response_size":148} -{"time":"2026-02-10T17:43:58.564265434Z","id":"ad365d8c-38e4-4790-a35b-1a15ab9d9aca","remote_ip":"127.0.0.1","host":"127.0.0.1:41641","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":571981,"latency_human":"571.981µs","bytes_in":77,"bytes_out":148} -{"time":"2026-02-10T17:43:58.564273569Z","id":"ad365d8c-38e4-4790-a35b-1a15ab9d9aca","remote_ip":"127.0.0.1","host":"127.0.0.1:41641","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":582300,"latency_human":"582.3µs","bytes_in":77,"bytes_out":148} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_ManualStrategy_WithWinner -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '47a6fd79-3195-41fc-bd76-60bb366bf5d3' -2026/02/10 17:43:58 [REQUEST] {"request_id":"a97c8219-b29f-4a4e-bdbf-4c4453165870","timestamp":"2026-02-10T17:43:58.587259804Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50034837,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.637327812Z","id":"a97c8219-b29f-4a4e-bdbf-4c4453165870","remote_ip":"127.0.0.1","host":"127.0.0.1:35739","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50064152,"latency_human":"50.064152ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.637340255Z","id":"a97c8219-b29f-4a4e-bdbf-4c4453165870","remote_ip":"127.0.0.1","host":"127.0.0.1:35739","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50079950,"latency_human":"50.07995ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"9eb8e268-5939-4af8-a615-2baed271c402","timestamp":"2026-02-10T17:43:58.637647535Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImJlNWYwNWIzLThhYTQtNDAyMi05NTk5LTExNWMzNWVkOWVlYyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.jcqrtUtjIYHyH4OUy0AfxWrsQjJJFOxqogQplH-Ozos","Content-Length":"103","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["93459caf-55a2-4ab9-a916-9acc37b875f8"],"strategy":"manual","winning_source":"device"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":350349,"status_code":200,"response_size":148} -{"time":"2026-02-10T17:43:58.638019005Z","id":"9eb8e268-5939-4af8-a615-2baed271c402","remote_ip":"127.0.0.1","host":"127.0.0.1:35739","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":370447,"latency_human":"370.447µs","bytes_in":103,"bytes_out":148} -{"time":"2026-02-10T17:43:58.638025587Z","id":"9eb8e268-5939-4af8-a615-2baed271c402","remote_ip":"127.0.0.1","host":"127.0.0.1:35739","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":378673,"latency_human":"378.673µs","bytes_in":103,"bytes_out":148} -=== RUN TestConflictsBulkOperations/BulkResolveConflicts_InvalidRequestBody -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '482698c4-1774-46e5-93f1-31741c68b792' -2026/02/10 17:43:58 [REQUEST] {"request_id":"f98db594-421b-4a11-873d-7fa5bba0797e","timestamp":"2026-02-10T17:43:58.656422998Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49278884,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.705727891Z","id":"f98db594-421b-4a11-873d-7fa5bba0797e","remote_ip":"127.0.0.1","host":"127.0.0.1:45699","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49300854,"latency_human":"49.300854ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.705737098Z","id":"f98db594-421b-4a11-873d-7fa5bba0797e","remote_ip":"127.0.0.1","host":"127.0.0.1:45699","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49313829,"latency_human":"49.313829ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"8764e779-f106-4cfd-881c-e258981e8ac9","timestamp":"2026-02-10T17:43:58.705926539Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjZmYWM1ZDEzLThjNzEtNDQ5ZS1iMTlhLWUwNTk5MDA2OTI2MSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.fLAoYLAcc_EVEF0uEXF57R-rgZJHfxNotXtQ6hkH-So","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":44693,"status_code":200,"response_size":0,"error":"code=400, message=invalid request body"} -{"time":"2026-02-10T17:43:58.705992602Z","id":"8764e779-f106-4cfd-881c-e258981e8ac9","remote_ip":"127.0.0.1","host":"127.0.0.1:45699","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=invalid request body","latency":65721,"latency_human":"65.721µs","bytes_in":12,"bytes_out":35} -{"time":"2026-02-10T17:43:58.705998753Z","id":"8764e779-f106-4cfd-881c-e258981e8ac9","remote_ip":"127.0.0.1","host":"127.0.0.1:45699","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":72855,"latency_human":"72.855µs","bytes_in":12,"bytes_out":35} ---- PASS: TestConflictsBulkOperations (0.57s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_WithoutAuth (0.00s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_EmptyConflictIDs (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_InvalidConflictID (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_InvalidStrategy (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_MostRecentStrategy (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_HighestProgressStrategy (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_ManualStrategy_WithoutWinner (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_ManualStrategy_WithWinner (0.07s) - --- PASS: TestConflictsBulkOperations/BulkResolveConflicts_InvalidRequestBody (0.07s) -=== RUN TestConflictsBulkDismiss -=== RUN TestConflictsBulkDismiss/BulkDismissConflicts_WithoutAuth -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 [REQUEST] {"request_id":"55ae6b08-1be0-49d7-a83c-188b2246498a","timestamp":"2026-02-10T17:43:58.71436798Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Content-Length":"57","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["c5b50c44-a2b6-4524-94fd-44358c23dc1b"]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":29886,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:58.714439463Z","id":"55ae6b08-1be0-49d7-a83c-188b2246498a","remote_ip":"127.0.0.1","host":"127.0.0.1:39983","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":69178,"latency_human":"69.178µs","bytes_in":57,"bytes_out":39} -{"time":"2026-02-10T17:43:58.714449511Z","id":"55ae6b08-1be0-49d7-a83c-188b2246498a","remote_ip":"127.0.0.1","host":"127.0.0.1:39983","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":81871,"latency_human":"81.871µs","bytes_in":57,"bytes_out":39} -=== RUN TestConflictsBulkDismiss/BulkDismissConflicts_EmptyConflictIDs -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '80d7ff22-cc08-4064-bea3-ef41298a2985' -2026/02/10 17:43:58 [REQUEST] {"request_id":"f51c1878-ff6b-4b5f-a744-61f835f87fa6","timestamp":"2026-02-10T17:43:58.735801374Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50240799,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.786065847Z","id":"f51c1878-ff6b-4b5f-a744-61f835f87fa6","remote_ip":"127.0.0.1","host":"127.0.0.1:35049","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50261097,"latency_human":"50.261097ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.786075735Z","id":"f51c1878-ff6b-4b5f-a744-61f835f87fa6","remote_ip":"127.0.0.1","host":"127.0.0.1:35049","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50274501,"latency_human":"50.274501ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"eea6ad82-521e-4524-9964-536c287051d2","timestamp":"2026-02-10T17:43:58.786293179Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImIwYzg1OWYxLTg2ZmUtNGIzMi1iNWNkLWM3OGExMTY4NTQ4ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.XagIqEyyIvJVmTuMffIKkQv6CgeV8DmX-oU_2VimCm8","Content-Length":"19","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":[]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":65551,"status_code":200,"response_size":0,"error":"code=400, message=conflict_ids required"} -{"time":"2026-02-10T17:43:58.7863857Z","id":"eea6ad82-521e-4524-9964-536c287051d2","remote_ip":"127.0.0.1","host":"127.0.0.1:35049","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=conflict_ids required","latency":92010,"latency_human":"92.01µs","bytes_in":19,"bytes_out":36} -{"time":"2026-02-10T17:43:58.786393605Z","id":"eea6ad82-521e-4524-9964-536c287051d2","remote_ip":"127.0.0.1","host":"127.0.0.1:35049","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":101278,"latency_human":"101.278µs","bytes_in":19,"bytes_out":36} -=== RUN TestConflictsBulkDismiss/BulkDismissConflicts_InvalidConflictID -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '1ccd9226-5ce7-4706-8259-cf86da653d38' -2026/02/10 17:43:58 [REQUEST] {"request_id":"af65e075-3d63-48c3-acdd-64b40b42e513","timestamp":"2026-02-10T17:43:58.805956348Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51760408,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.857743987Z","id":"af65e075-3d63-48c3-acdd-64b40b42e513","remote_ip":"127.0.0.1","host":"127.0.0.1:35787","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51784453,"latency_human":"51.784453ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.857753805Z","id":"af65e075-3d63-48c3-acdd-64b40b42e513","remote_ip":"127.0.0.1","host":"127.0.0.1:35787","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51796835,"latency_human":"51.796835ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"15dc1720-9d09-477c-a3cc-a6159c2f2aae","timestamp":"2026-02-10T17:43:58.858021211Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImY0NDYxOTIwLTcxZDAtNDFmMy1iYmIxLWEwYjY3NTA0Njg5YyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.AYQ3WEB8zMRWz3BmPavyREovoobELNl1f9kjCi5A554","Content-Length":"72","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["invalid-uuid","f7390646-f749-4913-8c0e-73e04a844967"]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":321016,"status_code":200,"response_size":226} -{"time":"2026-02-10T17:43:58.858366011Z","id":"15dc1720-9d09-477c-a3cc-a6159c2f2aae","remote_ip":"127.0.0.1","host":"127.0.0.1:35787","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":343397,"latency_human":"343.397µs","bytes_in":72,"bytes_out":226} -{"time":"2026-02-10T17:43:58.858375779Z","id":"15dc1720-9d09-477c-a3cc-a6159c2f2aae","remote_ip":"127.0.0.1","host":"127.0.0.1:35787","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":354858,"latency_human":"354.858µs","bytes_in":72,"bytes_out":226} -=== RUN TestConflictsBulkDismiss/BulkDismissConflicts_MultipleConflicts -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '32403988-9ef7-4dc7-97b5-b45a654b0abc' -2026/02/10 17:43:58 [REQUEST] {"request_id":"26bb163d-79b4-4be5-819a-03816286c672","timestamp":"2026-02-10T17:43:58.879139911Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49089392,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.928251214Z","id":"26bb163d-79b4-4be5-819a-03816286c672","remote_ip":"127.0.0.1","host":"127.0.0.1:42419","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49103920,"latency_human":"49.10392ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.928258568Z","id":"26bb163d-79b4-4be5-819a-03816286c672","remote_ip":"127.0.0.1","host":"127.0.0.1:42419","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49119338,"latency_human":"49.119338ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"0f506c5f-5c0e-4c0a-afa2-fe520c5beaad","timestamp":"2026-02-10T17:43:58.928515785Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjdiNzgxMWE0LTczY2ItNGEzZS04NDg4LWY3OTVjZjZmYjA0MCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.kLxxg74lqsOVMdcgAmgnn0DLSsWVNpju5DcF3Cjes3w","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["3979c0d4-b81e-4140-b2fb-064eb708e223","683cd332-fbac-4a4b-b250-5ef423504e76","62c4110b-faaf-4b8e-b946-41aa948f3871"]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":656308,"status_code":200,"response_size":350} -{"time":"2026-02-10T17:43:58.929216876Z","id":"0f506c5f-5c0e-4c0a-afa2-fe520c5beaad","remote_ip":"127.0.0.1","host":"127.0.0.1:42419","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":699728,"latency_human":"699.728µs","bytes_in":135,"bytes_out":350} -{"time":"2026-02-10T17:43:58.929224961Z","id":"0f506c5f-5c0e-4c0a-afa2-fe520c5beaad","remote_ip":"127.0.0.1","host":"127.0.0.1:42419","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":709887,"latency_human":"709.887µs","bytes_in":135,"bytes_out":350} -=== RUN TestConflictsBulkDismiss/BulkDismissConflicts_InvalidRequestBody -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'd2981574-88ba-4e97-8ef6-6bc2aa458e44' -2026/02/10 17:43:58 [REQUEST] {"request_id":"cb532fda-ad14-4cfb-93cd-6fdd7327a29b","timestamp":"2026-02-10T17:43:58.949213625Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49255751,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:58.998506936Z","id":"cb532fda-ad14-4cfb-93cd-6fdd7327a29b","remote_ip":"127.0.0.1","host":"127.0.0.1:43379","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49286048,"latency_human":"49.286048ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:58.998522064Z","id":"cb532fda-ad14-4cfb-93cd-6fdd7327a29b","remote_ip":"127.0.0.1","host":"127.0.0.1:43379","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49306877,"latency_human":"49.306877ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:58 [REQUEST] {"request_id":"420be82a-6f3a-4428-ae5d-32d13514a764","timestamp":"2026-02-10T17:43:58.999043712Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzgsImlhdCI6MTc3MDc0NTQzOCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjM3MmRlYTRkLTMyZjMtNDAxOS04Y2NiLTZjMGZhMDEyMmE0YSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rnnRysBn1ej0UBREIs7D7uMwaug1KHHFcI1pZrb1oYA","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":90778,"status_code":200,"response_size":0,"error":"code=400, message=invalid request body"} -{"time":"2026-02-10T17:43:58.99919912Z","id":"420be82a-6f3a-4428-ae5d-32d13514a764","remote_ip":"127.0.0.1","host":"127.0.0.1:43379","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":400,"error":"code=400, message=invalid request body","latency":155489,"latency_human":"155.489µs","bytes_in":12,"bytes_out":35} -{"time":"2026-02-10T17:43:58.999213126Z","id":"420be82a-6f3a-4428-ae5d-32d13514a764","remote_ip":"127.0.0.1","host":"127.0.0.1:43379","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":170676,"latency_human":"170.676µs","bytes_in":12,"bytes_out":35} ---- PASS: TestConflictsBulkDismiss (0.29s) - --- PASS: TestConflictsBulkDismiss/BulkDismissConflicts_WithoutAuth (0.01s) - --- PASS: TestConflictsBulkDismiss/BulkDismissConflicts_EmptyConflictIDs (0.07s) - --- PASS: TestConflictsBulkDismiss/BulkDismissConflicts_InvalidConflictID (0.07s) - --- PASS: TestConflictsBulkDismiss/BulkDismissConflicts_MultipleConflicts (0.07s) - --- PASS: TestConflictsBulkDismiss/BulkDismissConflicts_InvalidRequestBody (0.07s) -=== RUN TestConflictsBulkEdgeCases -=== RUN TestConflictsBulkEdgeCases/BulkResolve_NonExistentConflicts -2026/02/10 17:43:58 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '3c965fa7-2205-4d86-a954-e10594c25e54' -2026/02/10 17:43:59 [REQUEST] {"request_id":"e4cc5013-60b6-4b0b-9313-be079a63e0e7","timestamp":"2026-02-10T17:43:59.019904143Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":54465456,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.074393253Z","id":"e4cc5013-60b6-4b0b-9313-be079a63e0e7","remote_ip":"127.0.0.1","host":"127.0.0.1:46691","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":54485734,"latency_human":"54.485734ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.074404884Z","id":"e4cc5013-60b6-4b0b-9313-be079a63e0e7","remote_ip":"127.0.0.1","host":"127.0.0.1:46691","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":54499449,"latency_human":"54.499449ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"0996d7aa-3508-4cb5-a8bd-690fce6ef93a","timestamp":"2026-02-10T17:43:59.074667992Z","method":"POST","path":"/api/conflicts/bulk-resolve","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjA1MGY5MzA5LTgzNjYtNGQwNy04NGUyLWQ1Mzk3NTczZDEwYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.o_touNdcY6SfMFC0hS2i1J75oUXoai7xRHEkOd4Sk_M","Content-Length":"160","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["8ae919e8-51d7-4cd0-88b3-b76aed64511d","44a9987a-5123-43c4-ac01-810094dbde7d","d68661c9-c2c8-42ac-b53a-d91d22f41507"],"strategy":"most_recent"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":757766,"status_code":200,"response_size":350} -{"time":"2026-02-10T17:43:59.075468217Z","id":"0996d7aa-3508-4cb5-a8bd-690fce6ef93a","remote_ip":"127.0.0.1","host":"127.0.0.1:46691","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":798922,"latency_human":"798.922µs","bytes_in":160,"bytes_out":350} -{"time":"2026-02-10T17:43:59.075478185Z","id":"0996d7aa-3508-4cb5-a8bd-690fce6ef93a","remote_ip":"127.0.0.1","host":"127.0.0.1:46691","method":"POST","uri":"/api/conflicts/bulk-resolve","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":810834,"latency_human":"810.834µs","bytes_in":160,"bytes_out":350} -=== RUN TestConflictsBulkEdgeCases/BulkDismiss_MixedValidInvalid -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '2011dcbd-d24a-4e33-a141-c15cbcf91688' -2026/02/10 17:43:59 [REQUEST] {"request_id":"026ea62e-5ae0-4485-bb8b-836668fede3e","timestamp":"2026-02-10T17:43:59.09484731Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50531869,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.145415887Z","id":"026ea62e-5ae0-4485-bb8b-836668fede3e","remote_ip":"127.0.0.1","host":"127.0.0.1:32855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50563568,"latency_human":"50.563568ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.145429151Z","id":"026ea62e-5ae0-4485-bb8b-836668fede3e","remote_ip":"127.0.0.1","host":"127.0.0.1:32855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50581140,"latency_human":"50.58114ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"64b8444b-1ae1-4cb8-81eb-350776e4a098","timestamp":"2026-02-10T17:43:59.145804488Z","method":"POST","path":"/api/conflicts/bulk-dismiss","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjJiYjcyNGU4LWM0MjUtNGU0YS04OWYxLTgxNzQwYjI5NjExNiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.3rLXodg6N_qBlttRHnQeRmKbEwyfueQ9KjstLFU01mU","Content-Length":"91","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"conflict_ids":["invalid-uuid-1","invalid-uuid-2","2a81fe17-8a90-4fc4-9c68-cd676e920d35"]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":384183,"status_code":200,"response_size":308} -{"time":"2026-02-10T17:43:59.146201945Z","id":"64b8444b-1ae1-4cb8-81eb-350776e4a098","remote_ip":"127.0.0.1","host":"127.0.0.1:32855","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":397638,"latency_human":"397.638µs","bytes_in":91,"bytes_out":308} -{"time":"2026-02-10T17:43:59.146205742Z","id":"64b8444b-1ae1-4cb8-81eb-350776e4a098","remote_ip":"127.0.0.1","host":"127.0.0.1:32855","method":"POST","uri":"/api/conflicts/bulk-dismiss","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":402477,"latency_human":"402.477µs","bytes_in":91,"bytes_out":308} ---- PASS: TestConflictsBulkEdgeCases (0.15s) - --- PASS: TestConflictsBulkEdgeCases/BulkResolve_NonExistentConflicts (0.08s) - --- PASS: TestConflictsBulkEdgeCases/BulkDismiss_MixedValidInvalid (0.07s) -=== RUN TestUpdateUserMaxDevices -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '880b62a5-45da-433f-8c5f-eed15dcfdb87' -2026/02/10 17:43:59 [REQUEST] {"request_id":"f6b083d2-d3be-4c8c-bf5f-13b913ed57c2","timestamp":"2026-02-10T17:43:59.165440046Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51690388,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.217148929Z","id":"f6b083d2-d3be-4c8c-bf5f-13b913ed57c2","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51706648,"latency_human":"51.706648ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.217157474Z","id":"f6b083d2-d3be-4c8c-bf5f-13b913ed57c2","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51718430,"latency_human":"51.71843ms","bytes_in":59,"bytes_out":579} -DEBUG: refreshToken generated: '06f9456a-5575-4611-85b8-ba5ac14a6676' -2026/02/10 17:43:59 [REQUEST] {"request_id":"cb28406f-c4a1-42d5-967d-a7696bf09f99","timestamp":"2026-02-10T17:43:59.222089314Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48034596,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.270140851Z","id":"cb28406f-c4a1-42d5-967d-a7696bf09f99","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48051046,"latency_human":"48.051046ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.270147163Z","id":"cb28406f-c4a1-42d5-967d-a7696bf09f99","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48058651,"latency_human":"48.058651ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"ac0cb9c1-b639-459e-b8fd-a6abea9866e0","timestamp":"2026-02-10T17:43:59.270344008Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImEyNWFmYWRlLWE0MzQtNGM4Yy1hMTM2LTA3Zjc5MzdhYzBjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wJKklQ7yUq6L89Whqp5yv-bwMS15f3hjCEq4D0EhhYU","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"maxdevices@example.com","first_name":"Test","last_name":"User","password":"Test@Pass123!","username":"maxdevicesuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":457158,"status_code":409,"response_size":33} -{"time":"2026-02-10T17:43:59.270821073Z","id":"ac0cb9c1-b639-459e-b8fd-a6abea9866e0","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":477025,"latency_human":"477.025µs","bytes_in":128,"bytes_out":33} -{"time":"2026-02-10T17:43:59.270828076Z","id":"ac0cb9c1-b639-459e-b8fd-a6abea9866e0","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":484860,"latency_human":"484.86µs","bytes_in":128,"bytes_out":33} - device_cap_test.go:345: User maxdevices@example.com already exists, logging in to get ID -DEBUG: refreshToken generated: '7b28d081-2406-491c-acde-618c93890230' -2026/02/10 17:43:59 [REQUEST] {"request_id":"af12d268-e903-40f9-9ebe-491ef739e18b","timestamp":"2026-02-10T17:43:59.271131078Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"61","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"maxdevices@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49687322,"status_code":200,"response_size":595} -{"time":"2026-02-10T17:43:59.320840751Z","id":"af12d268-e903-40f9-9ebe-491ef739e18b","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49708912,"latency_human":"49.708912ms","bytes_in":61,"bytes_out":595} -{"time":"2026-02-10T17:43:59.320849468Z","id":"af12d268-e903-40f9-9ebe-491ef739e18b","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49719151,"latency_human":"49.719151ms","bytes_in":61,"bytes_out":595} - device_cap_test.go:379: JWT claims: map[exp:1.770749039e+09 iat:1.770745439e+09 user_email:maxdevices@example.com user_id:5376cadf-3c0e-4629-9b00-eba8d0e176f9 user_role:user user_username:maxdevicesuser] - device_cap_test.go:382: Extracted userID from JWT: 5376cadf-3c0e-4629-9b00-eba8d0e176f9 -=== RUN TestUpdateUserMaxDevices/Update_to_5_devices -2026/02/10 17:43:59 [REQUEST] {"request_id":"0706c867-cd34-4f47-93bc-28c89690c197","timestamp":"2026-02-10T17:43:59.321193616Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImEyNWFmYWRlLWE0MzQtNGM4Yy1hMTM2LTA3Zjc5MzdhYzBjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wJKklQ7yUq6L89Whqp5yv-bwMS15f3hjCEq4D0EhhYU","Content-Length":"17","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":5},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2626383,"status_code":200,"response_size":34} -{"time":"2026-02-10T17:43:59.323844304Z","id":"0706c867-cd34-4f47-93bc-28c89690c197","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2649295,"latency_human":"2.649295ms","bytes_in":17,"bytes_out":34} -{"time":"2026-02-10T17:43:59.32385295Z","id":"0706c867-cd34-4f47-93bc-28c89690c197","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2659874,"latency_human":"2.659874ms","bytes_in":17,"bytes_out":34} -=== RUN TestUpdateUserMaxDevices/Update_to_10_devices_(default) -2026/02/10 17:43:59 [REQUEST] {"request_id":"e56c38c4-6f0b-474f-825e-8ca0191c7821","timestamp":"2026-02-10T17:43:59.324013418Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImEyNWFmYWRlLWE0MzQtNGM4Yy1hMTM2LTA3Zjc5MzdhYzBjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wJKklQ7yUq6L89Whqp5yv-bwMS15f3hjCEq4D0EhhYU","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2422955,"status_code":200,"response_size":34} -{"time":"2026-02-10T17:43:59.326459456Z","id":"e56c38c4-6f0b-474f-825e-8ca0191c7821","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2444806,"latency_human":"2.444806ms","bytes_in":18,"bytes_out":34} -{"time":"2026-02-10T17:43:59.32646721Z","id":"e56c38c4-6f0b-474f-825e-8ca0191c7821","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2453602,"latency_human":"2.453602ms","bytes_in":18,"bytes_out":34} -=== RUN TestUpdateUserMaxDevices/Update_to_50_devices -2026/02/10 17:43:59 [REQUEST] {"request_id":"0b15d981-3551-4754-97fd-b44268eb38ac","timestamp":"2026-02-10T17:43:59.326649799Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImEyNWFmYWRlLWE0MzQtNGM4Yy1hMTM2LTA3Zjc5MzdhYzBjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wJKklQ7yUq6L89Whqp5yv-bwMS15f3hjCEq4D0EhhYU","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":50},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2514275,"status_code":200,"response_size":34} -{"time":"2026-02-10T17:43:59.329203226Z","id":"0b15d981-3551-4754-97fd-b44268eb38ac","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2554008,"latency_human":"2.554008ms","bytes_in":18,"bytes_out":34} -{"time":"2026-02-10T17:43:59.329208175Z","id":"0b15d981-3551-4754-97fd-b44268eb38ac","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2559769,"latency_human":"2.559769ms","bytes_in":18,"bytes_out":34} -=== RUN TestUpdateUserMaxDevices/Update_to_100_devices_(maximum) -2026/02/10 17:43:59 [REQUEST] {"request_id":"ec77ad4c-1833-4d6a-a68d-4accade516e6","timestamp":"2026-02-10T17:43:59.329305857Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImEyNWFmYWRlLWE0MzQtNGM4Yy1hMTM2LTA3Zjc5MzdhYzBjYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.wJKklQ7yUq6L89Whqp5yv-bwMS15f3hjCEq4D0EhhYU","Content-Length":"19","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":100},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":2567593,"status_code":200,"response_size":34} -{"time":"2026-02-10T17:43:59.331930596Z","id":"ec77ad4c-1833-4d6a-a68d-4accade516e6","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2621203,"latency_human":"2.621203ms","bytes_in":19,"bytes_out":34} -{"time":"2026-02-10T17:43:59.331945644Z","id":"ec77ad4c-1833-4d6a-a68d-4accade516e6","remote_ip":"127.0.0.1","host":"127.0.0.1:44839","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":2638465,"latency_human":"2.638465ms","bytes_in":19,"bytes_out":34} ---- PASS: TestUpdateUserMaxDevices (0.19s) - --- PASS: TestUpdateUserMaxDevices/Update_to_5_devices (0.00s) - --- PASS: TestUpdateUserMaxDevices/Update_to_10_devices_(default) (0.00s) - --- PASS: TestUpdateUserMaxDevices/Update_to_50_devices (0.00s) - --- PASS: TestUpdateUserMaxDevices/Update_to_100_devices_(maximum) (0.00s) -=== RUN TestUpdateUserMaxDevicesValidation -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '65ca6833-c74c-4cbe-8de0-aa834f0f5ca0' -2026/02/10 17:43:59 [REQUEST] {"request_id":"8cffe0a2-d91f-4fc3-8b26-af6aadbc00ea","timestamp":"2026-02-10T17:43:59.352968206Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":52611607,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.405611592Z","id":"8cffe0a2-d91f-4fc3-8b26-af6aadbc00ea","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52635512,"latency_human":"52.635512ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.405624135Z","id":"8cffe0a2-d91f-4fc3-8b26-af6aadbc00ea","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":52656199,"latency_human":"52.656199ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"e6bdc74f-97d3-4d97-b8d4-7ac53949c7fa","timestamp":"2026-02-10T17:43:59.405903894Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjExY2U5MzZmLWFhYTMtNDU5MS04ZmY5LTMxNGE3NGU4ZDdiZSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.gwlZB7Y928sAfZhBQnZwSl-TYchcXpENki0b3c2gqgQ","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"admin@example.com","first_name":"Admin","last_name":"User","password":"Admin@Pass123!","role":"admin","username":"adminuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51342172,"status_code":403,"response_size":58} -{"time":"2026-02-10T17:43:59.457279448Z","id":"e6bdc74f-97d3-4d97-b8d4-7ac53949c7fa","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":51374753,"latency_human":"51.374753ms","bytes_in":135,"bytes_out":58} -{"time":"2026-02-10T17:43:59.457285289Z","id":"e6bdc74f-97d3-4d97-b8d4-7ac53949c7fa","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":51382217,"latency_human":"51.382217ms","bytes_in":135,"bytes_out":58} -DEBUG: refreshToken generated: 'aa50509d-ba87-46fb-bcb5-bb06f8fdbb56' -2026/02/10 17:43:59 [REQUEST] {"request_id":"7418d8ec-4b6d-4689-9517-9a935bac6ba7","timestamp":"2026-02-10T17:43:59.462733717Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51815530,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.514573071Z","id":"7418d8ec-4b6d-4689-9517-9a935bac6ba7","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51838212,"latency_human":"51.838212ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.514580295Z","id":"7418d8ec-4b6d-4689-9517-9a935bac6ba7","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51846848,"latency_human":"51.846848ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"7afb7b5d-aeab-49ad-bb14-4e8da84d7640","timestamp":"2026-02-10T17:43:59.514786377Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM4ZWFlMGIzLTUxZTAtNDIwNC1hODk4LTIyY2IzZjU5NjMyMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rJCpMH2DAYKHT27_eBfP8L2i-64PfMjEHeWPTwgyU8k","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"maxdevices@example.com","first_name":"Test","last_name":"User","password":"Test@Pass123!","username":"maxdevicesuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":475702,"status_code":409,"response_size":33} -{"time":"2026-02-10T17:43:59.515306171Z","id":"7afb7b5d-aeab-49ad-bb14-4e8da84d7640","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":514735,"latency_human":"514.735µs","bytes_in":128,"bytes_out":33} -{"time":"2026-02-10T17:43:59.515322431Z","id":"7afb7b5d-aeab-49ad-bb14-4e8da84d7640","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":535344,"latency_human":"535.344µs","bytes_in":128,"bytes_out":33} - device_cap_test.go:345: User maxdevices@example.com already exists, logging in to get ID -DEBUG: refreshToken generated: '40e8e1ce-1dcd-48aa-8961-0af872e26287' -2026/02/10 17:43:59 [REQUEST] {"request_id":"4a6e6765-3185-400d-a026-339eb6c84499","timestamp":"2026-02-10T17:43:59.515897028Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"61","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"maxdevices@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50823900,"status_code":200,"response_size":595} -{"time":"2026-02-10T17:43:59.566744091Z","id":"4a6e6765-3185-400d-a026-339eb6c84499","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50845250,"latency_human":"50.84525ms","bytes_in":61,"bytes_out":595} -{"time":"2026-02-10T17:43:59.566752296Z","id":"4a6e6765-3185-400d-a026-339eb6c84499","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50856270,"latency_human":"50.85627ms","bytes_in":61,"bytes_out":595} - device_cap_test.go:379: JWT claims: map[exp:1.770749039e+09 iat:1.770745439e+09 user_email:maxdevices@example.com user_id:5376cadf-3c0e-4629-9b00-eba8d0e176f9 user_role:user user_username:maxdevicesuser] - device_cap_test.go:382: Extracted userID from JWT: 5376cadf-3c0e-4629-9b00-eba8d0e176f9 -=== RUN TestUpdateUserMaxDevicesValidation/Zero_devices_(below_minimum) -2026/02/10 17:43:59 [REQUEST] {"request_id":"66a2868f-c54a-4a22-a25c-cab63dae3529","timestamp":"2026-02-10T17:43:59.56709927Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM4ZWFlMGIzLTUxZTAtNDIwNC1hODk4LTIyY2IzZjU5NjMyMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rJCpMH2DAYKHT27_eBfP8L2i-64PfMjEHeWPTwgyU8k","Content-Length":"17","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":0},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":111597,"status_code":400,"response_size":127} -{"time":"2026-02-10T17:43:59.567232467Z","id":"66a2868f-c54a-4a22-a25c-cab63dae3529","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":132616,"latency_human":"132.616µs","bytes_in":17,"bytes_out":127} -{"time":"2026-02-10T17:43:59.567238919Z","id":"66a2868f-c54a-4a22-a25c-cab63dae3529","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":140270,"latency_human":"140.27µs","bytes_in":17,"bytes_out":127} -=== RUN TestUpdateUserMaxDevicesValidation/Negative_devices -2026/02/10 17:43:59 [REQUEST] {"request_id":"beb26ab6-5df4-4366-a521-ad6e6fdeeb19","timestamp":"2026-02-10T17:43:59.567507207Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM4ZWFlMGIzLTUxZTAtNDIwNC1hODk4LTIyY2IzZjU5NjMyMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rJCpMH2DAYKHT27_eBfP8L2i-64PfMjEHeWPTwgyU8k","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":-1},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":32059,"status_code":400,"response_size":122} -{"time":"2026-02-10T17:43:59.567549595Z","id":"beb26ab6-5df4-4366-a521-ad6e6fdeeb19","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":42559,"latency_human":"42.559µs","bytes_in":18,"bytes_out":122} -{"time":"2026-02-10T17:43:59.567552551Z","id":"beb26ab6-5df4-4366-a521-ad6e6fdeeb19","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":46045,"latency_human":"46.045µs","bytes_in":18,"bytes_out":122} -=== RUN TestUpdateUserMaxDevicesValidation/101_devices_(above_maximum) -2026/02/10 17:43:59 [REQUEST] {"request_id":"7684c779-e7f8-49ab-95aa-060a3ee7196b","timestamp":"2026-02-10T17:43:59.567805109Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM4ZWFlMGIzLTUxZTAtNDIwNC1hODk4LTIyY2IzZjU5NjMyMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rJCpMH2DAYKHT27_eBfP8L2i-64PfMjEHeWPTwgyU8k","Content-Length":"19","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":101},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":58709,"status_code":400,"response_size":122} -{"time":"2026-02-10T17:43:59.567872985Z","id":"7684c779-e7f8-49ab-95aa-060a3ee7196b","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":67515,"latency_human":"67.515µs","bytes_in":19,"bytes_out":122} -{"time":"2026-02-10T17:43:59.567876281Z","id":"7684c779-e7f8-49ab-95aa-060a3ee7196b","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":71463,"latency_human":"71.463µs","bytes_in":19,"bytes_out":122} -=== RUN TestUpdateUserMaxDevicesValidation/1000_devices_(far_above_maximum) -2026/02/10 17:43:59 [REQUEST] {"request_id":"089593cc-d9e3-48b4-a58a-584c505eba99","timestamp":"2026-02-10T17:43:59.568027602Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6ImM4ZWFlMGIzLTUxZTAtNDIwNC1hODk4LTIyY2IzZjU5NjMyMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.rJCpMH2DAYKHT27_eBfP8L2i-64PfMjEHeWPTwgyU8k","Content-Length":"20","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":1000},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":40776,"status_code":400,"response_size":122} -{"time":"2026-02-10T17:43:59.568079528Z","id":"089593cc-d9e3-48b4-a58a-584c505eba99","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":51796,"latency_human":"51.796µs","bytes_in":20,"bytes_out":122} -{"time":"2026-02-10T17:43:59.568083275Z","id":"089593cc-d9e3-48b4-a58a-584c505eba99","remote_ip":"127.0.0.1","host":"127.0.0.1:41511","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":56324,"latency_human":"56.324µs","bytes_in":20,"bytes_out":122} ---- PASS: TestUpdateUserMaxDevicesValidation (0.24s) - --- PASS: TestUpdateUserMaxDevicesValidation/Zero_devices_(below_minimum) (0.00s) - --- PASS: TestUpdateUserMaxDevicesValidation/Negative_devices (0.00s) - --- PASS: TestUpdateUserMaxDevicesValidation/101_devices_(above_maximum) (0.00s) - --- PASS: TestUpdateUserMaxDevicesValidation/1000_devices_(far_above_maximum) (0.00s) -=== RUN TestUpdateUserMaxDevicesAuth -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '29ca48f3-6f92-4aab-93fe-cfa26f1f3e2f' -2026/02/10 17:43:59 [REQUEST] {"request_id":"1e4e2e67-c169-4261-a6f8-05d5581e9eb6","timestamp":"2026-02-10T17:43:59.588420055Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50487426,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.638924262Z","id":"1e4e2e67-c169-4261-a6f8-05d5581e9eb6","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50501983,"latency_human":"50.501983ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.638930784Z","id":"1e4e2e67-c169-4261-a6f8-05d5581e9eb6","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50511030,"latency_human":"50.51103ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"6e544cc0-0ae5-467e-8970-b2e7775141a5","timestamp":"2026-02-10T17:43:59.6390903Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc3OTIxNDhmLWUyODItNDNjYi05NTVlLTFhODQ3YzYzMmFkYSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.mg3W-5K3F8drOcBcPPTw6t4Q3pGko10_VWb84iQSwts","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"admin@example.com","first_name":"Admin","last_name":"User","password":"Admin@Pass123!","role":"admin","username":"adminuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50266897,"status_code":403,"response_size":58} -{"time":"2026-02-10T17:43:59.689389187Z","id":"6e544cc0-0ae5-467e-8970-b2e7775141a5","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50297164,"latency_human":"50.297164ms","bytes_in":135,"bytes_out":58} -{"time":"2026-02-10T17:43:59.68939649Z","id":"6e544cc0-0ae5-467e-8970-b2e7775141a5","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50306230,"latency_human":"50.30623ms","bytes_in":135,"bytes_out":58} -DEBUG: refreshToken generated: 'a892e752-3d1f-43ab-813a-39ae442f27a8' -2026/02/10 17:43:59 [REQUEST] {"request_id":"9879ec7f-0904-4234-9b65-a65ea4928d22","timestamp":"2026-02-10T17:43:59.695420827Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48810625,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.744258893Z","id":"9879ec7f-0904-4234-9b65-a65ea4928d22","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48836613,"latency_human":"48.836613ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.744268882Z","id":"9879ec7f-0904-4234-9b65-a65ea4928d22","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48848616,"latency_human":"48.848616ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:43:59 [REQUEST] {"request_id":"6b37f617-1586-420c-931a-5acd9ad0deb9","timestamp":"2026-02-10T17:43:59.74452154Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjE0OGJkOTg5LWZkYWQtNGFjZS1hZGNhLTI1ZGJhODA4NjI0ZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.fVltAkJfQT01tXRZGL56jNVCefh23CGKAXqH2o6AWLM","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"maxdevices@example.com","first_name":"Test","last_name":"User","password":"Test@Pass123!","username":"maxdevicesuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":333459,"status_code":409,"response_size":33} -{"time":"2026-02-10T17:43:59.744882881Z","id":"6b37f617-1586-420c-931a-5acd9ad0deb9","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":360949,"latency_human":"360.949µs","bytes_in":128,"bytes_out":33} -{"time":"2026-02-10T17:43:59.744890355Z","id":"6b37f617-1586-420c-931a-5acd9ad0deb9","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":369416,"latency_human":"369.416µs","bytes_in":128,"bytes_out":33} - device_cap_test.go:345: User maxdevices@example.com already exists, logging in to get ID -DEBUG: refreshToken generated: 'c712766d-8902-4a6f-8f7e-9aa4231aa9e4' -2026/02/10 17:43:59 [REQUEST] {"request_id":"62ee4ff8-4040-449a-8313-ce4f59319a1c","timestamp":"2026-02-10T17:43:59.74519506Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"61","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"maxdevices@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49183427,"status_code":200,"response_size":595} -{"time":"2026-02-10T17:43:59.794402271Z","id":"62ee4ff8-4040-449a-8313-ce4f59319a1c","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49205428,"latency_human":"49.205428ms","bytes_in":61,"bytes_out":595} -{"time":"2026-02-10T17:43:59.794411929Z","id":"62ee4ff8-4040-449a-8313-ce4f59319a1c","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49217250,"latency_human":"49.21725ms","bytes_in":61,"bytes_out":595} - device_cap_test.go:379: JWT claims: map[exp:1.770749039e+09 iat:1.770745439e+09 user_email:maxdevices@example.com user_id:5376cadf-3c0e-4629-9b00-eba8d0e176f9 user_role:user user_username:maxdevicesuser] - device_cap_test.go:382: Extracted userID from JWT: 5376cadf-3c0e-4629-9b00-eba8d0e176f9 -=== RUN TestUpdateUserMaxDevicesAuth/No_authorization -2026/02/10 17:43:59 [REQUEST] {"request_id":"578591d7-6b4c-45cf-8341-f5191234ddd3","timestamp":"2026-02-10T17:43:59.794851404Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":16010,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:43:59.794903721Z","id":"578591d7-6b4c-45cf-8341-f5191234ddd3","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":51585,"latency_human":"51.585µs","bytes_in":18,"bytes_out":39} -{"time":"2026-02-10T17:43:59.79491398Z","id":"578591d7-6b4c-45cf-8341-f5191234ddd3","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":63117,"latency_human":"63.117µs","bytes_in":18,"bytes_out":39} -=== RUN TestUpdateUserMaxDevicesAuth/Non-admin_user -2026/02/10 17:43:59 [REQUEST] {"request_id":"0817eae5-cfbb-47c9-aba6-763df3ed8bf8","timestamp":"2026-02-10T17:43:59.795211001Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjE0OGJkOTg5LWZkYWQtNGFjZS1hZGNhLTI1ZGJhODA4NjI0ZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.fVltAkJfQT01tXRZGL56jNVCefh23CGKAXqH2o6AWLM","Content-Length":"128","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"maxdevices@example.com","first_name":"Test","last_name":"User","password":"Test@Pass123!","username":"maxdevicesuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":395144,"status_code":409,"response_size":33} -{"time":"2026-02-10T17:43:59.795638234Z","id":"0817eae5-cfbb-47c9-aba6-763df3ed8bf8","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":426611,"latency_human":"426.611µs","bytes_in":128,"bytes_out":33} -{"time":"2026-02-10T17:43:59.795646179Z","id":"0817eae5-cfbb-47c9-aba6-763df3ed8bf8","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":409,"error":"","latency":435558,"latency_human":"435.558µs","bytes_in":128,"bytes_out":33} - device_cap_test.go:345: User maxdevices@example.com already exists, logging in to get ID -DEBUG: refreshToken generated: '5dd20316-a79f-41ee-8125-d013cafc27c2' -2026/02/10 17:43:59 [REQUEST] {"request_id":"c735886c-ae3d-49e5-acef-764e50475628","timestamp":"2026-02-10T17:43:59.79588934Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"61","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"maxdevices@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50926390,"status_code":200,"response_size":595} -{"time":"2026-02-10T17:43:59.846844364Z","id":"c735886c-ae3d-49e5-acef-764e50475628","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50953841,"latency_human":"50.953841ms","bytes_in":61,"bytes_out":595} -{"time":"2026-02-10T17:43:59.846854923Z","id":"c735886c-ae3d-49e5-acef-764e50475628","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50965604,"latency_human":"50.965604ms","bytes_in":61,"bytes_out":595} - device_cap_test.go:379: JWT claims: map[exp:1.770749039e+09 iat:1.770745439e+09 user_email:maxdevices@example.com user_id:5376cadf-3c0e-4629-9b00-eba8d0e176f9 user_role:user user_username:maxdevicesuser] - device_cap_test.go:382: Extracted userID from JWT: 5376cadf-3c0e-4629-9b00-eba8d0e176f9 -DEBUG: refreshToken generated: 'b9940e8f-3637-4e3c-bae4-201ceea1914b' -2026/02/10 17:43:59 [REQUEST] {"request_id":"94bf0f38-a986-4d27-aa44-d8436abd7a9f","timestamp":"2026-02-10T17:43:59.847205023Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"61","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"maxdevices@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51069907,"status_code":200,"response_size":595} -{"time":"2026-02-10T17:43:59.898292953Z","id":"94bf0f38-a986-4d27-aa44-d8436abd7a9f","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51087209,"latency_human":"51.087209ms","bytes_in":61,"bytes_out":595} -{"time":"2026-02-10T17:43:59.898299375Z","id":"94bf0f38-a986-4d27-aa44-d8436abd7a9f","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51094914,"latency_human":"51.094914ms","bytes_in":61,"bytes_out":595} -2026/02/10 17:43:59 [REQUEST] {"request_id":"4bf889a0-66da-4a6d-87be-c7274b6c6c0b","timestamp":"2026-02-10T17:43:59.898728161Z","method":"PUT","path":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6Im1heGRldmljZXNAZXhhbXBsZS5jb20iLCJ1c2VyX2lkIjoiNTM3NmNhZGYtM2MwZS00NjI5LTliMDAtZWJhOGQwZTE3NmY5IiwidXNlcl9yb2xlIjoidXNlciIsInVzZXJfdXNlcm5hbWUiOiJtYXhkZXZpY2VzdXNlciJ9.MjU_c8mrpUC0kLtstO8obQc4hAqQzzeQ8ZdWcK7xznY","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":66252,"status_code":403,"response_size":34} -{"time":"2026-02-10T17:43:59.898826022Z","id":"4bf889a0-66da-4a6d-87be-c7274b6c6c0b","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":96088,"latency_human":"96.088µs","bytes_in":18,"bytes_out":34} -{"time":"2026-02-10T17:43:59.898831733Z","id":"4bf889a0-66da-4a6d-87be-c7274b6c6c0b","remote_ip":"127.0.0.1","host":"127.0.0.1:33061","method":"PUT","uri":"/api/auth/users/5376cadf-3c0e-4629-9b00-eba8d0e176f9/max-devices","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":103211,"latency_human":"103.211µs","bytes_in":18,"bytes_out":34} ---- PASS: TestUpdateUserMaxDevicesAuth (0.33s) - --- PASS: TestUpdateUserMaxDevicesAuth/No_authorization (0.00s) - --- PASS: TestUpdateUserMaxDevicesAuth/Non-admin_user (0.10s) -=== RUN TestUpdateUserMaxDevicesNonExistentUser -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:43:59 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '30e88699-ddc9-4889-a4cc-66d55e1101b2' -2026/02/10 17:43:59 [REQUEST] {"request_id":"08083d22-06f9-477a-b02c-96becb8d7564","timestamp":"2026-02-10T17:43:59.918970976Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51457566,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:43:59.970468686Z","id":"08083d22-06f9-477a-b02c-96becb8d7564","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51494414,"latency_human":"51.494414ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:43:59.970480979Z","id":"08083d22-06f9-477a-b02c-96becb8d7564","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51507669,"latency_human":"51.507669ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"018614f8-e4f9-4737-8885-7f21f80ab26e","timestamp":"2026-02-10T17:43:59.970702891Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwMzksImlhdCI6MTc3MDc0NTQzOSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjdhN2IyNDMzLWVlNTAtNGQxNS1hMDJjLWRlNTdlM2Y2OTA3YyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.lfndhmHL5CVXsUCESUvnFMQfChWnQS8nDSgLq67fHi0","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"admin@example.com","first_name":"Admin","last_name":"User","password":"Admin@Pass123!","role":"admin","username":"adminuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50357726,"status_code":403,"response_size":58} -{"time":"2026-02-10T17:44:00.02114359Z","id":"018614f8-e4f9-4737-8885-7f21f80ab26e","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50438876,"latency_human":"50.438876ms","bytes_in":135,"bytes_out":58} -{"time":"2026-02-10T17:44:00.021151094Z","id":"018614f8-e4f9-4737-8885-7f21f80ab26e","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50448715,"latency_human":"50.448715ms","bytes_in":135,"bytes_out":58} -DEBUG: refreshToken generated: 'a8ef488d-1bf9-4638-b23a-d81f8be2c90c' -2026/02/10 17:44:00 [REQUEST] {"request_id":"1f16f751-1512-44dc-a6bb-7083444d95ad","timestamp":"2026-02-10T17:44:00.026701752Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49856045,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.076574638Z","id":"1f16f751-1512-44dc-a6bb-7083444d95ad","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49872355,"latency_human":"49.872355ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.076580298Z","id":"1f16f751-1512-44dc-a6bb-7083444d95ad","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49879679,"latency_human":"49.879679ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"d292aca4-ed1f-44a9-8b75-3e4fcec94f79","timestamp":"2026-02-10T17:44:00.076859957Z","method":"PUT","path":"/api/auth/users/7c46c717-2dad-48eb-9820-525274b485b6/max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjgxODIxYjg4LWQyZDItNGY2OC05MTczLWQxYzBkMDUwZWZiMCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.40becnoomo1YNAqcqf1EfKkMCOwNe-TY6DlB4SLlemI","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":568305,"status_code":404,"response_size":27} -{"time":"2026-02-10T17:44:00.077463347Z","id":"d292aca4-ed1f-44a9-8b75-3e4fcec94f79","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"PUT","uri":"/api/auth/users/7c46c717-2dad-48eb-9820-525274b485b6/max-devices","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":602528,"latency_human":"602.528µs","bytes_in":18,"bytes_out":27} -{"time":"2026-02-10T17:44:00.077471121Z","id":"d292aca4-ed1f-44a9-8b75-3e4fcec94f79","remote_ip":"127.0.0.1","host":"127.0.0.1:40855","method":"PUT","uri":"/api/auth/users/7c46c717-2dad-48eb-9820-525274b485b6/max-devices","user_agent":"Go-http-client/1.1","status":404,"error":"","latency":611715,"latency_human":"611.715µs","bytes_in":18,"bytes_out":27} ---- PASS: TestUpdateUserMaxDevicesNonExistentUser (0.18s) -=== RUN TestUpdateUserMaxDevicesMissingUserID -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '01a0ff10-a9e4-4425-846e-e024f2a7b70e' -2026/02/10 17:44:00 [REQUEST] {"request_id":"7c7143c0-51a3-4111-a1b5-cbb1119ee29d","timestamp":"2026-02-10T17:44:00.097558127Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50539784,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.148124871Z","id":"7c7143c0-51a3-4111-a1b5-cbb1119ee29d","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50563657,"latency_human":"50.563657ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.148137224Z","id":"7c7143c0-51a3-4111-a1b5-cbb1119ee29d","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":50576281,"latency_human":"50.576281ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"c78c93c1-e842-425c-a977-117f5a32ddef","timestamp":"2026-02-10T17:44:00.148522148Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjgwZWE2ZmE2LWQ3NGUtNDZjMy1hYzI5LWE0YmMxNmZkYjk2ZCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.tn41LxpdYd_QtF0jolsHtTmm-LbD_sBsvaAJTtSTwC4","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"admin@example.com","first_name":"Admin","last_name":"User","password":"Admin@Pass123!","role":"admin","username":"adminuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50592531,"status_code":403,"response_size":58} -{"time":"2026-02-10T17:44:00.199188977Z","id":"c78c93c1-e842-425c-a977-117f5a32ddef","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50648024,"latency_human":"50.648024ms","bytes_in":135,"bytes_out":58} -{"time":"2026-02-10T17:44:00.199207541Z","id":"c78c93c1-e842-425c-a977-117f5a32ddef","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50683320,"latency_human":"50.68332ms","bytes_in":135,"bytes_out":58} -DEBUG: refreshToken generated: '58fb362a-e4d8-4e31-b739-70cc046793b9' -2026/02/10 17:44:00 [REQUEST] {"request_id":"5b991ef9-44ba-4828-bb06-7c3785cc1574","timestamp":"2026-02-10T17:44:00.20536214Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48411995,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.253790706Z","id":"5b991ef9-44ba-4828-bb06-7c3785cc1574","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48428186,"latency_human":"48.428186ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.253796216Z","id":"5b991ef9-44ba-4828-bb06-7c3785cc1574","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48435399,"latency_human":"48.435399ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"e75704e3-f1c9-41f4-8285-143dc1116271","timestamp":"2026-02-10T17:44:00.253987972Z","method":"PUT","path":"/api/auth/users//max-devices","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijc2OTY5YjNiLTQ0ZGQtNGY5MS1iYWZkLWU4OTBmMmFhZjg1YyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.gsqKkH6JuWLjAx5RgVJM2CqPj53YD11qveEgz_BcmyY","Content-Length":"18","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"max_devices":10},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":26750,"status_code":400,"response_size":29} -{"time":"2026-02-10T17:44:00.254028036Z","id":"e75704e3-f1c9-41f4-8285-143dc1116271","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"PUT","uri":"/api/auth/users//max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":40124,"latency_human":"40.124µs","bytes_in":18,"bytes_out":29} -{"time":"2026-02-10T17:44:00.254031302Z","id":"e75704e3-f1c9-41f4-8285-143dc1116271","remote_ip":"127.0.0.1","host":"127.0.0.1:34631","method":"PUT","uri":"/api/auth/users//max-devices","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":43911,"latency_human":"43.911µs","bytes_in":18,"bytes_out":29} ---- PASS: TestUpdateUserMaxDevicesMissingUserID (0.18s) -=== RUN TestListUsersIncludesMaxDevices -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '2dfd4d3e-32ce-4c03-b7f8-bf5eef71ade2' -2026/02/10 17:44:00 [REQUEST] {"request_id":"753dbd1e-67eb-4481-93ce-b93ad75f8b9e","timestamp":"2026-02-10T17:44:00.274333668Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48734564,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.323146367Z","id":"753dbd1e-67eb-4481-93ce-b93ad75f8b9e","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48812249,"latency_human":"48.812249ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.323162076Z","id":"753dbd1e-67eb-4481-93ce-b93ad75f8b9e","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48831784,"latency_human":"48.831784ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"cef3ad76-ca76-4da3-a00c-1a147fbc9cfc","timestamp":"2026-02-10T17:44:00.32350366Z","method":"POST","path":"/api/auth/register","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjViNjc5YTFkLWY0NzgtNGQ3MC05ZGVjLWM3NmY1ZDcxZTlhNSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.y8X64tEiH9IiXQw4Y0ztUuuTR_CYN8sY8YKxoSdalSo","Content-Length":"135","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"email":"admin@example.com","first_name":"Admin","last_name":"User","password":"Admin@Pass123!","role":"admin","username":"adminuser"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":50761305,"status_code":403,"response_size":58} -{"time":"2026-02-10T17:44:00.374293437Z","id":"cef3ad76-ca76-4da3-a00c-1a147fbc9cfc","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50788325,"latency_human":"50.788325ms","bytes_in":135,"bytes_out":58} -{"time":"2026-02-10T17:44:00.374309848Z","id":"cef3ad76-ca76-4da3-a00c-1a147fbc9cfc","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/register","user_agent":"Go-http-client/1.1","status":403,"error":"","latency":50806638,"latency_human":"50.806638ms","bytes_in":135,"bytes_out":58} -DEBUG: refreshToken generated: '353b9f94-0f0e-4ba6-b9b9-2eb80cebca71' -2026/02/10 17:44:00 [REQUEST] {"request_id":"18c32d59-5840-42db-950d-2d9295e1341f","timestamp":"2026-02-10T17:44:00.380241713Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49333265,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.429598632Z","id":"18c32d59-5840-42db-950d-2d9295e1341f","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49354825,"latency_human":"49.354825ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.429608019Z","id":"18c32d59-5840-42db-950d-2d9295e1341f","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49366607,"latency_human":"49.366607ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"f91426da-ebb3-4ebc-a206-d0d473d9f546","timestamp":"2026-02-10T17:44:00.42989978Z","method":"GET","path":"/api/auth/users","headers":{"Accept-Encoding":"gzip","Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjYxODZiMWQxLWE5YWItNDM1MS05OWJjLTM0NTU3OTM0MDYwYyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.UqWTsJUMvwazL9KWINlma9jAe-e4j7qFcn1K3OQx6Ag","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":619059,"status_code":200,"response_size":3794} -{"time":"2026-02-10T17:44:00.430541731Z","id":"f91426da-ebb3-4ebc-a206-d0d473d9f546","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"GET","uri":"/api/auth/users","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":642041,"latency_human":"642.041µs","bytes_in":0,"bytes_out":3794} -{"time":"2026-02-10T17:44:00.430547472Z","id":"f91426da-ebb3-4ebc-a206-d0d473d9f546","remote_ip":"127.0.0.1","host":"127.0.0.1:46839","method":"GET","uri":"/api/auth/users","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":659092,"latency_human":"659.092µs","bytes_in":0,"bytes_out":3794} ---- PASS: TestListUsersIncludesMaxDevices (0.18s) -=== RUN TestDeviceRegistrationFlow -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 [REQUEST] {"request_id":"93f6d174-c09a-4fe9-bf9c-fbb989ab482b","timestamp":"2026-02-10T17:44:00.431445769Z","method":"POST","path":"/api/devices/register","headers":{"Content-Type":"application/json"},"body":{"device_identifier":"kindle-test-hw-id-12345","device_name":"Test Kindle Paperwhite","device_type":"koreader"},"remote_addr":"192.0.2.1","duration":1549625,"status_code":201,"response_size":1263} -{"time":"2026-02-10T17:44:00.433021482Z","id":"93f6d174-c09a-4fe9-bf9c-fbb989ab482b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":1570223,"latency_human":"1.570223ms","bytes_in":0,"bytes_out":1263} -{"time":"2026-02-10T17:44:00.433030609Z","id":"93f6d174-c09a-4fe9-bf9c-fbb989ab482b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":1584820,"latency_human":"1.58482ms","bytes_in":0,"bytes_out":1263} -2026/02/10 17:44:00 [REQUEST] {"request_id":"ea365dce-7fc6-49d5-877f-9341a3e0343b","timestamp":"2026-02-10T17:44:00.433072016Z","method":"POST","path":"/api/devices/register/status","headers":{"Content-Type":"application/json"},"body":{"registration_id":"e6de7690-9914-41b0-83ce-eb08726e2176"},"remote_addr":"192.0.2.1","duration":27831,"status_code":200,"response_size":124} -{"time":"2026-02-10T17:44:00.433104195Z","id":"ea365dce-7fc6-49d5-877f-9341a3e0343b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register/status","user_agent":"","status":200,"error":"","latency":32250,"latency_human":"32.25µs","bytes_in":0,"bytes_out":124} -{"time":"2026-02-10T17:44:00.433105939Z","id":"ea365dce-7fc6-49d5-877f-9341a3e0343b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register/status","user_agent":"","status":200,"error":"","latency":34815,"latency_human":"34.815µs","bytes_in":0,"bytes_out":124} -DEBUG: refreshToken generated: 'b8779cbd-c52e-46d3-8244-ad2521a26bf0' -2026/02/10 17:44:00 [REQUEST] {"request_id":"ce20554c-df69-4d07-abd8-b2e7e7d97e5b","timestamp":"2026-02-10T17:44:00.433116689Z","method":"POST","path":"/api/auth/login","headers":{"Content-Type":"application/json"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"192.0.2.1","duration":57859122,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.491008782Z","id":"ce20554c-df69-4d07-abd8-b2e7e7d97e5b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/auth/login","user_agent":"","status":200,"error":"","latency":57889850,"latency_human":"57.88985ms","bytes_in":0,"bytes_out":579} -{"time":"2026-02-10T17:44:00.491019632Z","id":"ce20554c-df69-4d07-abd8-b2e7e7d97e5b","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/auth/login","user_agent":"","status":200,"error":"","latency":57902242,"latency_human":"57.902242ms","bytes_in":0,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"0e8524f8-61d5-470e-b128-925f2f6a6dfd","timestamp":"2026-02-10T17:44:00.491084432Z","method":"GET","path":"/api/devices/approve/e6de7690-9914-41b0-83ce-eb08726e2176","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjYxODZiMWQxLWE5YWItNDM1MS05OWJjLTM0NTU3OTM0MDYwYyIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.UqWTsJUMvwazL9KWINlma9jAe-e4j7qFcn1K3OQx6Ag","Content-Type":"application/json"},"remote_addr":"192.0.2.1","duration":34023,"status_code":200,"response_size":180} -{"time":"2026-02-10T17:44:00.491127723Z","id":"0e8524f8-61d5-470e-b128-925f2f6a6dfd","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/approve/e6de7690-9914-41b0-83ce-eb08726e2176","user_agent":"","status":200,"error":"","latency":43510,"latency_human":"43.51µs","bytes_in":0,"bytes_out":180} -{"time":"2026-02-10T17:44:00.4911318Z","id":"0e8524f8-61d5-470e-b128-925f2f6a6dfd","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/approve/e6de7690-9914-41b0-83ce-eb08726e2176","user_agent":"","status":200,"error":"","latency":48530,"latency_human":"48.53µs","bytes_in":0,"bytes_out":180} -2026/02/10 17:44:00 [REQUEST] {"request_id":"91c18c0d-c2eb-419c-a4d6-2bebd35d6ea7","timestamp":"2026-02-10T17:44:00.491151878Z","method":"POST","path":"/api/devices/register/status","headers":{"Content-Type":"application/json"},"body":{"registration_id":"e6de7690-9914-41b0-83ce-eb08726e2176"},"remote_addr":"192.0.2.1","duration":51327304,"status_code":200,"response_size":365} -{"time":"2026-02-10T17:44:00.542501864Z","id":"91c18c0d-c2eb-419c-a4d6-2bebd35d6ea7","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register/status","user_agent":"","status":200,"error":"","latency":51348864,"latency_human":"51.348864ms","bytes_in":0,"bytes_out":365} -{"time":"2026-02-10T17:44:00.542509358Z","id":"91c18c0d-c2eb-419c-a4d6-2bebd35d6ea7","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register/status","user_agent":"","status":200,"error":"","latency":51363452,"latency_human":"51.363452ms","bytes_in":0,"bytes_out":365} ---- PASS: TestDeviceRegistrationFlow (0.11s) -=== RUN TestListDevices -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '995ef4f8-7d9e-44ad-a1aa-b1b201d406fa' -2026/02/10 17:44:00 [REQUEST] {"request_id":"27976b13-5a4e-46b0-8395-5a364ff599d8","timestamp":"2026-02-10T17:44:00.566023682Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51401923,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.617459328Z","id":"27976b13-5a4e-46b0-8395-5a364ff599d8","remote_ip":"127.0.0.1","host":"127.0.0.1:45193","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51425497,"latency_human":"51.425497ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.617473604Z","id":"27976b13-5a4e-46b0-8395-5a364ff599d8","remote_ip":"127.0.0.1","host":"127.0.0.1:45193","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51448239,"latency_human":"51.448239ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"9e078435-f5ae-43c9-a4b1-e97afc35e977","timestamp":"2026-02-10T17:44:00.620352916Z","method":"GET","path":"/api/devices","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6Ijk4NDAyZjg2LThhOWQtNDUyZi1hNGVhLTE3MDI5MTA0NWVhYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.1kpw2LMe901GBm9CT6mJQnH1Muy9jaNT9tSICgVf5p8"},"remote_addr":"192.0.2.1","duration":1596292,"status_code":200,"response_size":321} -{"time":"2026-02-10T17:44:00.62197201Z","id":"9e078435-f5ae-43c9-a4b1-e97afc35e977","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices","user_agent":"","status":200,"error":"","latency":1614445,"latency_human":"1.614445ms","bytes_in":0,"bytes_out":321} -{"time":"2026-02-10T17:44:00.621983842Z","id":"9e078435-f5ae-43c9-a4b1-e97afc35e977","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices","user_agent":"","status":200,"error":"","latency":1631847,"latency_human":"1.631847ms","bytes_in":0,"bytes_out":321} ---- PASS: TestListDevices (0.08s) -=== RUN TestUpdateDevice -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '1b9b2819-46aa-4f64-bc20-9a50eb0e6f57' -2026/02/10 17:44:00 [REQUEST] {"request_id":"aacab3d2-1d26-47bb-880c-fc05278b215b","timestamp":"2026-02-10T17:44:00.644942095Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51098711,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.696072905Z","id":"aacab3d2-1d26-47bb-880c-fc05278b215b","remote_ip":"127.0.0.1","host":"127.0.0.1:42841","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51124508,"latency_human":"51.124508ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.696085779Z","id":"aacab3d2-1d26-47bb-880c-fc05278b215b","remote_ip":"127.0.0.1","host":"127.0.0.1:42841","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51141350,"latency_human":"51.14135ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"40d2278a-e47d-4d54-8769-d050f3116d00","timestamp":"2026-02-10T17:44:00.699150324Z","method":"PUT","path":"/api/devices/23addaf4-f802-42fd-a237-969c700c9c7c","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjY0NDE3NDYyLTFjYjEtNDQwOS05MWJhLTkxZGNhNWQzZTMwNCIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.FSki0qE4pcBpeH09stXVuLoFRUpagtSUV8jthiU7gpI","Content-Type":"application/json"},"body":{"device_name":"Updated Device Name","sync_enabled":false,"sync_frequency_minutes":10},"remote_addr":"192.0.2.1","duration":5558493,"status_code":200,"response_size":339} -{"time":"2026-02-10T17:44:00.704735115Z","id":"40d2278a-e47d-4d54-8769-d050f3116d00","remote_ip":"192.0.2.1","host":"example.com","method":"PUT","uri":"/api/devices/23addaf4-f802-42fd-a237-969c700c9c7c","user_agent":"","status":200,"error":"","latency":5582737,"latency_human":"5.582737ms","bytes_in":0,"bytes_out":339} -{"time":"2026-02-10T17:44:00.704745254Z","id":"40d2278a-e47d-4d54-8769-d050f3116d00","remote_ip":"192.0.2.1","host":"example.com","method":"PUT","uri":"/api/devices/23addaf4-f802-42fd-a237-969c700c9c7c","user_agent":"","status":200,"error":"","latency":5595020,"latency_human":"5.59502ms","bytes_in":0,"bytes_out":339} ---- PASS: TestUpdateDevice (0.08s) -=== RUN TestDeleteDevice -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: 'f391ec7e-1358-4a8f-990c-8c1538d8bebd' -2026/02/10 17:44:00 [REQUEST] {"request_id":"a39b1a8f-d9ec-44e5-848d-a13009d1330e","timestamp":"2026-02-10T17:44:00.730444122Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48793123,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.779284763Z","id":"a39b1a8f-d9ec-44e5-848d-a13009d1330e","remote_ip":"127.0.0.1","host":"127.0.0.1:37633","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48829711,"latency_human":"48.829711ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.779296605Z","id":"a39b1a8f-d9ec-44e5-848d-a13009d1330e","remote_ip":"127.0.0.1","host":"127.0.0.1:37633","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48851912,"latency_human":"48.851912ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"f29cc8e7-dde7-418a-80b8-0d3a179f01d5","timestamp":"2026-02-10T17:44:00.782425329Z","method":"DELETE","path":"/api/devices/d221f580-b2f8-4d05-921c-1df9f8901fb7","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjFmZTI2N2E4LTU1NzQtNDFiZi1iZTFhLTc5YjRhNDBlNWMzMSIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.CEn8sMQLnIz4fJsBFqwIJ0MvFwlkWq0dDtb6c2e2fQ8"},"remote_addr":"192.0.2.1","duration":3714021,"status_code":204,"response_size":0} -{"time":"2026-02-10T17:44:00.786165608Z","id":"f29cc8e7-dde7-418a-80b8-0d3a179f01d5","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/devices/d221f580-b2f8-4d05-921c-1df9f8901fb7","user_agent":"","status":204,"error":"","latency":3739207,"latency_human":"3.739207ms","bytes_in":0,"bytes_out":0} -{"time":"2026-02-10T17:44:00.786176869Z","id":"f29cc8e7-dde7-418a-80b8-0d3a179f01d5","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/devices/d221f580-b2f8-4d05-921c-1df9f8901fb7","user_agent":"","status":204,"error":"","latency":3747333,"latency_human":"3.747333ms","bytes_in":0,"bytes_out":0} ---- PASS: TestDeleteDevice (0.08s) -=== RUN TestDeviceAuthentication -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 [REQUEST] {"request_id":"1fc63e84-7ff5-455b-a9d6-39d06ff92ae5","timestamp":"2026-02-10T17:44:00.808409766Z","method":"GET","path":"/api/devices","headers":{"Authorization":"Bearer dev_343a7aaa-a4eb-492b-b81d-4b8d007f8a72"},"remote_addr":"192.0.2.1","duration":8807,"status_code":200,"response_size":0,"error":"code=401, message=invalid or expired jwt, internal=token is malformed: token contains an invalid number of segments"} -{"time":"2026-02-10T17:44:00.808452586Z","id":"1fc63e84-7ff5-455b-a9d6-39d06ff92ae5","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices","user_agent":"","status":401,"error":"code=401, message=invalid or expired jwt, internal=token is malformed: token contains an invalid number of segments","latency":39894,"latency_human":"39.894µs","bytes_in":0,"bytes_out":37} -{"time":"2026-02-10T17:44:00.808458737Z","id":"1fc63e84-7ff5-455b-a9d6-39d06ff92ae5","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices","user_agent":"","status":401,"error":"","latency":49592,"latency_human":"49.592µs","bytes_in":0,"bytes_out":37} ---- PASS: TestDeviceAuthentication (0.02s) -=== RUN TestListPendingRegistrations -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '82dc38e4-2183-43a0-ab84-626922ad6bea' -2026/02/10 17:44:00 [REQUEST] {"request_id":"9af41227-0c22-4d70-a326-b43e8fe2db16","timestamp":"2026-02-10T17:44:00.832402719Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49477322,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.881976921Z","id":"9af41227-0c22-4d70-a326-b43e8fe2db16","remote_ip":"127.0.0.1","host":"127.0.0.1:32991","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49560417,"latency_human":"49.560417ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.881993141Z","id":"9af41227-0c22-4d70-a326-b43e8fe2db16","remote_ip":"127.0.0.1","host":"127.0.0.1:32991","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":49590312,"latency_human":"49.590312ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"b1e7063f-9eef-4a1d-849c-d8764180ddca","timestamp":"2026-02-10T17:44:00.882307855Z","method":"GET","path":"/api/devices/pending","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjIyN2RmM2MyLTNlZGItNGJhOS1hODUyLWRkZDMyMjJiMTRhYiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.cokzpeyIBIUWw6EE9oY1TTusja6tstPyIU1VstKqyvE"},"remote_addr":"192.0.2.1","duration":72184,"status_code":200,"response_size":58} -{"time":"2026-02-10T17:44:00.882398654Z","id":"b1e7063f-9eef-4a1d-849c-d8764180ddca","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/pending","user_agent":"","status":200,"error":"","latency":89666,"latency_human":"89.666µs","bytes_in":0,"bytes_out":58} -{"time":"2026-02-10T17:44:00.882403492Z","id":"b1e7063f-9eef-4a1d-849c-d8764180ddca","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/pending","user_agent":"","status":200,"error":"","latency":96789,"latency_human":"96.789µs","bytes_in":0,"bytes_out":58} ---- PASS: TestListPendingRegistrations (0.07s) -=== RUN TestApproveDeviceRegistration -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '9477a446-f9cb-41b3-a4fd-f627c2f37433' -2026/02/10 17:44:00 [REQUEST] {"request_id":"e263c304-f2d4-49a0-a039-fed900838610","timestamp":"2026-02-10T17:44:00.901897018Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":48661959,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:00.950589935Z","id":"e263c304-f2d4-49a0-a039-fed900838610","remote_ip":"127.0.0.1","host":"127.0.0.1:34223","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48677739,"latency_human":"48.677739ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:00.950608489Z","id":"e263c304-f2d4-49a0-a039-fed900838610","remote_ip":"127.0.0.1","host":"127.0.0.1:34223","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":48711090,"latency_human":"48.71109ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:00 [REQUEST] {"request_id":"bdf66061-c487-4696-895d-44b8e5946e73","timestamp":"2026-02-10T17:44:00.950788723Z","method":"POST","path":"/api/devices/register","headers":{"Content-Type":"application/json"},"body":{"device_identifier":"test-approval-12345","device_name":"Test Device for Approval","device_type":"koreader"},"remote_addr":"192.0.2.1","duration":1911336,"status_code":201,"response_size":1247} -{"time":"2026-02-10T17:44:00.952719796Z","id":"bdf66061-c487-4696-895d-44b8e5946e73","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":1929109,"latency_human":"1.929109ms","bytes_in":0,"bytes_out":1247} -{"time":"2026-02-10T17:44:00.952726038Z","id":"bdf66061-c487-4696-895d-44b8e5946e73","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":1937284,"latency_human":"1.937284ms","bytes_in":0,"bytes_out":1247} -2026/02/10 17:44:00 [REQUEST] {"request_id":"5bdba6a3-22d7-4b04-b2d5-0276f78b2bfd","timestamp":"2026-02-10T17:44:00.952769208Z","method":"GET","path":"/api/devices/approve/fef00178-570a-4f8e-9307-311b6bd4d658","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDAsImlhdCI6MTc3MDc0NTQ0MCwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjVlZjA4NTdjLWM2MDEtNDEzMy1iZGRhLTYyMmFhNTQxODU1ZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.V6xWRdOLyJ2s2GIrj3hPCQ7uOaC15Q7--u2Cp4qXYD0"},"remote_addr":"192.0.2.1","duration":27220,"status_code":200,"response_size":182} -{"time":"2026-02-10T17:44:00.952809482Z","id":"5bdba6a3-22d7-4b04-b2d5-0276f78b2bfd","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/approve/fef00178-570a-4f8e-9307-311b6bd4d658","user_agent":"","status":200,"error":"","latency":40365,"latency_human":"40.365µs","bytes_in":0,"bytes_out":182} -{"time":"2026-02-10T17:44:00.952812147Z","id":"5bdba6a3-22d7-4b04-b2d5-0276f78b2bfd","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/devices/approve/fef00178-570a-4f8e-9307-311b6bd4d658","user_agent":"","status":200,"error":"","latency":47438,"latency_human":"47.438µs","bytes_in":0,"bytes_out":182} ---- PASS: TestApproveDeviceRegistration (0.07s) -=== RUN TestRejectDeviceRegistration -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:00 Starting sync queue processor (interval: 5s, batch: 50) -DEBUG: refreshToken generated: '53066009-1ae4-4303-9ad1-e810f56b9625' -2026/02/10 17:44:01 [REQUEST] {"request_id":"6ca59373-0d98-4ce5-b903-cad5aef5d598","timestamp":"2026-02-10T17:44:00.971578814Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":51534749,"status_code":200,"response_size":579} -{"time":"2026-02-10T17:44:01.023169156Z","id":"6ca59373-0d98-4ce5-b903-cad5aef5d598","remote_ip":"127.0.0.1","host":"127.0.0.1:35265","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51556680,"latency_human":"51.55668ms","bytes_in":59,"bytes_out":579} -{"time":"2026-02-10T17:44:01.023190175Z","id":"6ca59373-0d98-4ce5-b903-cad5aef5d598","remote_ip":"127.0.0.1","host":"127.0.0.1:35265","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":51602355,"latency_human":"51.602355ms","bytes_in":59,"bytes_out":579} -2026/02/10 17:44:01 [REQUEST] {"request_id":"2a21da57-05bb-40ae-a3b4-bfe31569d4e4","timestamp":"2026-02-10T17:44:01.023334623Z","method":"POST","path":"/api/devices/register","headers":{"Content-Type":"application/json"},"body":{"device_identifier":"test-rejection-12345","device_name":"Test Device for Rejection","device_type":"koreader"},"remote_addr":"192.0.2.1","duration":2134711,"status_code":201,"response_size":1243} -{"time":"2026-02-10T17:44:01.025481857Z","id":"2a21da57-05bb-40ae-a3b4-bfe31569d4e4","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":2146212,"latency_human":"2.146212ms","bytes_in":0,"bytes_out":1243} -{"time":"2026-02-10T17:44:01.025488219Z","id":"2a21da57-05bb-40ae-a3b4-bfe31569d4e4","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/register","user_agent":"","status":201,"error":"","latency":2153746,"latency_human":"2.153746ms","bytes_in":0,"bytes_out":1243} -2026/02/10 17:44:01 [REQUEST] {"request_id":"4d3f81db-0012-4382-b306-d8315226401e","timestamp":"2026-02-10T17:44:01.025510019Z","method":"POST","path":"/api/devices/reject/1313d0f9-151d-4d19-b58a-0c4d3fe106b5","headers":{"Authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzA3NDkwNDEsImlhdCI6MTc3MDc0NTQ0MSwidXNlcl9lbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIiwidXNlcl9pZCI6IjMxYmU0ZDhjLWNjYjMtNGNmOC04ZThmLWY5Y2M4N2Q2ODJjZiIsInVzZXJfcm9sZSI6ImFkbWluIiwidXNlcl91c2VybmFtZSI6InRlc3R1c2VyIn0.HaTpEsPoIuvU4A_9EJV9sBNfjxTi748qwkuRNUAgPl4"},"remote_addr":"192.0.2.1","duration":23283,"status_code":200,"response_size":43} -{"time":"2026-02-10T17:44:01.025539875Z","id":"4d3f81db-0012-4382-b306-d8315226401e","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/reject/1313d0f9-151d-4d19-b58a-0c4d3fe106b5","user_agent":"","status":200,"error":"","latency":29935,"latency_human":"29.935µs","bytes_in":0,"bytes_out":43} -{"time":"2026-02-10T17:44:01.025541608Z","id":"4d3f81db-0012-4382-b306-d8315226401e","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/devices/reject/1313d0f9-151d-4d19-b58a-0c4d3fe106b5","user_agent":"","status":200,"error":"","latency":32080,"latency_human":"32.08µs","bytes_in":0,"bytes_out":43} ---- PASS: TestRejectDeviceRegistration (0.07s) -=== RUN TestScannerEndpoints -=== RUN TestScannerEndpoints/POST_/api/scanner/scan_-_Scan_without_admin_role -=== RUN TestScannerEndpoints/POST_/api/scanner/watch/start_-_Start_watch_mode -=== RUN TestScannerEndpoints/POST_/api/scanner/watch/stop_-_Stop_watch_mode -=== RUN TestScannerEndpoints/GET_/api/scanner/watch/status_-_Get_watch_mode_status -=== RUN TestScannerEndpoints/GET_/api/scanner/status/:jobId_-_Get_job_status -=== RUN TestScannerEndpoints/GET_/api/scanner/status/:jobId_-_Job_not_found -=== RUN TestScannerEndpoints/POST_/api/scanner/scan_-_Successful_scan_(background_job) -=== RUN TestScannerEndpoints/POST_/api/scanner/start_-_Start_scanner_without_admin_role -=== RUN TestScannerEndpoints/POST_/api/scanner/start_-_Start_scanner_successfully -=== RUN TestScannerEndpoints/POST_/api/scanner/stop_-_Stop_scanner_without_admin_role -=== RUN TestScannerEndpoints/POST_/api/scanner/stop_-_Stop_scanner_successfully ---- PASS: TestScannerEndpoints (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/scan_-_Scan_without_admin_role (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/watch/start_-_Start_watch_mode (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/watch/stop_-_Stop_watch_mode (0.00s) - --- PASS: TestScannerEndpoints/GET_/api/scanner/watch/status_-_Get_watch_mode_status (0.00s) - --- PASS: TestScannerEndpoints/GET_/api/scanner/status/:jobId_-_Get_job_status (0.00s) - --- PASS: TestScannerEndpoints/GET_/api/scanner/status/:jobId_-_Job_not_found (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/scan_-_Successful_scan_(background_job) (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/start_-_Start_scanner_without_admin_role (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/start_-_Start_scanner_successfully (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/stop_-_Stop_scanner_without_admin_role (0.00s) - --- PASS: TestScannerEndpoints/POST_/api/scanner/stop_-_Stop_scanner_successfully (0.00s) -=== RUN TestEdgeCases -=== RUN TestEdgeCases/Empty_request_body -=== RUN TestEdgeCases/Malformed_JSON -=== RUN TestEdgeCases/Very_large_payload -=== RUN TestEdgeCases/SQL_Injection_attempt -=== RUN TestEdgeCases/XSS_attempt_in_fields -=== RUN TestEdgeCases/Rate_limiting_simulation ---- PASS: TestEdgeCases (0.00s) - --- PASS: TestEdgeCases/Empty_request_body (0.00s) - --- PASS: TestEdgeCases/Malformed_JSON (0.00s) - --- PASS: TestEdgeCases/Very_large_payload (0.00s) - --- PASS: TestEdgeCases/SQL_Injection_attempt (0.00s) - --- PASS: TestEdgeCases/XSS_attempt_in_fields (0.00s) - --- PASS: TestEdgeCases/Rate_limiting_simulation (0.00s) -=== RUN TestHTMXRequests -=== RUN TestHTMXRequests/Registration_with_HTMX_header -=== RUN TestHTMXRequests/Registration_error_with_HTMX_header ---- PASS: TestHTMXRequests (0.00s) - --- PASS: TestHTMXRequests/Registration_with_HTMX_header (0.00s) - --- PASS: TestHTMXRequests/Registration_error_with_HTMX_header (0.00s) -=== RUN TestConcurrentRequests -=== RUN TestConcurrentRequests/Multiple_concurrent_requests ---- PASS: TestConcurrentRequests (0.00s) - --- PASS: TestConcurrentRequests/Multiple_concurrent_requests (0.00s) -=== RUN TestJWTValidation -=== RUN TestJWTValidation/Valid_JWT_format -=== RUN TestJWTValidation/Invalid_JWT_-_no_Bearer_prefix -=== RUN TestJWTValidation/Invalid_JWT_-_malformed ---- PASS: TestJWTValidation (0.00s) - --- PASS: TestJWTValidation/Valid_JWT_format (0.00s) - --- PASS: TestJWTValidation/Invalid_JWT_-_no_Bearer_prefix (0.00s) - --- PASS: TestJWTValidation/Invalid_JWT_-_malformed (0.00s) -=== RUN TestListMediaItemsFiltering -=== RUN TestListMediaItemsFiltering/No_user_context_-_GET_/api/media-items/filtered_without_authentication -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_by_genre -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_by_language -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_by_year_range -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_by_has_cover -=== RUN TestListMediaItemsFiltering/User_context_-_Combine_multiple_filters -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_with_pagination -=== RUN TestListMediaItemsFiltering/User_context_-_Filter_with_sorting ---- PASS: TestListMediaItemsFiltering (0.00s) - --- PASS: TestListMediaItemsFiltering/No_user_context_-_GET_/api/media-items/filtered_without_authentication (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_by_genre (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_by_language (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_by_year_range (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_by_has_cover (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Combine_multiple_filters (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_with_pagination (0.00s) - --- PASS: TestListMediaItemsFiltering/User_context_-_Filter_with_sorting (0.00s) -=== RUN TestGoroutineCleanup - goroutine_leak_test.go:18: Initial goroutine count: 2042 -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - goroutine_leak_test.go:27: Goroutines while running: 2067 (delta: +25) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - goroutine_leak_test.go:35: Goroutines after shutdown: 2066 (delta: 24) - goroutine_leak_test.go:43: WARNING: 24 goroutines still running after shutdown (may be expected for test infrastructure) ---- PASS: TestGoroutineCleanup (0.80s) -=== RUN TestKoboInitialization -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/kobo_test.go:25 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestKoboInitialization - Messages: Failed to create test user ---- FAIL: TestKoboInitialization (0.00s) -=== RUN TestKoboLibrarySync -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/kobo_test.go:58 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestKoboLibrarySync - Messages: Failed to create test user ---- FAIL: TestKoboLibrarySync (0.00s) -=== RUN TestKoboMarkupSync -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/kobo_test.go:89 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestKoboMarkupSync - Messages: Failed to create test user ---- FAIL: TestKoboMarkupSync (0.00s) -=== RUN TestKoboBookmarkSync -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/kobo_test.go:159 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestKoboBookmarkSync - Messages: Failed to create test user ---- FAIL: TestKoboBookmarkSync (0.00s) -=== RUN TestKoboAnalyticsGettests -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/kobo_test.go:215 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestKoboAnalyticsGettests - Messages: Failed to create test user ---- FAIL: TestKoboAnalyticsGettests (0.00s) -=== RUN TestKoboDeviceHeaderParsing -=== RUN TestKoboDeviceHeaderParsing/valid_device_header ---- PASS: TestKoboDeviceHeaderParsing (0.00s) - --- PASS: TestKoboDeviceHeaderParsing/valid_device_header (0.00s) -=== RUN TestKOReaderSyncProgress_RequestBody -=== RUN TestKOReaderSyncProgress_RequestBody/valid_request_body -=== RUN TestKOReaderSyncProgress_RequestBody/request_with_multiple_books -=== RUN TestKOReaderSyncProgress_RequestBody/request_with_highlights_and_bookmarks ---- PASS: TestKOReaderSyncProgress_RequestBody (0.00s) - --- PASS: TestKOReaderSyncProgress_RequestBody/valid_request_body (0.00s) - --- PASS: TestKOReaderSyncProgress_RequestBody/request_with_multiple_books (0.00s) - --- PASS: TestKOReaderSyncProgress_RequestBody/request_with_highlights_and_bookmarks (0.00s) -=== RUN TestKOReaderMetadataParsing -=== RUN TestKOReaderMetadataParsing/parse_progress_data -=== RUN TestKOReaderMetadataParsing/parse_annotation_data ---- PASS: TestKOReaderMetadataParsing (0.00s) - --- PASS: TestKOReaderMetadataParsing/parse_progress_data (0.00s) - --- PASS: TestKOReaderMetadataParsing/parse_annotation_data (0.00s) -=== RUN TestKOReaderResponseFormats -=== RUN TestKOReaderResponseFormats/sync_progress_response -=== RUN TestKOReaderResponseFormats/metadata_response -=== RUN TestKOReaderResponseFormats/library_response ---- PASS: TestKOReaderResponseFormats (0.00s) - --- PASS: TestKOReaderResponseFormats/sync_progress_response (0.00s) - --- PASS: TestKOReaderResponseFormats/metadata_response (0.00s) - --- PASS: TestKOReaderResponseFormats/library_response (0.00s) -=== RUN TestKOReaderErrorHandling -=== RUN TestKOReaderErrorHandling/invalid_UUID_format -=== RUN TestKOReaderErrorHandling/missing_authorization_header -=== RUN TestKOReaderErrorHandling/invalid_percentage_value ---- PASS: TestKOReaderErrorHandling (0.00s) - --- PASS: TestKOReaderErrorHandling/invalid_UUID_format (0.00s) - --- PASS: TestKOReaderErrorHandling/missing_authorization_header (0.00s) - --- PASS: TestKOReaderErrorHandling/invalid_percentage_value (0.00s) -=== RUN TestKOReaderDeviceMatching -=== RUN TestKOReaderDeviceMatching/match_by_UUID -=== RUN TestKOReaderDeviceMatching/match_by_file_path -=== RUN TestKOReaderDeviceMatching/match_by_title_and_author ---- PASS: TestKOReaderDeviceMatching (0.00s) - --- PASS: TestKOReaderDeviceMatching/match_by_UUID (0.00s) - --- PASS: TestKOReaderDeviceMatching/match_by_file_path (0.00s) - --- PASS: TestKOReaderDeviceMatching/match_by_title_and_author (0.00s) -=== RUN TestAuthMiddleware -=== RUN TestAuthMiddleware/Missing_JWT -=== RUN TestAuthMiddleware/Invalid_JWT_format -=== RUN TestAuthMiddleware/Valid_JWT_format ---- PASS: TestAuthMiddleware (0.00s) - --- PASS: TestAuthMiddleware/Missing_JWT (0.00s) - --- PASS: TestAuthMiddleware/Invalid_JWT_format (0.00s) - --- PASS: TestAuthMiddleware/Valid_JWT_format (0.00s) -=== RUN TestLibraryCreationUnauthorized ---- PASS: TestLibraryCreationUnauthorized (0.00s) -=== RUN TestLibraryCreationWithValidAdmin ---- PASS: TestLibraryCreationWithValidAdmin (0.00s) -=== RUN TestLibraryTypesResponse ---- PASS: TestLibraryTypesResponse (0.00s) -=== RUN TestUserVisibleLibraries ---- PASS: TestUserVisibleLibraries (0.00s) -=== RUN TestMediaItemsList ---- PASS: TestMediaItemsList (0.00s) -=== RUN TestJSONValidation -=== RUN TestJSONValidation/Invalid_JSON -=== RUN TestJSONValidation/Invalid_library_type -=== RUN TestJSONValidation/Valid_request ---- PASS: TestJSONValidation (0.00s) - --- PASS: TestJSONValidation/Invalid_JSON (0.00s) - --- PASS: TestJSONValidation/Invalid_library_type (0.00s) - --- PASS: TestJSONValidation/Valid_request (0.00s) -=== RUN TestErrorHandling -=== RUN TestErrorHandling/Missing_library_ID -=== RUN TestErrorHandling/Invalid_UUID -=== RUN TestErrorHandling/Nonexistent_user_library ---- PASS: TestErrorHandling (0.00s) - --- PASS: TestErrorHandling/Missing_library_ID (0.00s) - --- PASS: TestErrorHandling/Invalid_UUID (0.00s) - --- PASS: TestErrorHandling/Nonexistent_user_library (0.00s) -=== RUN TestTest - main_test.go:8: 🧪 Comprehensive test suite verification - main_test.go:9: ✅ Testing framework is properly configured - main_test.go:10: 📋 Test discovery and execution should work correctly - main_test.go:11: 🎯 All edge cases should be covered ---- PASS: TestTest (0.00s) -=== RUN TestMediaBulkOperations -=== RUN TestMediaBulkOperations/BulkDeleteBooks_WithoutAuth -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"e44be025-139d-4fc3-989d-45368570759e","timestamp":"2026-02-10T17:44:01.843785044Z","method":"POST","path":"/api/books/bulk-delete","headers":{"Accept-Encoding":"gzip","Content-Length":"53","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"book_ids":["2109e9ad-c5bf-4c82-b40a-0d9b7f275326"]},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":10980,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.84382075Z","id":"e44be025-139d-4fc3-989d-45368570759e","remote_ip":"127.0.0.1","host":"127.0.0.1:46853","method":"POST","uri":"/api/books/bulk-delete","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":34644,"latency_human":"34.644µs","bytes_in":53,"bytes_out":39} -{"time":"2026-02-10T17:44:01.843826972Z","id":"e44be025-139d-4fc3-989d-45368570759e","remote_ip":"127.0.0.1","host":"127.0.0.1:46853","method":"POST","uri":"/api/books/bulk-delete","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":40515,"latency_human":"40.515µs","bytes_in":53,"bytes_out":39} -=== RUN TestMediaBulkOperations/BulkDeleteBooks_EmptyBookIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:40 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkDeleteBooks_EmptyBookIDs - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkDeleteBooks_InvalidBookIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:63 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkDeleteBooks_InvalidBookIDs - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkDeleteBooks_WithValidBooks -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:94 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkDeleteBooks_WithValidBooks - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkDeleteBooks_InvalidRequestBody -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:132 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkDeleteBooks_InvalidRequestBody - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_WithoutAuth -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"09b45e18-c1c2-4fe9-989e-82e55b13d5b5","timestamp":"2026-02-10T17:44:01.854816069Z","method":"POST","path":"/api/books/bulk-update","headers":{"Accept-Encoding":"gzip","Content-Length":"81","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"book_ids":["2121af14-aac3-4cc0-8fd9-4ac04f3757e7"],"updates":{"tags":["test"]}},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":15229,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.85485973Z","id":"09b45e18-c1c2-4fe9-989e-82e55b13d5b5","remote_ip":"127.0.0.1","host":"127.0.0.1:35773","method":"POST","uri":"/api/books/bulk-update","user_agent":"Go-http-client/1.1","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":41156,"latency_human":"41.156µs","bytes_in":81,"bytes_out":39} -{"time":"2026-02-10T17:44:01.854868046Z","id":"09b45e18-c1c2-4fe9-989e-82e55b13d5b5","remote_ip":"127.0.0.1","host":"127.0.0.1:35773","method":"POST","uri":"/api/books/bulk-update","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":48590,"latency_human":"48.59µs","bytes_in":81,"bytes_out":39} -=== RUN TestMediaBulkOperations/BulkUpdateBooks_EmptyBookIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:174 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_EmptyBookIDs - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_InvalidBookIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:200 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_InvalidBookIDs - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_UpdateTags -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:234 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_UpdateTags - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_UpdateReadingStatus -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:274 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_UpdateReadingStatus - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_UpdateMultipleFields -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:308 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_UpdateMultipleFields - Messages: Failed to create test user -=== RUN TestMediaBulkOperations/BulkUpdateBooks_InvalidRequestBody -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_bulk_test.go:344 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaBulkOperations/BulkUpdateBooks_InvalidRequestBody - Messages: Failed to create test user ---- FAIL: TestMediaBulkOperations (0.02s) - --- PASS: TestMediaBulkOperations/BulkDeleteBooks_WithoutAuth (0.00s) - --- FAIL: TestMediaBulkOperations/BulkDeleteBooks_EmptyBookIDs (0.00s) - --- FAIL: TestMediaBulkOperations/BulkDeleteBooks_InvalidBookIDs (0.00s) - --- FAIL: TestMediaBulkOperations/BulkDeleteBooks_WithValidBooks (0.00s) - --- FAIL: TestMediaBulkOperations/BulkDeleteBooks_InvalidRequestBody (0.00s) - --- PASS: TestMediaBulkOperations/BulkUpdateBooks_WithoutAuth (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_EmptyBookIDs (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_InvalidBookIDs (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_UpdateTags (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_UpdateReadingStatus (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_UpdateMultipleFields (0.00s) - --- FAIL: TestMediaBulkOperations/BulkUpdateBooks_InvalidRequestBody (0.00s) -=== RUN TestMediaItemISBNNormalization -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_item_isbn_test.go:49 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaItemISBNNormalization - Messages: Failed to create test user ---- FAIL: TestMediaItemISBNNormalization (0.00s) -=== RUN TestMediaItemISBNEdgeCases -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_item_isbn_test.go:137 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaItemISBNEdgeCases - Messages: Failed to create test user ---- FAIL: TestMediaItemISBNEdgeCases (0.00s) -=== RUN TestMediaItemsPagination -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_item_isbn_test.go:222 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaItemsPagination - Messages: Failed to create test user ---- FAIL: TestMediaItemsPagination (0.00s) -=== RUN TestMediaItemLibraryRequirement -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_item_isbn_test.go:329 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestMediaItemLibraryRequirement - Messages: Failed to create test user ---- FAIL: TestMediaItemLibraryRequirement (0.00s) -=== RUN TestUpdateMediaItemISBN -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/media_item_isbn_test.go:392 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestUpdateMediaItemISBN - Messages: Failed to create test user ---- FAIL: TestUpdateMediaItemISBN (0.00s) -=== RUN TestUsernameWhitespaceValidation - new_fixes_test.go:16: Requires integration test with real handler ---- SKIP: TestUsernameWhitespaceValidation (0.00s) -=== RUN TestRoleCaseNormalization - new_fixes_test.go:22: Requires integration test with real handler ---- SKIP: TestRoleCaseNormalization (0.00s) -=== RUN TestPaginationMaxLimit - new_fixes_test.go:28: Already tested in TestPaginationAndFiltering ---- SKIP: TestPaginationMaxLimit (0.00s) -=== RUN TestPaginationNegativeOffset - new_fixes_test.go:34: Already tested in TestPaginationAndFiltering ---- SKIP: TestPaginationNegativeOffset (0.00s) -=== RUN TestRateLimiter ---- PASS: TestRateLimiter (0.00s) -=== RUN TestOPDSEndpoints -=== RUN TestOPDSEndpoints/GetDeviceCatalog_WithoutDeviceAuth -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"c634830b-f19b-4179-b821-3f2e8695eee0","timestamp":"2026-02-10T17:44:01.87772446Z","method":"GET","path":"/opds/devices/f77e5d90-0eec-4ed4-b295-6a6cfbd640a1/catalog","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":829599,"status_code":500,"response_size":407} -{"time":"2026-02-10T17:44:01.878576571Z","id":"c634830b-f19b-4179-b821-3f2e8695eee0","remote_ip":"127.0.0.1","host":"127.0.0.1:33673","method":"GET","uri":"/opds/devices/f77e5d90-0eec-4ed4-b295-6a6cfbd640a1/catalog","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":847543,"latency_human":"847.543µs","bytes_in":0,"bytes_out":407} -{"time":"2026-02-10T17:44:01.878582221Z","id":"c634830b-f19b-4179-b821-3f2e8695eee0","remote_ip":"127.0.0.1","host":"127.0.0.1:33673","method":"GET","uri":"/opds/devices/f77e5d90-0eec-4ed4-b295-6a6cfbd640a1/catalog","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":858844,"latency_human":"858.844µs","bytes_in":0,"bytes_out":407} - opds_test.go:28: - Error Trace: /app/cmd/server/tests/opds_test.go:28 - Error: Should be true - Test: TestOPDSEndpoints/GetDeviceCatalog_WithoutDeviceAuth -=== RUN TestOPDSEndpoints/GetDeviceCatalog_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"571ed534-5e9a-4be6-a9bf-cb87751c7bdb","timestamp":"2026-02-10T17:44:01.879442838Z","method":"GET","path":"/opds/devices/invalid-uuid/catalog","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":967785,"status_code":500,"response_size":407} -{"time":"2026-02-10T17:44:01.880431232Z","id":"571ed534-5e9a-4be6-a9bf-cb87751c7bdb","remote_ip":"127.0.0.1","host":"127.0.0.1:38419","method":"GET","uri":"/opds/devices/invalid-uuid/catalog","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":985528,"latency_human":"985.528µs","bytes_in":0,"bytes_out":407} -{"time":"2026-02-10T17:44:01.880437303Z","id":"571ed534-5e9a-4be6-a9bf-cb87751c7bdb","remote_ip":"127.0.0.1","host":"127.0.0.1:38419","method":"GET","uri":"/opds/devices/invalid-uuid/catalog","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":994324,"latency_human":"994.324µs","bytes_in":0,"bytes_out":407} - opds_test.go:43: - Error Trace: /app/cmd/server/tests/opds_test.go:43 - Error: Not equal: - expected: 400 - actual : 500 - Test: TestOPDSEndpoints/GetDeviceCatalog_InvalidDeviceID -=== RUN TestOPDSEndpoints/GetDeviceCatalog_ValidDevice -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:50 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/GetDeviceCatalog_ValidDevice - Messages: Failed to create test user -=== RUN TestOPDSEndpoints/SearchDeviceCatalog_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"fb35f4d3-f466-4e11-877a-e37abd499eeb","timestamp":"2026-02-10T17:44:01.88446228Z","method":"GET","path":"/opds/devices/invalid-uuid/search","query_params":{"query":"test"},"headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":44633,"status_code":400,"response_size":407} -{"time":"2026-02-10T17:44:01.884525658Z","id":"fb35f4d3-f466-4e11-877a-e37abd499eeb","remote_ip":"127.0.0.1","host":"127.0.0.1:41723","method":"GET","uri":"/opds/devices/invalid-uuid/search?query=test","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":62265,"latency_human":"62.265µs","bytes_in":0,"bytes_out":407} -{"time":"2026-02-10T17:44:01.884530346Z","id":"fb35f4d3-f466-4e11-877a-e37abd499eeb","remote_ip":"127.0.0.1","host":"127.0.0.1:41723","method":"GET","uri":"/opds/devices/invalid-uuid/search?query=test","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":68177,"latency_human":"68.177µs","bytes_in":0,"bytes_out":407} -=== RUN TestOPDSEndpoints/SearchDeviceCatalog_ValidDevice -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:85 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/SearchDeviceCatalog_ValidDevice - Messages: Failed to create test user -=== RUN TestOPDSEndpoints/GetDeviceNavigation_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"a66cd76f-d6a0-4382-9597-358d0c80c9ca","timestamp":"2026-02-10T17:44:01.88755603Z","method":"GET","path":"/opds/devices/invalid-uuid/nav","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":966573,"status_code":500,"response_size":407} -{"time":"2026-02-10T17:44:01.888541237Z","id":"a66cd76f-d6a0-4382-9597-358d0c80c9ca","remote_ip":"127.0.0.1","host":"127.0.0.1:34655","method":"GET","uri":"/opds/devices/invalid-uuid/nav","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":983304,"latency_human":"983.304µs","bytes_in":0,"bytes_out":407} -{"time":"2026-02-10T17:44:01.888548601Z","id":"a66cd76f-d6a0-4382-9597-358d0c80c9ca","remote_ip":"127.0.0.1","host":"127.0.0.1:34655","method":"GET","uri":"/opds/devices/invalid-uuid/nav","user_agent":"Go-http-client/1.1","status":500,"error":"","latency":991079,"latency_human":"991.079µs","bytes_in":0,"bytes_out":407} - opds_test.go:111: - Error Trace: /app/cmd/server/tests/opds_test.go:111 - Error: Not equal: - expected: 400 - actual : 500 - Test: TestOPDSEndpoints/GetDeviceNavigation_InvalidDeviceID -=== RUN TestOPDSEndpoints/GetDeviceNavigation_ValidDevice -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:118 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/GetDeviceNavigation_ValidDevice - Messages: Failed to create test user -=== RUN TestOPDSEndpoints/DownloadBook_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"fc3f3fb9-24fe-4d16-8df5-cde1f7a639e6","timestamp":"2026-02-10T17:44:01.891254241Z","method":"GET","path":"/opds/devices/invalid-uuid/download/f15f96d7-b604-4d65-902b-754c81b3aa75","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":13184,"status_code":400,"response_size":30} -{"time":"2026-02-10T17:44:01.891282794Z","id":"fc3f3fb9-24fe-4d16-8df5-cde1f7a639e6","remote_ip":"127.0.0.1","host":"127.0.0.1:42783","method":"GET","uri":"/opds/devices/invalid-uuid/download/f15f96d7-b604-4d65-902b-754c81b3aa75","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":26760,"latency_human":"26.76µs","bytes_in":0,"bytes_out":30} -{"time":"2026-02-10T17:44:01.891291931Z","id":"fc3f3fb9-24fe-4d16-8df5-cde1f7a639e6","remote_ip":"127.0.0.1","host":"127.0.0.1:42783","method":"GET","uri":"/opds/devices/invalid-uuid/download/f15f96d7-b604-4d65-902b-754c81b3aa75","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":33813,"latency_human":"33.813µs","bytes_in":0,"bytes_out":30} -=== RUN TestOPDSEndpoints/DownloadBook_InvalidBookID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"d13420d3-aad8-403d-937e-6c320877e593","timestamp":"2026-02-10T17:44:01.89194377Z","method":"GET","path":"/opds/devices/44d2ee13-a3a8-4f00-839f-52de8f1dac67/download/invalid-uuid","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":9307,"status_code":400,"response_size":28} -{"time":"2026-02-10T17:44:01.891961823Z","id":"d13420d3-aad8-403d-937e-6c320877e593","remote_ip":"127.0.0.1","host":"127.0.0.1:34245","method":"GET","uri":"/opds/devices/44d2ee13-a3a8-4f00-839f-52de8f1dac67/download/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":17433,"latency_human":"17.433µs","bytes_in":0,"bytes_out":28} -{"time":"2026-02-10T17:44:01.891965871Z","id":"d13420d3-aad8-403d-937e-6c320877e593","remote_ip":"127.0.0.1","host":"127.0.0.1:34245","method":"GET","uri":"/opds/devices/44d2ee13-a3a8-4f00-839f-52de8f1dac67/download/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":21991,"latency_human":"21.991µs","bytes_in":0,"bytes_out":28} -=== RUN TestOPDSEndpoints/DownloadBook_ValidIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:167 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/DownloadBook_ValidIDs - Messages: Failed to create test user -=== RUN TestOPDSEndpoints/GetCoverImage_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"0a5e6503-ae20-4368-b873-887f09877367","timestamp":"2026-02-10T17:44:01.894627489Z","method":"GET","path":"/opds/devices/invalid-uuid/cover/d8824a0b-1ecc-4662-a250-29fdbba97331","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":25587,"status_code":400,"response_size":30} -{"time":"2026-02-10T17:44:01.894675197Z","id":"0a5e6503-ae20-4368-b873-887f09877367","remote_ip":"127.0.0.1","host":"127.0.0.1:46759","method":"GET","uri":"/opds/devices/invalid-uuid/cover/d8824a0b-1ecc-4662-a250-29fdbba97331","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":45304,"latency_human":"45.304µs","bytes_in":0,"bytes_out":30} -{"time":"2026-02-10T17:44:01.894683292Z","id":"0a5e6503-ae20-4368-b873-887f09877367","remote_ip":"127.0.0.1","host":"127.0.0.1:46759","method":"GET","uri":"/opds/devices/invalid-uuid/cover/d8824a0b-1ecc-4662-a250-29fdbba97331","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":55874,"latency_human":"55.874µs","bytes_in":0,"bytes_out":30} -=== RUN TestOPDSEndpoints/GetCoverImage_InvalidBookID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"9e162c5a-8c9d-4882-b434-171dd0438acc","timestamp":"2026-02-10T17:44:01.895570038Z","method":"GET","path":"/opds/devices/cf2f0802-37b1-426b-a36b-20cc41a18051/cover/invalid-uuid","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":14727,"status_code":400,"response_size":28} -{"time":"2026-02-10T17:44:01.895596817Z","id":"9e162c5a-8c9d-4882-b434-171dd0438acc","remote_ip":"127.0.0.1","host":"127.0.0.1:43741","method":"GET","uri":"/opds/devices/cf2f0802-37b1-426b-a36b-20cc41a18051/cover/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":24516,"latency_human":"24.516µs","bytes_in":0,"bytes_out":28} -{"time":"2026-02-10T17:44:01.895601827Z","id":"9e162c5a-8c9d-4882-b434-171dd0438acc","remote_ip":"127.0.0.1","host":"127.0.0.1:43741","method":"GET","uri":"/opds/devices/cf2f0802-37b1-426b-a36b-20cc41a18051/cover/invalid-uuid","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":31929,"latency_human":"31.929µs","bytes_in":0,"bytes_out":28} -=== RUN TestOPDSEndpoints/GetCoverImage_ValidIDs -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:218 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/GetCoverImage_ValidIDs - Messages: Failed to create test user -=== RUN TestOPDSEndpoints/ListFormats_InvalidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"b9fc23c4-9c93-4940-b51b-071f8c6927f9","timestamp":"2026-02-10T17:44:01.898895557Z","method":"GET","path":"/opds/devices/invalid-uuid/formats/7128425f-3fb4-44f5-b192-0f716d386bc8","headers":{"Accept-Encoding":"gzip","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":41978,"status_code":400,"response_size":30} -{"time":"2026-02-10T17:44:01.898982869Z","id":"b9fc23c4-9c93-4940-b51b-071f8c6927f9","remote_ip":"127.0.0.1","host":"127.0.0.1:41527","method":"GET","uri":"/opds/devices/invalid-uuid/formats/7128425f-3fb4-44f5-b192-0f716d386bc8","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":83004,"latency_human":"83.004µs","bytes_in":0,"bytes_out":30} -{"time":"2026-02-10T17:44:01.899003938Z","id":"b9fc23c4-9c93-4940-b51b-071f8c6927f9","remote_ip":"127.0.0.1","host":"127.0.0.1:41527","method":"GET","uri":"/opds/devices/invalid-uuid/formats/7128425f-3fb4-44f5-b192-0f716d386bc8","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":105306,"latency_human":"105.306µs","bytes_in":0,"bytes_out":30} -=== RUN TestOPDSEndpoints/ListFormats_ValidDeviceID -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:253 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEndpoints/ListFormats_ValidDeviceID - Messages: Failed to create test user ---- FAIL: TestOPDSEndpoints (0.02s) - --- FAIL: TestOPDSEndpoints/GetDeviceCatalog_WithoutDeviceAuth (0.00s) - --- FAIL: TestOPDSEndpoints/GetDeviceCatalog_InvalidDeviceID (0.00s) - --- FAIL: TestOPDSEndpoints/GetDeviceCatalog_ValidDevice (0.00s) - --- PASS: TestOPDSEndpoints/SearchDeviceCatalog_InvalidDeviceID (0.00s) - --- FAIL: TestOPDSEndpoints/SearchDeviceCatalog_ValidDevice (0.00s) - --- FAIL: TestOPDSEndpoints/GetDeviceNavigation_InvalidDeviceID (0.00s) - --- FAIL: TestOPDSEndpoints/GetDeviceNavigation_ValidDevice (0.00s) - --- PASS: TestOPDSEndpoints/DownloadBook_InvalidDeviceID (0.00s) - --- PASS: TestOPDSEndpoints/DownloadBook_InvalidBookID (0.00s) - --- FAIL: TestOPDSEndpoints/DownloadBook_ValidIDs (0.00s) - --- PASS: TestOPDSEndpoints/GetCoverImage_InvalidDeviceID (0.00s) - --- PASS: TestOPDSEndpoints/GetCoverImage_InvalidBookID (0.00s) - --- FAIL: TestOPDSEndpoints/GetCoverImage_ValidIDs (0.00s) - --- PASS: TestOPDSEndpoints/ListFormats_InvalidDeviceID (0.00s) - --- FAIL: TestOPDSEndpoints/ListFormats_ValidDeviceID (0.00s) -=== RUN TestOPDSConversion -=== RUN TestOPDSConversion/DownloadKEPUB_FormatParameter -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:276 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSConversion/DownloadKEPUB_FormatParameter - Messages: Failed to create test user -=== RUN TestOPDSConversion/DownloadEPUB_DefaultFormat -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:298 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSConversion/DownloadEPUB_DefaultFormat - Messages: Failed to create test user -=== RUN TestOPDSConversion/Download_UnsupportedFormat -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:319 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSConversion/Download_UnsupportedFormat - Messages: Failed to create test user ---- FAIL: TestOPDSConversion (0.01s) - --- FAIL: TestOPDSConversion/DownloadKEPUB_FormatParameter (0.00s) - --- FAIL: TestOPDSConversion/DownloadEPUB_DefaultFormat (0.00s) - --- FAIL: TestOPDSConversion/Download_UnsupportedFormat (0.00s) -=== RUN TestOPDSEdgeCases -=== RUN TestOPDSEdgeCases/Catalog_EmptyLibrary -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:343 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEdgeCases/Catalog_EmptyLibrary - Messages: Failed to create test user -=== RUN TestOPDSEdgeCases/Search_SpecialCharacters -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:362 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEdgeCases/Search_SpecialCharacters - Messages: Failed to create test user -=== RUN TestOPDSEdgeCases/Search_EmptyQuery -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/opds_test.go:382 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestOPDSEdgeCases/Search_EmptyQuery - Messages: Failed to create test user ---- FAIL: TestOPDSEdgeCases (0.01s) - --- FAIL: TestOPDSEdgeCases/Catalog_EmptyLibrary (0.00s) - --- FAIL: TestOPDSEdgeCases/Search_SpecialCharacters (0.00s) - --- FAIL: TestOPDSEdgeCases/Search_EmptyQuery (0.00s) -=== RUN TestListAllQueueItems_Admin -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"353e7ce2-f951-4f39-b133-324753b32efa","timestamp":"2026-02-10T17:44:01.918512491Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":652391,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.919189958Z","id":"353e7ce2-f951-4f39-b133-324753b32efa","remote_ip":"127.0.0.1","host":"127.0.0.1:46863","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":683919,"latency_human":"683.919µs","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.919198975Z","id":"353e7ce2-f951-4f39-b133-324753b32efa","remote_ip":"127.0.0.1","host":"127.0.0.1:46863","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":693897,"latency_human":"693.897µs","bytes_in":59,"bytes_out":32} - queue_test.go:254: - Error Trace: /app/cmd/server/tests/queue_test.go:254 - /app/cmd/server/tests/queue_test.go:23 - Error: Should be true - Test: TestListAllQueueItems_Admin - Messages: Should have access_token ---- FAIL: TestListAllQueueItems_Admin (0.00s) -=== RUN TestGetDeviceQueueStats -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/queue_test.go:41 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestGetDeviceQueueStats - Messages: Failed to create test user ---- FAIL: TestGetDeviceQueueStats (0.00s) -=== RUN TestListDeviceQueueItems -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/queue_test.go:78 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestListDeviceQueueItems - Messages: Failed to create test user ---- FAIL: TestListDeviceQueueItems (0.00s) -=== RUN TestRetryQueueItem -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) -2026/02/10 17:44:01 Error listing pending items: failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/queue_test.go:115 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestRetryQueueItem - Messages: Failed to create test user ---- FAIL: TestRetryQueueItem (0.00s) -=== RUN TestDeleteQueueItem -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/queue_test.go:131 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestDeleteQueueItem - Messages: Failed to create test user ---- FAIL: TestDeleteQueueItem (0.00s) -=== RUN TestClearDeviceQueue -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) - test_helpers.go:406: - Error Trace: /app/cmd/server/tests/test_helpers.go:406 - /app/cmd/server/tests/test_helpers.go:351 - /app/cmd/server/tests/queue_test.go:147 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestClearDeviceQueue - Messages: Failed to create test user ---- FAIL: TestClearDeviceQueue (0.01s) -=== RUN TestQueueEndpoints_Unauthorized -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -=== RUN TestQueueEndpoints_Unauthorized/ListAllQueueItems -2026/02/10 17:44:01 [REQUEST] {"request_id":"31145cb3-ac4f-4e5e-8aaf-ad5f93f04966","timestamp":"2026-02-10T17:44:01.93888644Z","method":"GET","path":"/api/queue/items","remote_addr":"192.0.2.1","duration":12533,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.938921585Z","id":"31145cb3-ac4f-4e5e-8aaf-ad5f93f04966","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/items","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":34463,"latency_human":"34.463µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.938926063Z","id":"31145cb3-ac4f-4e5e-8aaf-ad5f93f04966","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/items","user_agent":"","status":401,"error":"","latency":40034,"latency_human":"40.034µs","bytes_in":0,"bytes_out":39} -=== RUN TestQueueEndpoints_Unauthorized/GetDeviceQueueStats -2026/02/10 17:44:01 [REQUEST] {"request_id":"59ad09eb-496c-40f1-83d8-b061dd5a1073","timestamp":"2026-02-10T17:44:01.938955748Z","method":"GET","path":"/api/queue/devices/test-device-id/stats","remote_addr":"192.0.2.1","duration":601,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.938964635Z","id":"59ad09eb-496c-40f1-83d8-b061dd5a1073","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/devices/test-device-id/stats","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":8887,"latency_human":"8.887µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.938966809Z","id":"59ad09eb-496c-40f1-83d8-b061dd5a1073","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/devices/test-device-id/stats","user_agent":"","status":401,"error":"","latency":11341,"latency_human":"11.341µs","bytes_in":0,"bytes_out":39} -=== RUN TestQueueEndpoints_Unauthorized/ListDeviceQueueItems -2026/02/10 17:44:01 [REQUEST] {"request_id":"c9626dd1-7fcf-4065-98ee-fe83f8fecd0c","timestamp":"2026-02-10T17:44:01.93897817Z","method":"GET","path":"/api/queue/devices/test-device-id/items","remote_addr":"192.0.2.1","duration":651,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.938983921Z","id":"c9626dd1-7fcf-4065-98ee-fe83f8fecd0c","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/devices/test-device-id/items","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":5771,"latency_human":"5.771µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.938985975Z","id":"c9626dd1-7fcf-4065-98ee-fe83f8fecd0c","remote_ip":"192.0.2.1","host":"example.com","method":"GET","uri":"/api/queue/devices/test-device-id/items","user_agent":"","status":401,"error":"","latency":7984,"latency_human":"7.984µs","bytes_in":0,"bytes_out":39} -=== RUN TestQueueEndpoints_Unauthorized/RetryQueueItem -2026/02/10 17:44:01 [REQUEST] {"request_id":"a230a357-d6d5-4a1d-a404-2f378c991a00","timestamp":"2026-02-10T17:44:01.939000441Z","method":"POST","path":"/api/queue/items/test-item-id/retry","remote_addr":"192.0.2.1","duration":1694,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.939006202Z","id":"a230a357-d6d5-4a1d-a404-2f378c991a00","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/queue/items/test-item-id/retry","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":5781,"latency_human":"5.781µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.939012063Z","id":"a230a357-d6d5-4a1d-a404-2f378c991a00","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/queue/items/test-item-id/retry","user_agent":"","status":401,"error":"","latency":11772,"latency_human":"11.772µs","bytes_in":0,"bytes_out":39} -=== RUN TestQueueEndpoints_Unauthorized/DeleteQueueItem -2026/02/10 17:44:01 [REQUEST] {"request_id":"b223342c-5f2e-4cc0-854a-049977518c95","timestamp":"2026-02-10T17:44:01.939021971Z","method":"DELETE","path":"/api/queue/items/test-item-id","remote_addr":"192.0.2.1","duration":1203,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.9390269Z","id":"b223342c-5f2e-4cc0-854a-049977518c95","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/queue/items/test-item-id","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":4959,"latency_human":"4.959µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.939028844Z","id":"b223342c-5f2e-4cc0-854a-049977518c95","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/queue/items/test-item-id","user_agent":"","status":401,"error":"","latency":7133,"latency_human":"7.133µs","bytes_in":0,"bytes_out":39} -=== RUN TestQueueEndpoints_Unauthorized/ClearDeviceQueue -2026/02/10 17:44:01 [REQUEST] {"request_id":"ab8d283e-5675-41ed-83b0-f55b26eca2dd","timestamp":"2026-02-10T17:44:01.939041828Z","method":"DELETE","path":"/api/queue/devices/test-device-id/clear","remote_addr":"192.0.2.1","duration":501,"status_code":200,"response_size":0,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header"} -{"time":"2026-02-10T17:44:01.939045896Z","id":"ab8d283e-5675-41ed-83b0-f55b26eca2dd","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/queue/devices/test-device-id/clear","user_agent":"","status":401,"error":"code=401, message=missing or malformed jwt, internal=missing value in request header","latency":4108,"latency_human":"4.108µs","bytes_in":0,"bytes_out":39} -{"time":"2026-02-10T17:44:01.939047769Z","id":"ab8d283e-5675-41ed-83b0-f55b26eca2dd","remote_ip":"192.0.2.1","host":"example.com","method":"DELETE","uri":"/api/queue/devices/test-device-id/clear","user_agent":"","status":401,"error":"","latency":6201,"latency_human":"6.201µs","bytes_in":0,"bytes_out":39} ---- PASS: TestQueueEndpoints_Unauthorized (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/ListAllQueueItems (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/GetDeviceQueueStats (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/ListDeviceQueueItems (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/RetryQueueItem (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/DeleteQueueItem (0.00s) - --- PASS: TestQueueEndpoints_Unauthorized/ClearDeviceQueue (0.00s) -=== RUN TestRefreshTokenFlow -=== RUN TestRefreshTokenFlow/RefreshToken_MissingToken -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"01019a42-3564-433c-9f44-4334869f7caf","timestamp":"2026-02-10T17:44:01.939801778Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"2","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":49001,"status_code":400,"response_size":123} -{"time":"2026-02-10T17:44:01.939867861Z","id":"01019a42-3564-433c-9f44-4334869f7caf","remote_ip":"127.0.0.1","host":"127.0.0.1:45785","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":64980,"latency_human":"64.98µs","bytes_in":2,"bytes_out":123} -{"time":"2026-02-10T17:44:01.93987264Z","id":"01019a42-3564-433c-9f44-4334869f7caf","remote_ip":"127.0.0.1","host":"127.0.0.1:45785","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":70821,"latency_human":"70.821µs","bytes_in":2,"bytes_out":123} -=== RUN TestRefreshTokenFlow/RefreshToken_InvalidTokenFormat -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"97cd3f24-9179-40e9-9812-65854156b8ad","timestamp":"2026-02-10T17:44:01.940585131Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"41","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"refresh_token":"not-a-valid-jwt-token"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":20018,"status_code":400,"response_size":41} -{"time":"2026-02-10T17:44:01.940614626Z","id":"97cd3f24-9179-40e9-9812-65854156b8ad","remote_ip":"127.0.0.1","host":"127.0.0.1:44849","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":28713,"latency_human":"28.713µs","bytes_in":41,"bytes_out":41} -{"time":"2026-02-10T17:44:01.940618253Z","id":"97cd3f24-9179-40e9-9812-65854156b8ad","remote_ip":"127.0.0.1","host":"127.0.0.1:44849","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":33302,"latency_human":"33.302µs","bytes_in":41,"bytes_out":41} - refresh_token_test.go:50: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:50 - Error: Not equal: - expected: 401 - actual : 400 - Test: TestRefreshTokenFlow/RefreshToken_InvalidTokenFormat -=== RUN TestRefreshTokenFlow/RefreshToken_ExpiredToken -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"5ac796c9-bef4-4af6-82a9-387870a22e0e","timestamp":"2026-02-10T17:44:01.941349129Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"89","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjAwMDAwMDB9.expired"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":17142,"status_code":400,"response_size":41} -{"time":"2026-02-10T17:44:01.941377842Z","id":"5ac796c9-bef4-4af6-82a9-387870a22e0e","remote_ip":"127.0.0.1","host":"127.0.0.1:39643","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":28223,"latency_human":"28.223µs","bytes_in":89,"bytes_out":41} -{"time":"2026-02-10T17:44:01.941381288Z","id":"5ac796c9-bef4-4af6-82a9-387870a22e0e","remote_ip":"127.0.0.1","host":"127.0.0.1:39643","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":32240,"latency_human":"32.24µs","bytes_in":89,"bytes_out":41} - refresh_token_test.go:71: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:71 - Error: Not equal: - expected: 401 - actual : 400 - Test: TestRefreshTokenFlow/RefreshToken_ExpiredToken -=== RUN TestRefreshTokenFlow/RefreshToken_ValidToken -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"1a85e0ea-cec5-466c-9072-0217469835dc","timestamp":"2026-02-10T17:44:01.942448298Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":1054326,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.943516359Z","id":"1a85e0ea-cec5-466c-9072-0217469835dc","remote_ip":"127.0.0.1","host":"127.0.0.1:36253","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":1066348,"latency_human":"1.066348ms","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.943521028Z","id":"1a85e0ea-cec5-466c-9072-0217469835dc","remote_ip":"127.0.0.1","host":"127.0.0.1:36253","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":1072700,"latency_human":"1.0727ms","bytes_in":59,"bytes_out":32} - refresh_token_test.go:93: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:93 - Error: Not equal: - expected: 200 - actual : 401 - Test: TestRefreshTokenFlow/RefreshToken_ValidToken -=== RUN TestRefreshTokenFlow/RefreshToken_InvalidRequestBody -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"f719292b-3b39-417d-a59d-9251e52e1a81","timestamp":"2026-02-10T17:44:01.944291227Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"12","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":23604,"status_code":400,"response_size":28} -{"time":"2026-02-10T17:44:01.944328196Z","id":"f719292b-3b39-417d-a59d-9251e52e1a81","remote_ip":"127.0.0.1","host":"127.0.0.1:41969","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":36258,"latency_human":"36.258µs","bytes_in":12,"bytes_out":28} -{"time":"2026-02-10T17:44:01.944334167Z","id":"f719292b-3b39-417d-a59d-9251e52e1a81","remote_ip":"127.0.0.1","host":"127.0.0.1:41969","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":42108,"latency_human":"42.108µs","bytes_in":12,"bytes_out":28} -=== RUN TestRefreshTokenFlow/RefreshToken_MissingContentType -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"9fd0cbef-6417-460c-9e18-c82d779671da","timestamp":"2026-02-10T17:44:01.945011173Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"30","User-Agent":"Go-http-client/1.1"},"body":{"refresh_token":"some-token"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":14967,"status_code":400,"response_size":28} -{"time":"2026-02-10T17:44:01.94503683Z","id":"9fd0cbef-6417-460c-9e18-c82d779671da","remote_ip":"127.0.0.1","host":"127.0.0.1:33809","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":24806,"latency_human":"24.806µs","bytes_in":30,"bytes_out":28} -{"time":"2026-02-10T17:44:01.945040637Z","id":"9fd0cbef-6417-460c-9e18-c82d779671da","remote_ip":"127.0.0.1","host":"127.0.0.1:33809","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":29514,"latency_human":"29.514µs","bytes_in":30,"bytes_out":28} ---- FAIL: TestRefreshTokenFlow (0.01s) - --- PASS: TestRefreshTokenFlow/RefreshToken_MissingToken (0.00s) - --- FAIL: TestRefreshTokenFlow/RefreshToken_InvalidTokenFormat (0.00s) - --- FAIL: TestRefreshTokenFlow/RefreshToken_ExpiredToken (0.00s) - --- FAIL: TestRefreshTokenFlow/RefreshToken_ValidToken (0.00s) - --- PASS: TestRefreshTokenFlow/RefreshToken_InvalidRequestBody (0.00s) - --- PASS: TestRefreshTokenFlow/RefreshToken_MissingContentType (0.00s) -=== RUN TestRefreshTokenSecurity -=== RUN TestRefreshTokenSecurity/RefreshToken_ReuseProtection -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"dc8e1698-6963-4038-b07b-fb9e24e7de70","timestamp":"2026-02-10T17:44:01.945741067Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":868942,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.946625287Z","id":"dc8e1698-6963-4038-b07b-fb9e24e7de70","remote_ip":"127.0.0.1","host":"127.0.0.1:32861","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":882578,"latency_human":"882.578µs","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.946631699Z","id":"dc8e1698-6963-4038-b07b-fb9e24e7de70","remote_ip":"127.0.0.1","host":"127.0.0.1:32861","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":889951,"latency_human":"889.951µs","bytes_in":59,"bytes_out":32} - refresh_token_test.go:187: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:187 - Error: Not equal: - expected: 200 - actual : 401 - Test: TestRefreshTokenSecurity/RefreshToken_ReuseProtection -=== RUN TestRefreshTokenSecurity/RefreshToken_TokenTampering -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"6a717bee-0fbc-42e3-ac37-9359b7a2678b","timestamp":"2026-02-10T17:44:01.947501373Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":930656,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.948496689Z","id":"6a717bee-0fbc-42e3-ac37-9359b7a2678b","remote_ip":"127.0.0.1","host":"127.0.0.1:35477","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":987442,"latency_human":"987.442µs","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.948511687Z","id":"6a717bee-0fbc-42e3-ac37-9359b7a2678b","remote_ip":"127.0.0.1","host":"127.0.0.1:35477","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":1009713,"latency_human":"1.009713ms","bytes_in":59,"bytes_out":32} - refresh_token_test.go:241: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:241 - Error: Not equal: - expected: 200 - actual : 401 - Test: TestRefreshTokenSecurity/RefreshToken_TokenTampering ---- FAIL: TestRefreshTokenSecurity (0.00s) - --- FAIL: TestRefreshTokenSecurity/RefreshToken_ReuseProtection (0.00s) - --- FAIL: TestRefreshTokenSecurity/RefreshToken_TokenTampering (0.00s) -=== RUN TestRefreshTokenEdgeCases -=== RUN TestRefreshTokenEdgeCases/RefreshToken_EmptyStringToken -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"2bf6bdb1-7e52-44f9-8884-459b7c544dfd","timestamp":"2026-02-10T17:44:01.950205259Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"20","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"refresh_token":""},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":42048,"status_code":400,"response_size":123} -{"time":"2026-02-10T17:44:01.95026496Z","id":"2bf6bdb1-7e52-44f9-8884-459b7c544dfd","remote_ip":"127.0.0.1","host":"127.0.0.1:46461","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":58509,"latency_human":"58.509µs","bytes_in":20,"bytes_out":123} -{"time":"2026-02-10T17:44:01.950271542Z","id":"2bf6bdb1-7e52-44f9-8884-459b7c544dfd","remote_ip":"127.0.0.1","host":"127.0.0.1:46461","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":64610,"latency_human":"64.61µs","bytes_in":20,"bytes_out":123} -=== RUN TestRefreshTokenEdgeCases/RefreshToken_NullToken -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"bdac3c5b-5aa6-468f-bf77-040b8560623f","timestamp":"2026-02-10T17:44:01.951138691Z","method":"POST","path":"/api/auth/refresh","headers":{"Accept-Encoding":"gzip","Content-Length":"22","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"refresh_token":null},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":24505,"status_code":400,"response_size":123} -{"time":"2026-02-10T17:44:01.951184616Z","id":"bdac3c5b-5aa6-468f-bf77-040b8560623f","remote_ip":"127.0.0.1","host":"127.0.0.1:42349","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":42489,"latency_human":"42.489µs","bytes_in":22,"bytes_out":123} -{"time":"2026-02-10T17:44:01.951190336Z","id":"bdac3c5b-5aa6-468f-bf77-040b8560623f","remote_ip":"127.0.0.1","host":"127.0.0.1:42349","method":"POST","uri":"/api/auth/refresh","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":50213,"latency_human":"50.213µs","bytes_in":22,"bytes_out":123} -=== RUN TestRefreshTokenEdgeCases/RefreshToken_ResponseStructure -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"b0ab746b-c247-4b96-bd1b-28d26c9f152b","timestamp":"2026-02-10T17:44:01.952065009Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":984607,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.953071927Z","id":"b0ab746b-c247-4b96-bd1b-28d26c9f152b","remote_ip":"127.0.0.1","host":"127.0.0.1:36215","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":1003672,"latency_human":"1.003672ms","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.95307874Z","id":"b0ab746b-c247-4b96-bd1b-28d26c9f152b","remote_ip":"127.0.0.1","host":"127.0.0.1:36215","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":1013420,"latency_human":"1.01342ms","bytes_in":59,"bytes_out":32} - refresh_token_test.go:330: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:330 - Error: Not equal: - expected: 200 - actual : 401 - Test: TestRefreshTokenEdgeCases/RefreshToken_ResponseStructure -=== RUN TestRefreshTokenEdgeCases/RefreshToken_TokenType -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 Starting sync queue processor (interval: 5s, batch: 50) -2026/02/10 17:44:01 [REQUEST] {"request_id":"d2d4ea14-7a55-436e-8eed-a7c0c409de07","timestamp":"2026-02-10T17:44:01.953956508Z","method":"POST","path":"/api/auth/login","headers":{"Accept-Encoding":"gzip","Content-Length":"59","Content-Type":"application/json","User-Agent":"Go-http-client/1.1"},"body":{"login":"testuser@example.com","password":"Test@Pass123!"},"remote_addr":"127.0.0.1","user_agent":"Go-http-client/1.1","duration":848515,"status_code":401,"response_size":32} -{"time":"2026-02-10T17:44:01.954822836Z","id":"d2d4ea14-7a55-436e-8eed-a7c0c409de07","remote_ip":"127.0.0.1","host":"127.0.0.1:46289","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":871006,"latency_human":"871.006µs","bytes_in":59,"bytes_out":32} -{"time":"2026-02-10T17:44:01.954831512Z","id":"d2d4ea14-7a55-436e-8eed-a7c0c409de07","remote_ip":"127.0.0.1","host":"127.0.0.1:46289","method":"POST","uri":"/api/auth/login","user_agent":"Go-http-client/1.1","status":401,"error":"","latency":878720,"latency_human":"878.72µs","bytes_in":59,"bytes_out":32} - refresh_token_test.go:382: - Error Trace: /app/cmd/server/tests/refresh_token_test.go:382 - Error: Not equal: - expected: 200 - actual : 401 - Test: TestRefreshTokenEdgeCases/RefreshToken_TokenType ---- FAIL: TestRefreshTokenEdgeCases (0.01s) - --- PASS: TestRefreshTokenEdgeCases/RefreshToken_EmptyStringToken (0.00s) - --- PASS: TestRefreshTokenEdgeCases/RefreshToken_NullToken (0.00s) - --- FAIL: TestRefreshTokenEdgeCases/RefreshToken_ResponseStructure (0.00s) - --- FAIL: TestRefreshTokenEdgeCases/RefreshToken_TokenType (0.00s) -=== RUN TestRegisterEndpoint -=== RUN TestRegisterEndpoint/Valid_registration_with_all_fields -=== RUN TestRegisterEndpoint/Valid_registration_with_only_required_fields -=== RUN TestRegisterEndpoint/Registration_with_role_specified -=== RUN TestRegisterEndpoint/Invalid_email_format -=== RUN TestRegisterEndpoint/Email_already_exists -=== RUN TestRegisterEndpoint/Username_already_exists -=== RUN TestRegisterEndpoint/Username_too_short -=== RUN TestRegisterEndpoint/Username_too_long -=== RUN TestRegisterEndpoint/Password_too_short -=== RUN TestRegisterEndpoint/Missing_required_field_-_email -=== RUN TestRegisterEndpoint/Missing_required_field_-_username -=== RUN TestRegisterEndpoint/Missing_required_field_-_password -=== RUN TestRegisterEndpoint/Invalid_JSON_payload -=== RUN TestRegisterEndpoint/Invalid_role_value -=== RUN TestRegisterEndpoint/Empty_email -=== RUN TestRegisterEndpoint/Empty_username -=== RUN TestRegisterEndpoint/Empty_password -=== RUN TestRegisterEndpoint/Whitespace-only_username -=== RUN TestRegisterEndpoint/Empty_JSON_request_body ---- PASS: TestRegisterEndpoint (0.00s) - --- PASS: TestRegisterEndpoint/Valid_registration_with_all_fields (0.00s) - --- PASS: TestRegisterEndpoint/Valid_registration_with_only_required_fields (0.00s) - --- PASS: TestRegisterEndpoint/Registration_with_role_specified (0.00s) - --- PASS: TestRegisterEndpoint/Invalid_email_format (0.00s) - --- PASS: TestRegisterEndpoint/Email_already_exists (0.00s) - --- PASS: TestRegisterEndpoint/Username_already_exists (0.00s) - --- PASS: TestRegisterEndpoint/Username_too_short (0.00s) - --- PASS: TestRegisterEndpoint/Username_too_long (0.00s) - --- PASS: TestRegisterEndpoint/Password_too_short (0.00s) - --- PASS: TestRegisterEndpoint/Missing_required_field_-_email (0.00s) - --- PASS: TestRegisterEndpoint/Missing_required_field_-_username (0.00s) - --- PASS: TestRegisterEndpoint/Missing_required_field_-_password (0.00s) - --- PASS: TestRegisterEndpoint/Invalid_JSON_payload (0.00s) - --- PASS: TestRegisterEndpoint/Invalid_role_value (0.00s) - --- PASS: TestRegisterEndpoint/Empty_email (0.00s) - --- PASS: TestRegisterEndpoint/Empty_username (0.00s) - --- PASS: TestRegisterEndpoint/Empty_password (0.00s) - --- PASS: TestRegisterEndpoint/Whitespace-only_username (0.00s) - --- PASS: TestRegisterEndpoint/Empty_JSON_request_body (0.00s) -=== RUN TestLoginEndpoint -=== RUN TestLoginEndpoint/Valid_login_with_email -=== RUN TestLoginEndpoint/Valid_login_with_username -=== RUN TestLoginEndpoint/Invalid_password -=== RUN TestLoginEndpoint/User_not_found -=== RUN TestLoginEndpoint/Missing_login_field -=== RUN TestLoginEndpoint/Missing_password_field -=== RUN TestLoginEndpoint/Empty_login -=== RUN TestLoginEndpoint/Empty_password -=== RUN TestLoginEndpoint/Invalid_JSON_payload -=== RUN TestLoginEndpoint/Empty_request_body ---- PASS: TestLoginEndpoint (0.00s) - --- PASS: TestLoginEndpoint/Valid_login_with_email (0.00s) - --- PASS: TestLoginEndpoint/Valid_login_with_username (0.00s) - --- PASS: TestLoginEndpoint/Invalid_password (0.00s) - --- PASS: TestLoginEndpoint/User_not_found (0.00s) - --- PASS: TestLoginEndpoint/Missing_login_field (0.00s) - --- PASS: TestLoginEndpoint/Missing_password_field (0.00s) - --- PASS: TestLoginEndpoint/Empty_login (0.00s) - --- PASS: TestLoginEndpoint/Empty_password (0.00s) - --- PASS: TestLoginEndpoint/Invalid_JSON_payload (0.00s) - --- PASS: TestLoginEndpoint/Empty_request_body (0.00s) -=== RUN TestSearchMediaItemsTests -=== RUN TestSearchMediaItemsTests/No_user_context_-_GET_/api/media-items/search_without_authentication -=== RUN TestSearchMediaItemsTests/User_context_-_GET_/api/media-items/search_with_valid_authentication -=== RUN TestSearchMediaItemsTests/Admin_context_-_GET_/api/media-items/search_with_admin_token -=== RUN TestSearchMediaItemsTests/Search_with_missing_query_parameter -=== RUN TestSearchMediaItemsTests/Search_with_no_results_found_(404) -=== RUN TestSearchMediaItemsTests/Search_with_partial_match -=== RUN TestSearchMediaItemsTests/Search_with_fuzzy_match_fallback -=== RUN TestSearchMediaItemsTests/Search_by_author_name -=== RUN TestSearchMediaItemsTests/Search_with_special_characters ---- PASS: TestSearchMediaItemsTests (0.00s) - --- PASS: TestSearchMediaItemsTests/No_user_context_-_GET_/api/media-items/search_without_authentication (0.00s) - --- PASS: TestSearchMediaItemsTests/User_context_-_GET_/api/media-items/search_with_valid_authentication (0.00s) - --- PASS: TestSearchMediaItemsTests/Admin_context_-_GET_/api/media-items/search_with_admin_token (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_with_missing_query_parameter (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_with_no_results_found_(404) (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_with_partial_match (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_with_fuzzy_match_fallback (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_by_author_name (0.00s) - --- PASS: TestSearchMediaItemsTests/Search_with_special_characters (0.00s) -=== RUN TestSearchIntegrationWithRealDatabase -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Register_admin_user -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Register_regular_user -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Create_library_with_admin_token -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/User_searches_for_existing_media_items -=== RUN TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Admin_searches_all_items_including_hidden ---- PASS: TestSearchIntegrationWithRealDatabase (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Register_admin_user (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Register_regular_user (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Create_library_with_admin_token (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/User_searches_for_existing_media_items (0.00s) - --- PASS: TestSearchIntegrationWithRealDatabase/Setup_-_Register_admin_and_user,_create_library_with_media_items/Admin_searches_all_items_including_hidden (0.00s) -=== RUN TestPasswordComplexity -=== RUN TestPasswordComplexity/Valid_password_with_all_requirements -=== RUN TestPasswordComplexity/Missing_uppercase -=== RUN TestPasswordComplexity/Missing_lowercase -=== RUN TestPasswordComplexity/Missing_number -=== RUN TestPasswordComplexity/Missing_special_char -=== RUN TestPasswordComplexity/Too_short -=== RUN TestPasswordComplexity/Minimum_valid_password ---- PASS: TestPasswordComplexity (0.00s) - --- PASS: TestPasswordComplexity/Valid_password_with_all_requirements (0.00s) - --- PASS: TestPasswordComplexity/Missing_uppercase (0.00s) - --- PASS: TestPasswordComplexity/Missing_lowercase (0.00s) - --- PASS: TestPasswordComplexity/Missing_number (0.00s) - --- PASS: TestPasswordComplexity/Missing_special_char (0.00s) - --- PASS: TestPasswordComplexity/Too_short (0.00s) - --- PASS: TestPasswordComplexity/Minimum_valid_password (0.00s) -=== RUN TestAccountLockout -=== RUN TestAccountLockout/Failed_login_attempts_tracking -=== RUN TestAccountLockout/Clear_attempts_unlocks_account ---- PASS: TestAccountLockout (0.00s) - --- PASS: TestAccountLockout/Failed_login_attempts_tracking (0.00s) - --- PASS: TestAccountLockout/Clear_attempts_unlocks_account (0.00s) -=== RUN TestRateLimiterSecurity ---- PASS: TestRateLimiterSecurity (0.00s) -=== RUN TestJWTExpiration ---- PASS: TestJWTExpiration (0.00s) -=== RUN TestRefreshTokenExpiration ---- PASS: TestRefreshTokenExpiration (0.00s) -=== RUN TestPasswordRequirementsList ---- PASS: TestPasswordRequirementsList (0.00s) -=== RUN TestDatabaseTransactionManager ---- PASS: TestDatabaseTransactionManager (0.00s) -=== RUN TestErrorHandlingTypes ---- PASS: TestErrorHandlingTypes (0.00s) -=== RUN TestSimpleSetup - setup_test.go:8: 🔧 Test setup verification - setup_test.go:11: ✅ Go compilation successful - setup_test.go:14: 🚀 Test runner is working - setup_test.go:17: ✅ Basic test completed successfully ---- PASS: TestSimpleSetup (0.00s) -=== RUN TestListMediaItemsSorting -=== RUN TestListMediaItemsSorting/No_user_context_-_GET_/api/media-items_without_authentication -=== RUN TestListMediaItemsSorting/User_context_-_GET_/api/media-items_with_title_ASC_sort -=== RUN TestListMediaItemsSorting/User_context_-_GET_/api/media-items_with_author_DESC_sort -=== RUN TestListMediaItemsSorting/Admin_context_-_GET_/api/media-items_with_page_count_DESC_sort -=== RUN TestListMediaItemsSorting/User_context_-_Invalid_sort_parameter_defaults_to_created_at_DESC -=== RUN TestListMediaItemsSorting/User_context_-_Sort_by_genre_ASC -=== RUN TestListMediaItemsSorting/User_context_-_Sort_by_copyright_year_DESC -=== RUN TestListMediaItemsSorting/User_context_-_Sort_with_pagination ---- PASS: TestListMediaItemsSorting (0.00s) - --- PASS: TestListMediaItemsSorting/No_user_context_-_GET_/api/media-items_without_authentication (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_GET_/api/media-items_with_title_ASC_sort (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_GET_/api/media-items_with_author_DESC_sort (0.00s) - --- PASS: TestListMediaItemsSorting/Admin_context_-_GET_/api/media-items_with_page_count_DESC_sort (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_Invalid_sort_parameter_defaults_to_created_at_DESC (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_Sort_by_genre_ASC (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_Sort_by_copyright_year_DESC (0.00s) - --- PASS: TestListMediaItemsSorting/User_context_-_Sort_with_pagination (0.00s) -=== RUN TestSyncIntegration_OfflineDetector_DeviceStatusDetection - sync_integration_test.go:53: - Error Trace: /app/cmd/server/tests/sync_integration_test.go:53 - /app/cmd/server/tests/sync_integration_test.go:79 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestSyncIntegration_OfflineDetector_DeviceStatusDetection ---- FAIL: TestSyncIntegration_OfflineDetector_DeviceStatusDetection (0.00s) -=== RUN TestSyncIntegration_OfflineDetector_OfflineThreshold - sync_integration_test.go:53: - Error Trace: /app/cmd/server/tests/sync_integration_test.go:53 - /app/cmd/server/tests/sync_integration_test.go:95 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestSyncIntegration_OfflineDetector_OfflineThreshold ---- FAIL: TestSyncIntegration_OfflineDetector_OfflineThreshold (0.00s) -=== RUN TestSyncIntegration_OfflineDetector_GetDeviceStatus - sync_integration_test.go:53: - Error Trace: /app/cmd/server/tests/sync_integration_test.go:53 - /app/cmd/server/tests/sync_integration_test.go:113 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestSyncIntegration_OfflineDetector_GetDeviceStatus ---- FAIL: TestSyncIntegration_OfflineDetector_GetDeviceStatus (0.01s) -=== RUN TestSyncIntegration_OfflineDetector_ForceReconnectDevice - sync_integration_test.go:53: - Error Trace: /app/cmd/server/tests/sync_integration_test.go:53 - /app/cmd/server/tests/sync_integration_test.go:129 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestSyncIntegration_OfflineDetector_ForceReconnectDevice ---- FAIL: TestSyncIntegration_OfflineDetector_ForceReconnectDevice (0.00s) -=== RUN TestSyncIntegration_QueueProcessor_EnqueueProgress - sync_integration_test.go:174: - Error Trace: /app/cmd/server/tests/sync_integration_test.go:174 - Error: Received unexpected error: - failed to connect to `host=db user=postgres database=bookhoard`: server error (FATAL: sorry, too many clients already (SQLSTATE 53300)) - Test: TestSyncIntegration_QueueProcessor_EnqueueProgress ---- FAIL: TestSyncIntegration_QueueProcessor_EnqueueProgress (0.00s) -=== RUN TestSystemSettingsHandler -=== RUN TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_without_auth -=== RUN TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_non-admin -=== RUN TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin - system_settings_test.go:77: - Error Trace: /app/cmd/server/tests/system_settings_test.go:77 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin - system_settings_test.go:81: - Error Trace: /app/cmd/server/tests/system_settings_test.go:81 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin - system_settings_test.go:82: - Error Trace: /app/cmd/server/tests/system_settings_test.go:82 - Error: Not equal: - expected: float64(60) - actual : () - Test: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin - system_settings_test.go:83: - Error Trace: /app/cmd/server/tests/system_settings_test.go:83 - Error: Not equal: - expected: bool(true) - actual : () - Test: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_without_auth -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_as_non-admin -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(14_minutes) - system_settings_test.go:175: - Error Trace: /app/cmd/server/tests/system_settings_test.go:175 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(14_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_high_(1441_minutes) - system_settings_test.go:175: - Error Trace: /app/cmd/server/tests/system_settings_test.go:175 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_high_(1441_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(0_minutes) - system_settings_test.go:175: - Error Trace: /app/cmd/server/tests/system_settings_test.go:175 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(0_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_negative_(-10) - system_settings_test.go:175: - Error Trace: /app/cmd/server/tests/system_settings_test.go:175 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_negative_(-10) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_missing_required_field - system_settings_test.go:203: - Error Trace: /app/cmd/server/tests/system_settings_test.go:203 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_missing_required_field -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) - system_settings_test.go:251: - Error Trace: /app/cmd/server/tests/system_settings_test.go:251 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) - system_settings_test.go:255: - Error Trace: /app/cmd/server/tests/system_settings_test.go:255 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) - system_settings_test.go:256: - Error Trace: /app/cmd/server/tests/system_settings_test.go:256 - Error: Not equal: - expected: float64(15) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) - system_settings_test.go:257: - Error Trace: /app/cmd/server/tests/system_settings_test.go:257 - Error: Not equal: - expected: bool(true) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) - system_settings_test.go:258: - Error Trace: /app/cmd/server/tests/system_settings_test.go:258 - Error: Not equal: - expected: string("scan settings updated successfully") - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) - system_settings_test.go:251: - Error Trace: /app/cmd/server/tests/system_settings_test.go:251 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) - system_settings_test.go:255: - Error Trace: /app/cmd/server/tests/system_settings_test.go:255 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) - system_settings_test.go:256: - Error Trace: /app/cmd/server/tests/system_settings_test.go:256 - Error: Not equal: - expected: float64(60) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) - system_settings_test.go:257: - Error Trace: /app/cmd/server/tests/system_settings_test.go:257 - Error: Not equal: - expected: bool(true) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) - system_settings_test.go:258: - Error Trace: /app/cmd/server/tests/system_settings_test.go:258 - Error: Not equal: - expected: string("scan settings updated successfully") - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) - system_settings_test.go:251: - Error Trace: /app/cmd/server/tests/system_settings_test.go:251 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) - system_settings_test.go:255: - Error Trace: /app/cmd/server/tests/system_settings_test.go:255 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) - system_settings_test.go:256: - Error Trace: /app/cmd/server/tests/system_settings_test.go:256 - Error: Not equal: - expected: float64(1440) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) - system_settings_test.go:257: - Error Trace: /app/cmd/server/tests/system_settings_test.go:257 - Error: Not equal: - expected: bool(true) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) - system_settings_test.go:258: - Error Trace: /app/cmd/server/tests/system_settings_test.go:258 - Error: Not equal: - expected: string("scan settings updated successfully") - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) - system_settings_test.go:251: - Error Trace: /app/cmd/server/tests/system_settings_test.go:251 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) - system_settings_test.go:255: - Error Trace: /app/cmd/server/tests/system_settings_test.go:255 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) - system_settings_test.go:256: - Error Trace: /app/cmd/server/tests/system_settings_test.go:256 - Error: Not equal: - expected: float64(120) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) - system_settings_test.go:257: - Error Trace: /app/cmd/server/tests/system_settings_test.go:257 - Error: Not equal: - expected: bool(false) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) - system_settings_test.go:258: - Error Trace: /app/cmd/server/tests/system_settings_test.go:258 - Error: Not equal: - expected: string("scan settings updated successfully") - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) - system_settings_test.go:251: - Error Trace: /app/cmd/server/tests/system_settings_test.go:251 - Error: Not equal: - expected: 200 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) - system_settings_test.go:255: - Error Trace: /app/cmd/server/tests/system_settings_test.go:255 - Error: Received unexpected error: - EOF - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) - system_settings_test.go:256: - Error Trace: /app/cmd/server/tests/system_settings_test.go:256 - Error: Not equal: - expected: float64(30) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) - system_settings_test.go:257: - Error Trace: /app/cmd/server/tests/system_settings_test.go:257 - Error: Not equal: - expected: bool(true) - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) - system_settings_test.go:258: - Error Trace: /app/cmd/server/tests/system_settings_test.go:258 - Error: Not equal: - expected: string("scan settings updated successfully") - actual : () - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) -=== RUN TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_JSON - system_settings_test.go:283: - Error Trace: /app/cmd/server/tests/system_settings_test.go:283 - Error: Not equal: - expected: 400 - actual : 403 - Test: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_JSON ---- FAIL: TestSystemSettingsHandler (0.00s) - --- PASS: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_without_auth (0.00s) - --- PASS: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_non-admin (0.00s) - --- FAIL: TestSystemSettingsHandler/GET_/api/libraries/scan-settings_-_Get_settings_as_admin (0.00s) - --- PASS: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_without_auth (0.00s) - --- PASS: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_as_non-admin (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(14_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_high_(1441_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_too_low_(0_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_frequency/Frequency_negative_(-10) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_missing_required_field (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(15_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(60_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(1440_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(120_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_valid_data/Valid_frequency_(30_minutes) (0.00s) - --- FAIL: TestSystemSettingsHandler/PUT_/api/libraries/scan-settings_-_Update_with_invalid_JSON (0.00s) -=== RUN TestSystemSettingsIntegration -=== RUN TestSystemSettingsIntegration/System_settings_affect_all_libraries_equally -=== RUN TestSystemSettingsIntegration/Disabling_auto_scan_stops_all_library_scans - system_settings_test.go:306: - Error Trace: /app/cmd/server/tests/system_settings_test.go:306 - Error: Not equal: - expected: "Scans should not run when auto_scan_enabled is false" - actual : "Scans should not run" - - Diff: - --- Expected - +++ Actual - @@ -1 +1 @@ - -Scans should not run when auto_scan_enabled is false - +Scans should not run - Test: TestSystemSettingsIntegration/Disabling_auto_scan_stops_all_library_scans -=== RUN TestSystemSettingsIntegration/Valid_frequency_range_enforcement ---- FAIL: TestSystemSettingsIntegration (0.00s) - --- PASS: TestSystemSettingsIntegration/System_settings_affect_all_libraries_equally (0.00s) - --- FAIL: TestSystemSettingsIntegration/Disabling_auto_scan_stops_all_library_scans (0.00s) - --- PASS: TestSystemSettingsIntegration/Valid_frequency_range_enforcement (0.00s) -=== RUN TestTestRunner - testrunner_test.go:8: 🧪 Go test runner verification - testrunner_test.go:9: ✅ Testing framework is properly configured - testrunner_test.go:10: 📋 Package structure is correct - testrunner_test.go:13: 📝 All tests should be discoverable and runnable - testrunner_test.go:20: ✅ Test runner verification completed ---- PASS: TestTestRunner (0.00s) -=== RUN TestPhase1Integration -=== RUN TestPhase1Integration/Cleanup_ExistingTestUser - universal_progress_integration_test.go:34: Cleanup: No existing test user to delete (server not available) -=== RUN TestPhase1Integration/Step1_CreateFirstUser - universal_progress_integration_test.go:108: - Error Trace: /app/cmd/server/tests/universal_progress_integration_test.go:108 - Error: Received unexpected error: - Post "http://localhost:8765/api/auth/register": dial tcp [::1]:8765: connect: connection refused - Test: TestPhase1Integration/Step1_CreateFirstUser ---- FAIL: TestPhase1Integration (0.00s) - --- PASS: TestPhase1Integration/Cleanup_ExistingTestUser (0.00s) - --- FAIL: TestPhase1Integration/Step1_CreateFirstUser (0.00s) -panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked] -[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x103194d] - -goroutine 7684 [running]: -testing.tRunner.func1.2({0x11c3440, 0x1e2a230}) - /usr/local/go/src/testing/testing.go:1872 +0x237 -testing.tRunner.func1() - /usr/local/go/src/testing/testing.go:1875 +0x35b -panic({0x11c3440?, 0x1e2a230?}) - /usr/local/go/src/runtime/panic.go:783 +0x132 -bookhoard/cmd/server/tests.TestPhase1Integration.func2(0xc007935340) - /app/cmd/server/tests/universal_progress_integration_test.go:109 +0x26d -testing.tRunner(0xc007935340, 0x140cd48) - /usr/local/go/src/testing/testing.go:1934 +0xea -created by testing.(*T).Run in goroutine 7731 - /usr/local/go/src/testing/testing.go:1997 +0x465 -FAIL bookhoard/cmd/server/tests 7.282s -FAIL -Error: executing /usr/bin/podman-compose --profile tests run --rm tests: exit status 1 -make: *** [Makefile:39: test-integration] Error 1