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 <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ func TestFillPendingDetailsAndClassify_EndToEnd(t *testing.T) {
|
|||||||
|
|
||||||
// A workout kind that should cleanly match the seeded activity's pace.
|
// 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]}]}`
|
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)
|
t.Fatalf("CreateWorkoutKind: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user