File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/commonTest/kotlin/com.adamratzman/spotify Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package com.adamratzman.spotify
44abstract class AbstractTest <T : GenericSpotifyApi > {
55 var api: T ? = null
66
7- fun testPrereq () = api != null
7+ open fun testPrereq () = api != null
88
99 suspend inline fun <reified Z : T > build (): Boolean {
1010 return try {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.adamratzman.spotify.priv
33
44import com.adamratzman.spotify.AbstractTest
55import com.adamratzman.spotify.SpotifyClientApi
6+ import com.adamratzman.spotify.getEnvironmentVariable
67import com.adamratzman.spotify.models.CurrentlyPlayingType
78import com.adamratzman.spotify.models.PlayableUri
89import com.adamratzman.spotify.models.SpotifyContextType
@@ -25,6 +26,10 @@ import kotlinx.coroutines.delay
2526
2627@ExperimentalTime
2728class ClientPlayerApiTest : AbstractTest <SpotifyClientApi >() {
29+ override fun testPrereq (): Boolean {
30+ return super .testPrereq() && getEnvironmentVariable(" SPOTIFY_ENABLE_PLAYER_TESTS" )?.toBoolean() == true
31+ }
32+
2833 @Test
2934 fun testGetDevices () {
3035 return runBlockingTest {
You can’t perform that action at this time.
0 commit comments