navidrome/testing-flows.md
2026-05-15 21:29:02 -05:00

1.3 KiB

Testing Flows

Add to Favorites

Stars a song (or album/artist) using the Subsonic star endpoint.

Request

GET /rest/star

Query parameters:

Parameter Value Description
u admin Username
t 47b1fbf1aaa6b36d0dec0c8ae0b1a6ef Auth token (MD5 of password + salt)
s 701805 Salt used to generate the token
f json Response format
v 1.8.0 Subsonic API version
c NavidromeUI Client name
id qORBlifrm7cjK4yDgfy5Zy ID of the song/album/artist to star

Example request (dev)

curl "http://localhost:4533/rest/star?u=admin&t=47b1fbf1aaa6b36d0dec0c8ae0b1a6ef&s=701805&f=json&v=1.8.0&c=NavidromeUI&id=qORBlifrm7cjK4yDgfy5Zy"

Response

{
    "subsonic-response": {
        "status": "ok",
        "version": "1.16.1",
        "type": "navidrome",
        "serverVersion": "dev",
        "openSubsonic": true
    }
}

A status: "ok" with no error field means the item was successfully starred.

Running Star/Unstar Tests

Backend

go test ./server/subsonic/ --ginkgo.focus="Star/Unstar songs"

Frontend

npm --prefix ui test -- useToggleLove.test.js --run

Database

docker compose -f docker-compose.dev.yml exec backend \
go test ./tests/db -run TestStarEndpoint -