From 655ed9225f1b15f15b92e4b7278ecc6dca991703 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 1 Feb 2026 16:21:10 -0500 Subject: [PATCH] =?UTF-8?q?Update=20code=20references=20and=20tests:=20Boo?= =?UTF-8?q?kmann=20=E2=86=92=20Bookhoard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code changes: - main.go: Update cache directory path - sidecar.go: Update file extension (.bookmann.json → .bookhoard.json) - security.go: Update CORS example URLs - queue_test.go: Update test database name - feed_test.go: Update test assertions - phase1_integration_test.go: Update test email addresses - TEST_COVERAGE.md: Update project references Part of project rename to Bookhoard. --- cmd/server/main.go | 2 +- cmd/server/tests/TEST_COVERAGE.md | 2 +- cmd/server/tests/phase1_integration_test.go | 8 ++++---- internal/handlers/sidecar.go | 4 ++-- internal/middleware/security.go | 4 ++-- internal/opds/feed_test.go | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 20d56e1..3fdee84 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -98,7 +98,7 @@ func main() { queueHandler := handlers.NewQueueHandler(queries, queueProcessor) // Create conversion service for EPUB→KEPUB conversion - conversionService := services.NewConversionService(queries, "/var/bookmann/cache/kepub") + conversionService := services.NewConversionService(queries, "/var/bookhoard/cache/kepub") opdsHandler := handlers.NewOPDSHandler(queries, conversionService) e := echo.New() diff --git a/cmd/server/tests/TEST_COVERAGE.md b/cmd/server/tests/TEST_COVERAGE.md index 49576c7..42eefbc 100644 --- a/cmd/server/tests/TEST_COVERAGE.md +++ b/cmd/server/tests/TEST_COVERAGE.md @@ -1,6 +1,6 @@ # Test Coverage Report -This document provides a comprehensive overview of all test scenarios covering possible failure points in the Bookmann application. +This document provides a comprehensive overview of all test scenarios covering possible failure points in the Bookhoard application. ## Test Files diff --git a/cmd/server/tests/phase1_integration_test.go b/cmd/server/tests/phase1_integration_test.go index a7a5cce..cef59b0 100644 --- a/cmd/server/tests/phase1_integration_test.go +++ b/cmd/server/tests/phase1_integration_test.go @@ -24,7 +24,7 @@ func TestPhase1Integration(t *testing.T) { t.Run("Cleanup_ExistingTestUser", func(t *testing.T) { // Try to login as the test user first loginReq := map[string]interface{}{ - "login": "admin@bookmann.test", + "login": "admin@bookhoard.test", "password": "TestPassword123!@#", } @@ -96,7 +96,7 @@ func TestPhase1Integration(t *testing.T) { // Step 1: Create first user (should be admin) t.Run("Step1_CreateFirstUser", func(t *testing.T) { userReq := map[string]interface{}{ - "email": "admin@bookmann.test", + "email": "admin@bookhoard.test", "username": "admin", "password": "TestPassword123!@#", "first_name": "Admin", @@ -120,7 +120,7 @@ func TestPhase1Integration(t *testing.T) { if resp.StatusCode == http.StatusConflict { t.Logf("User already exists, logging in instead...") loginReq := map[string]interface{}{ - "login": "admin@bookmann.test", + "login": "admin@bookhoard.test", "password": "TestPassword123!@#", } body, _ := json.Marshal(loginReq) @@ -146,7 +146,7 @@ func TestPhase1Integration(t *testing.T) { var adminToken string t.Run("LoginAsAdmin", func(t *testing.T) { loginReq := map[string]interface{}{ - "login": "admin@bookmann.test", + "login": "admin@bookhoard.test", "password": "TestPassword123!@#", } diff --git a/internal/handlers/sidecar.go b/internal/handlers/sidecar.go index 401067e..fdff3da 100644 --- a/internal/handlers/sidecar.go +++ b/internal/handlers/sidecar.go @@ -187,7 +187,7 @@ func (h *SidecarHandler) GetSidecarConfig(c echo.Context) error { return c.JSON(http.StatusOK, config) } -// DownloadSidecarConfig generates a .bookmann.json file for device setup +// DownloadSidecarConfig generates a .bookhoard.json file for device setup // GET /api/devices/:device_id/sidecar/download func (h *SidecarHandler) DownloadSidecarConfig(c echo.Context) error { deviceID, err := uuid.Parse(c.Param("device_id")) @@ -324,7 +324,7 @@ func (h *SidecarHandler) DownloadSidecarConfig(c echo.Context) error { } // Set headers for file download - filename := fmt.Sprintf("%s.bookmann.json", sanitizeFilename(device.DeviceName)) + filename := fmt.Sprintf("%s.bookhoard.json", sanitizeFilename(device.DeviceName)) c.Response().Header().Set("Content-Type", "application/json") c.Response().Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename)) diff --git a/internal/middleware/security.go b/internal/middleware/security.go index 04e91bf..afc5db3 100644 --- a/internal/middleware/security.go +++ b/internal/middleware/security.go @@ -87,8 +87,8 @@ type CORSSecurityConfig struct { func NewSecureCORSConfig() CORSSecurityConfig { return CORSSecurityConfig{ AllowedOrigins: []string{ - "https://bookmann.example.com", - "https://*.bookmann.example.com", + "https://bookhoard.example.com", + "https://*.bookhoard.example.com", }, AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"}, AllowedHeaders: []string{ diff --git a/internal/opds/feed_test.go b/internal/opds/feed_test.go index 70404b2..c26185d 100644 --- a/internal/opds/feed_test.go +++ b/internal/opds/feed_test.go @@ -121,7 +121,7 @@ func TestEntrySetIdentifier(t *testing.T) { } if entry.Identifier.ID != "bookhoard" { - t.Errorf("expected Identifier ID to be 'bookmann', got '%s'", entry.Identifier.ID) + t.Errorf("expected Identifier ID to be 'bookhoard', got '%s'", entry.Identifier.ID) } if entry.Identifier.Content != "book-uuid-123" { @@ -139,7 +139,7 @@ func TestEntryAddMetadata(t *testing.T) { meta := entry.Metadata[0] if meta.Property != "bookhoard:sha256" { - t.Errorf("expected Property to be 'bookmann:sha256', got '%s'", meta.Property) + t.Errorf("expected Property to be 'bookhoard:sha256', got '%s'", meta.Property) } if meta.Content != "abc123..." {