Skip to content

Commit

Permalink
Get apk details with retry (#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelpasterz authored Aug 2, 2021
1 parent e2a2ef3 commit 731a5c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_runner/src/main/kotlin/ftl/client/google/AppDetails.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package ftl.client.google

import com.google.testing.model.FileReference
import ftl.http.executeWithRetry

fun getAndroidAppDetails(gcsAppPath: String): String =
GcTesting.get.ApplicationDetailService().getApkDetails(FileReference().apply { gcsPath = gcsAppPath })
.execute()?.apkDetail?.apkManifest?.packageName?.toString().orEmpty()
.executeWithRetry()?.apkDetail?.apkManifest?.packageName?.toString().orEmpty()
6 changes: 6 additions & 0 deletions test_runner/src/test/kotlin/ftl/run/TestRunnerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ftl.adapter.google.getFilePathToDownload
import ftl.api.Artifacts.DownloadPath
import ftl.args.AndroidArgs
import ftl.args.IosArgs
import ftl.client.google.getAndroidAppDetails
import ftl.http.executeWithRetry
import ftl.test.util.FlankTestRunner
import ftl.test.util.LocalGcs
Expand Down Expand Up @@ -162,6 +163,11 @@ class TestRunnerTest {
getMockedTestMatrix().apply { state = "RUNNING" },
getMockedTestMatrix()
)
mockkStatic("ftl.client.google.AppDetailsKt")
every {
getAndroidAppDetails(any())
} returns ""

runBlocking {
localConfig.newTestRun()
}
Expand Down

0 comments on commit 731a5c1

Please sign in to comment.