test(subsonic): read similar songs from their own keys, not a map over the whole response
release / web (push) Successful in 1m30s
release / go (push) Successful in 1m59s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m18s
release / android (push) Successful in 4m37s
release / Build signed APK (push) Successful in 5m13s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 14s
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Successful in 1m30s
release / go (push) Successful in 1m59s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m18s
release / android (push) Successful in 4m37s
release / Build signed APK (push) Successful in 5m13s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 14s
release / Verify release artifacts (tag releases only) (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -251,9 +251,15 @@ func TestGetRandomSongs_NarrowsByGenreAndYear(t *testing.T) {
|
||||
|
||||
func (f picksFixture) similar(t *testing.T, method func(http.ResponseWriter, *http.Request), key, id string) ([]string, int) {
|
||||
t.Helper()
|
||||
var got map[string]SimilarSongsContainer
|
||||
var got struct {
|
||||
SimilarSongs SimilarSongsContainer `json:"similarSongs"`
|
||||
SimilarSongs2 SimilarSongsContainer `json:"similarSongs2"`
|
||||
}
|
||||
code := call(t, method, f.user, "count=10&id="+id, &got)
|
||||
return titles(got[key].Songs), code
|
||||
if key == "similarSongs2" {
|
||||
return titles(got.SimilarSongs2.Songs), code
|
||||
}
|
||||
return titles(got.SimilarSongs.Songs), code
|
||||
}
|
||||
|
||||
// Radio from a song, an album or an artist: every pick is playable, and the
|
||||
|
||||
Reference in New Issue
Block a user