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
4
4
abstract class AbstractTest <T : GenericSpotifyApi > {
5
5
var api: T ? = null
6
6
7
- fun testPrereq () = api != null
7
+ open fun testPrereq () = api != null
8
8
9
9
suspend inline fun <reified Z : T > build (): Boolean {
10
10
return try {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.adamratzman.spotify.priv
3
3
4
4
import com.adamratzman.spotify.AbstractTest
5
5
import com.adamratzman.spotify.SpotifyClientApi
6
+ import com.adamratzman.spotify.getEnvironmentVariable
6
7
import com.adamratzman.spotify.models.CurrentlyPlayingType
7
8
import com.adamratzman.spotify.models.PlayableUri
8
9
import com.adamratzman.spotify.models.SpotifyContextType
@@ -25,6 +26,10 @@ import kotlinx.coroutines.delay
25
26
26
27
@ExperimentalTime
27
28
class ClientPlayerApiTest : AbstractTest <SpotifyClientApi >() {
29
+ override fun testPrereq (): Boolean {
30
+ return super .testPrereq() && getEnvironmentVariable(" SPOTIFY_ENABLE_PLAYER_TESTS" )?.toBoolean() == true
31
+ }
32
+
28
33
@Test
29
34
fun testGetDevices () {
30
35
return runBlockingTest {
You can’t perform that action at this time.
0 commit comments