From 6e8bde7854d1c5901897b4f31297c4506d76cce1 Mon Sep 17 00:00:00 2001 From: Christophe Vila Date: Fri, 17 Jul 2026 18:50:21 +0200 Subject: [PATCH] fix: rename colliding test workout kind name in sync test after taxonomy reseed The migration 0004_workout_taxonomy.sql now seeds a fixed 'Tempo' kind. The test was also creating a 'Tempo' kind, causing a UNIQUE constraint violation. Renamed the test kind to 'Test Classification Tempo' to avoid collision. Co-Authored-By: Claude Sonnet 5 --- backend/internal/sync/service_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/sync/service_test.go b/backend/internal/sync/service_test.go index b730016..93cb9c7 100644 --- a/backend/internal/sync/service_test.go +++ b/backend/internal/sync/service_test.go @@ -95,7 +95,7 @@ func TestFillPendingDetailsAndClassify_EndToEnd(t *testing.T) { // A workout kind that should cleanly match the seeded activity's pace. ruleJSON := `{"match":"all","conditions":[{"metric":"avg_pace_sec_per_km","op":"between","value":[280,320]}]}` - if _, err := db.CreateWorkoutKind(ctx, store.WorkoutKind{Name: "Tempo", RuleJSON: ruleJSON, IsActive: true}); err != nil { + if _, err := db.CreateWorkoutKind(ctx, store.WorkoutKind{Name: "Test Classification Tempo", RuleJSON: ruleJSON, IsActive: true}); err != nil { t.Fatalf("CreateWorkoutKind: %v", err) }