mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
record genre support in the integration test fixture
The Nextcloud genre exception was a comment; express it as a TestServer capability instead, mirroring supportsTokenAuth.
This commit is contained in:
+1
-2
@@ -67,8 +67,7 @@ class SubsonicSourceIntegrationTest(
|
||||
|
||||
assertEquals(20, songs.size)
|
||||
assertTrue(songs.all { song -> song.genre == null || song.genres.isEmpty() || song.genres.contains(song.genre) })
|
||||
// Nextcloud Music does not populate the OpenSubsonic genres array.
|
||||
if (server.name != "nextcloud") {
|
||||
if (server.supportsGenres) {
|
||||
assertTrue(songs.any { it.genres.isNotEmpty() })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ data class TestServer(
|
||||
val username: String,
|
||||
val password: String,
|
||||
val supportsTokenAuth: Boolean,
|
||||
val supportsGenres: Boolean,
|
||||
) {
|
||||
override fun toString(): String = name
|
||||
}
|
||||
@@ -16,15 +17,16 @@ data class TestServer(
|
||||
object TestServers {
|
||||
val all =
|
||||
listOf(
|
||||
TestServer("navidrome", "http://localhost:4533/", "admin", "password", supportsTokenAuth = true),
|
||||
TestServer("gonic", "http://localhost:4747/", "admin", "admin", supportsTokenAuth = true),
|
||||
TestServer("lms", "http://localhost:5082/", "admin", "subtracks-lms", supportsTokenAuth = false),
|
||||
TestServer("navidrome", "http://localhost:4533/", "admin", "password", supportsTokenAuth = true, supportsGenres = true),
|
||||
TestServer("gonic", "http://localhost:4747/", "admin", "admin", supportsTokenAuth = true, supportsGenres = true),
|
||||
TestServer("lms", "http://localhost:5082/", "admin", "subtracks-lms", supportsTokenAuth = false, supportsGenres = true),
|
||||
TestServer(
|
||||
"nextcloud",
|
||||
"http://localhost:8090/index.php/apps/music/subsonic/",
|
||||
"admin",
|
||||
"subtracks-nextcloud",
|
||||
supportsTokenAuth = false,
|
||||
supportsGenres = false,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user