test(mixes): remove a throwaway check against a local database

It was committed by mistake with the mixes: it reads a database from a path on one machine and prints, so it checks nothing.
This commit is contained in:
tgiachi 2026-11-13 09:23:11 +01:00
commit 25f41dd5fc

View file

@ -1,48 +0,0 @@
package mixes_test
import (
"context"
"fmt"
"testing"
"time"
"codeberg.org/squidd/sonda/internal/mixes"
"codeberg.org/squidd/sonda/internal/storage"
"codeberg.org/squidd/sonda/internal/taste"
)
type none struct{}
func (none) Learn(context.Context, int64) (taste.Learned, error) { return taste.Learned{}, nil }
func TestZZReal(t *testing.T) {
db, err := storage.Open(storage.DriverSQLite, "/tmp/claude-1000/-home-squid-projects-personal-sonda/879e274d-7595-4688-9de1-101770d03238/scratchpad/real.db")
if err != nil {
t.Fatal(err)
}
defer db.Close()
s := mixes.NewService(storage.NewMixRepo(db), none{}, 20*time.Second)
list, err := s.List(context.Background(), 1)
if err != nil {
t.Fatal(err)
}
for _, m := range list {
fmt.Printf("ZZ %-22s %-26s %v\n", m.ID, m.Title, m.Artists)
}
start := time.Now()
m, tracks, err := s.Get(context.Background(), 1, "genre:rock", 0)
if err != nil {
t.Fatal(err)
}
fmt.Printf("ZZ -- %s: %d songs in %v\n", m.ID, len(tracks), time.Since(start))
for i, tr := range tracks[:8] {
a := ""
if len(tr.Artists) > 0 {
a = tr.Artists[0].Name
}
fmt.Printf("ZZ %2d. %s — %s\n", i+1, a, tr.Title)
}
start = time.Now()
_, tracks, err = s.Get(context.Background(), 1, "unheard", 0)
fmt.Printf("ZZ -- unheard: %d songs in %v err %v\n", len(tracks), time.Since(start), err)
}