test(likes): track like and unlike answer 200 with the copies they changed (#8126)
release / web (push) Successful in 1m41s
release / go (push) Successful in 2m5s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 4m31s
release / android (push) Successful in 5m2s
release / Build signed APK (push) Successful in 5m34s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

Three more assertions in likes_test.go still expected 204 from the track
like and unlike routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-28 12:09:11 -05:00
co-authored by Claude Opus 5.5
parent 4587b0a038
commit 3557c31416
+3 -3
View File
@@ -246,7 +246,7 @@ func TestLikeTrack_DuringOpenPlayEvent_WritesContextualLike(t *testing.T) {
// Like the OTHER track. With an open play_event for `playing`,
// the contextual_likes row should reference `other` and the playing
// track's session vector.
if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusNoContent {
if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusOK {
t.Fatalf("like: %d", r.Code)
}
var count int
@@ -265,7 +265,7 @@ func TestLikeTrack_NoOpenPlayEvent_NoContextualLike(t *testing.T) {
album := seedAlbum(t, pool, artist.ID, "X", 1990)
track := seedTrack(t, pool, album.ID, artist.ID, "T", 1, 100_000)
if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(track.ID)); r.Code != http.StatusNoContent {
if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(track.ID)); r.Code != http.StatusOK {
t.Fatalf("like: %d", r.Code)
}
var count int
@@ -311,7 +311,7 @@ func TestUnlikeTrack_SoftDeletesContextualLikes(t *testing.T) {
_ = callEvents(h, user, []byte(`{"type":"play_started","track_id":"`+uuidToString(playing.ID)+`"}`))
_ = callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID))
if r := callLike(h, user, http.MethodDelete, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusNoContent {
if r := callLike(h, user, http.MethodDelete, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusOK {
t.Fatalf("unlike: %d", r.Code)
}
// general_likes deleted.