From 07ba815e8517ee2d3a5fa531361bbd09bdfcbaa7 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 20 Jan 2026 11:17:19 -1000 Subject: Remove Obsidian integration for public server deployment Obsidian relied on local filesystem access which is incompatible with public server deployment. This removes all Obsidian-related code including: - API client and interface - Store layer methods (SaveNotes, GetNotes, SearchNotes) - Handler methods and routes - UI tab and templates - Configuration fields - Related tests Co-Authored-By: Claude Opus 4.5 --- test/acceptance_test.go | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'test/acceptance_test.go') diff --git a/test/acceptance_test.go b/test/acceptance_test.go index eee837e..ca672c3 100644 --- a/test/acceptance_test.go +++ b/test/acceptance_test.go @@ -65,7 +65,7 @@ func setupTestServer(t *testing.T) (*httptest.Server, *store.Store, func()) { } // Initialize handlers - h := handlers.New(db, todoistClient, trelloClient, nil, nil, cfg) + h := handlers.New(db, todoistClient, trelloClient, nil, cfg) // Set up router (same as main.go) r := chi.NewRouter() @@ -77,7 +77,6 @@ func setupTestServer(t *testing.T) (*httptest.Server, *store.Store, func()) { r.Get("/", h.HandleDashboard) r.Post("/api/refresh", h.HandleRefresh) r.Get("/api/tasks", h.HandleGetTasks) - r.Get("/api/notes", h.HandleGetNotes) r.Get("/api/meals", h.HandleGetMeals) r.Get("/api/boards", h.HandleGetBoards) @@ -211,29 +210,6 @@ func TestFullWorkflow(t *testing.T) { // The response can be either success message or dashboard data }) - // Test 4: GET /api/notes (should return empty when no Obsidian client) - t.Run("GetNotesEmpty", func(t *testing.T) { - resp, err := http.Get(server.URL + "/api/notes") - if err != nil { - t.Fatalf("Failed to get notes: %v", err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - t.Errorf("Expected status 200, got %d", resp.StatusCode) - } - - var notes []models.Note - if err := json.NewDecoder(resp.Body).Decode(¬es); err != nil { - t.Fatalf("Failed to decode notes: %v", err) - } - - if len(notes) != 0 { - t.Errorf("Expected 0 notes (no Obsidian client), got %d", len(notes)) - } - }) - - // Test 5: GET /api/meals (should return empty when no PlanToEat client) t.Run("GetMealsEmpty", func(t *testing.T) { resp, err := http.Get(server.URL + "/api/meals") if err != nil { @@ -255,7 +231,7 @@ func TestFullWorkflow(t *testing.T) { } }) - // Test 6: GET / (Dashboard) + // Test 5: GET / (Dashboard) t.Run("GetDashboard", func(t *testing.T) { resp, err := http.Get(server.URL + "/") if err != nil { -- cgit v1.2.3