mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
tidy the integration harness and its comments
Trim the explanatory comments to short quirk notes, drop the module headers, and fail cleanly: navidrome/gonic now kill their process if they never become ready and the entrypoint always tears down. The prune test waits for the removal to appear in the album list rather than for the scan flag. Correct the AGENTS token-auth note (lms answers 42, Nextcloud 41) and give CI more headroom.
This commit is contained in:
@@ -82,10 +82,10 @@ class PruneSyncIntegrationTest {
|
||||
|
||||
call("startScan")
|
||||
repeat(120) {
|
||||
if (!call("getScanStatus").contains("\"scanning\":true")) return
|
||||
if (!call("getAlbumList2", "&type=newest&size=500").contains(REMOVED_ALBUM_NAME)) return
|
||||
Thread.sleep(500)
|
||||
}
|
||||
error("the prune server did not finish rescanning")
|
||||
error("the prune server still lists $REMOVED_ALBUM_NAME after rescanning")
|
||||
}
|
||||
|
||||
private fun requireProperty(name: String): String =
|
||||
@@ -94,5 +94,6 @@ class PruneSyncIntegrationTest {
|
||||
|
||||
private companion object {
|
||||
const val REMOVED_ALBUM_DIR = "197"
|
||||
const val REMOVED_ALBUM_NAME = "Retroconnaissance EP"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,8 +96,7 @@ class SubsonicClient(
|
||||
const val API_VERSION = "1.15.0"
|
||||
const val CLIENT = "subtracks"
|
||||
|
||||
// 41 is the classic Subsonic code for "token authentication not supported"; OpenSubsonic
|
||||
// servers (lms) answer 42 instead, so both must disable token auth and retry.
|
||||
// Classic Subsonic uses 41; OpenSubsonic servers (lms) answer 42, so both disable token auth.
|
||||
val TOKEN_AUTH_UNSUPPORTED_CODES = setOf(41, 42)
|
||||
|
||||
private fun randomSalt(): String = (1..4).map { ('a'..'z').random() }.joinToString("")
|
||||
|
||||
Reference in New Issue
Block a user