cover lms and nextcloud music in the integration suite

Run the integration harness from its own devshell so the server packages stay out of the everyday shell. Add lms and a Nextcloud Music instance to the harness and extend the suite with auth-fallback, media, error, write round-trip, multi-source and prune tests.

The auth test caught that lms answers OpenSubsonic error 42 (not 41) when it refuses token auth, so the client now falls back on both codes.
This commit is contained in:
austinried
2026-10-04 00:30:05 +00:00
parent 2bea7fbb38
commit d635f3b9a0
16 changed files with 802 additions and 93 deletions
@@ -148,6 +148,21 @@ class SubsonicClientTest {
assertEquals(1, notified)
}
@Test
fun openSubsonicAuthUnsupportedCodeAlsoRetriesWithPassword() {
server.enqueue(MockResponse().setBody(failed(42, "Provided authentication mechanism not supported.")))
server.enqueue(MockResponse().setBody("<subsonic-response status=\"ok\" version=\"1.16.1\"/>"))
var notified = 0
client(tokenAuth = true, onTokenAuthUnsupported = { notified++ }).check("ping")
val first = server.takeRequest().requestUrl!!
assertNotNull(first.queryParameter("t"))
val second = server.takeRequest().requestUrl!!
assertEquals("secret", second.queryParameter("p"))
assertEquals(1, notified)
}
@Test
fun tokenAuthUnsupportedIsNotifiedOnceAndNotRetriedAgain() {
server.enqueue(MockResponse().setBody(failed(41, "Token authentication not supported for LDAP users.")))