diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c00c5d973..ea2c80d36 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -69,12 +69,6 @@ android { } } - testOptions { - unitTests.all { - it.ignoreFailures = true - } - } - packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" diff --git a/provider/flixhq/src/test/kotlin/com/flixclusive/provider/flixhq/FlixHQTest.kt b/provider/flixhq/src/test/kotlin/com/flixclusive/provider/flixhq/FlixHQTest.kt deleted file mode 100644 index c5be9156e..000000000 --- a/provider/flixhq/src/test/kotlin/com/flixclusive/provider/flixhq/FlixHQTest.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.flixclusive.provider.flixhq - -import com.flixclusive.core.util.network.CryptographyUtil.decryptAes -import com.flixclusive.provider.base.testing.BaseProviderTest -import okhttp3.OkHttpClient -import org.junit.Assert.assertEquals -import org.junit.Before -import org.junit.Test - -@Suppress("SpellCheckingInspection") -class FlixHQTest : BaseProviderTest() { - - @Before - override fun setUp() { - super.setUp() - - sourceProvider = FlixHQ(OkHttpClient()) - } - - @Test - fun `verify decryption tool`() { - val encString = "U2FsdGVkX19CIuaIRgRRf1pJVxKY/7n1obeNUcQrizcCUdaPwDa7OG3pNT7KDRD7DfFIlUha8IPbVvmtYsY+1ehAGVp3mV5KtcVo+8AfsoqWkSkP7KuCTggiymPOQg094fWDy4pHAUGHe+RmO9ZQi0SE+MWrDbKTeAhtC4TlLVpHJMFYqw1rlNdAD7rRp6H5HCsnG8QIZ1QqQN8G3nnYd5BYbYkvvsYT+ahTlY2r1C5CkDzyaeb647VVjRsYBSTAIaCVk3xC/seXA3dQgICoVWPHXPgVSMj0USc8Dirdacc0U3HL0ySkZPtxC8mhhr1bXnnHCN10SACWEJpZwDXhyPE6pwer0FnySnUW/eqVGiCpZxdvNjWIuvGBqtyNUIm1cpzQsxRfVreq7YwP1BDFU2OwYPtFq7DY4KPqbZtLGSAHRL0OcmnucVuxRRRUIn5PPxdL2my26YjNZHUuzgySOsMuvpp1LwpXk2HdyZWOJmft0JwdKgj4RDz5yKDbGXIF" - val key = "ZTwVpfLANX3t6Xb7cBpbkmFrGT0bCpEvBiN" - - val result = decryptAes(encString, key) - assertEquals(true, result.contains("http")) - } -} \ No newline at end of file diff --git a/provider/lookmovie/src/test/kotlin/com/flixclusive/provider/lookmovie/LookMovieTest.kt b/provider/lookmovie/src/test/kotlin/com/flixclusive/provider/lookmovie/LookMovieTest.kt deleted file mode 100644 index c150d8f94..000000000 --- a/provider/lookmovie/src/test/kotlin/com/flixclusive/provider/lookmovie/LookMovieTest.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.flixclusive.provider.lookmovie - -import com.flixclusive.provider.base.testing.BaseProviderTest -import okhttp3.OkHttpClient -import org.junit.Before - -class LookMovieTest : BaseProviderTest() { - - @Before - override fun setUp() { - super.setUp() - - sourceProvider = LookMovie(OkHttpClient()) - } -} \ No newline at end of file diff --git a/provider/superstream/src/test/kotlin/com/flixclusive/provider/superstream/SuperStreamTest.kt b/provider/superstream/src/test/kotlin/com/flixclusive/provider/superstream/SuperStreamTest.kt deleted file mode 100644 index 47c93adc5..000000000 --- a/provider/superstream/src/test/kotlin/com/flixclusive/provider/superstream/SuperStreamTest.kt +++ /dev/null @@ -1,54 +0,0 @@ -package com.flixclusive.provider.superstream - -import com.flixclusive.core.util.log.debugLog -import com.flixclusive.core.util.network.asString -import com.flixclusive.provider.base.testing.BaseProviderTest -import com.flixclusive.provider.superstream.SuperStreamCommon.apiUrl -import com.flixclusive.provider.superstream.util.CipherUtils.decrypt -import junit.framework.TestCase.assertNotNull -import okhttp3.MediaType.Companion.toMediaType -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.RequestBody.Companion.toRequestBody -import org.junit.Before -import org.junit.Test - -class SuperStreamTest : BaseProviderTest() { - private val data = "eyJhcHBfa2V5IjoiNjQwNWMyZTYwNDVmNjU5YjdmZGNkOTU3ZmU1MmZlOWEiLCJ2ZXJpZnkiOiJmYzhjYzg0ODc5NDVjNjBmY2Y5YWJkMTNhZWU1ODNmNCIsImVuY3J5cHRfZGF0YSI6IkZER2kwcGV3R2MyUklWdTJKM2ltWVRVRU9abHZaM0xhdVo0c25YNXVaZUZWbi9ZYi9ROVA5WWFSMDViekhUWVpJYmIrQ0VpQzBwSVZuS0ZNR3AwYnVSTEFLS1pqbENOQm9oakNlaEpYSEF5NmRYSUxmN3RSY01jTXR3TElYWFlqd2xtdjJEQlQxaFRmNS9xU29QZlJKZlRXT1FJU3Q2eWhWQ3I4OG9zNEl6QldSZnV4ZmhuMDFScS9keVRRNCszSFlodUwvdTlxZXZmZkxyTnVOWmhnd1kvdDArNnZVSzNwR2dXU09ablZGRWtnY3ZvV1k3RFNTelNuTXBXMTJpKzFFQVpNTXFRNHNDVGYydURyVW9ZeklQQlZTOU9CbDY1emF0WnJVMHdPYkp3PSJ9" - - @Before - override fun setUp() { - super.setUp() - - sourceProvider = SuperStream(OkHttpClient()) - } - - @Test - fun decryption() { - val result = decrypt(data, SuperStreamCommon.key, SuperStreamCommon.iv) - - assertNotNull(result) - debugLog(result!!) - } - - - @Test - fun cloudfareTest() { - val client = OkHttpClient() - val mediaType = "application/x-www-form-urlencoded".toMediaType() - val body = "data=$data&appid=27&platform=android&version=160&medium=Website%26token=f8ed3c62d0d57a5823ccbe14b802ed57".toRequestBody(mediaType) - val request = Request.Builder() - .url(apiUrl) - .post(body) - .addHeader("Platform", "android") - .addHeader("Accept", "charset=utf-8") - .addHeader("Content-Type", "application/x-www-form-urlencoded") - .build() - - val responseBody = client.newCall(request).execute().body?.charStream()?.asString() - - assertNotNull(responseBody) - assert(responseBody!!.contains("cloudfare", true).not()) - println(responseBody) - } -} \ No newline at end of file