diff --git a/release_notes.md b/release_notes.md index 35ee86be6f..1221e810be 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,5 +1,7 @@ ## next (unreleased) +- [#567](https://github.com/TestArmada/flank/pull/567) Fix `--app` & `--test` on Android CLI. ([bootstraponline](https://github.com/bootstraponline)) + ## v6.2.2 - [#566](https://github.com/TestArmada/flank/pull/566) Fix `--test` & `--xctestrun-file` on iOS CLI. ([bootstraponline](https://github.com/bootstraponline)) diff --git a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt index 6aacac152a..b77efe160a 100644 --- a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt @@ -25,6 +25,7 @@ import ftl.args.yml.YamlDeprecated import ftl.cli.firebase.test.android.AndroidRunCommand import ftl.config.Device import ftl.config.FtlConstants +import ftl.util.Utils.fatalError import java.nio.file.Files import java.nio.file.Path @@ -47,8 +48,8 @@ class AndroidArgs( override val flakyTestAttempts = cli?.flakyTestAttempts ?: gcloud.flakyTestAttempts private val androidGcloud = androidGcloudYml.gcloud - var appApk = cli?.app ?: androidGcloud.app - var testApk = cli?.test ?: androidGcloud.test + var appApk = cli?.app ?: androidGcloud.app ?: fatalError("app is not set") + var testApk = cli?.test ?: androidGcloud.test ?: fatalError("test is not set") val autoGoogleLogin = cli?.autoGoogleLogin ?: cli?.noAutoGoogleLogin?.not() ?: androidGcloud.autoGoogleLogin // We use not() on noUseOrchestrator because if the flag is on, useOrchestrator needs to be false diff --git a/test_runner/src/main/kotlin/ftl/args/yml/AndroidGcloudYml.kt b/test_runner/src/main/kotlin/ftl/args/yml/AndroidGcloudYml.kt index 38ef3046c7..046555592c 100644 --- a/test_runner/src/main/kotlin/ftl/args/yml/AndroidGcloudYml.kt +++ b/test_runner/src/main/kotlin/ftl/args/yml/AndroidGcloudYml.kt @@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty import ftl.config.Device import ftl.config.FtlConstants.defaultAndroidModel import ftl.config.FtlConstants.defaultAndroidVersion -import ftl.util.Utils.assertNotEmpty /** * Android specific gcloud parameters @@ -14,8 +13,8 @@ import ftl.util.Utils.assertNotEmpty */ @JsonIgnoreProperties(ignoreUnknown = true) class AndroidGcloudYmlParams( - val app: String = "", - val test: String = "", + val app: String? = null, + val test: String? = null, @field:JsonProperty("auto-google-login") val autoGoogleLogin: Boolean = true, @@ -46,11 +45,6 @@ class AndroidGcloudYmlParams( "directories-to-pull", "performance-metrics", "test-runner-class", "test-targets", "device" ) } - - init { - assertNotEmpty(app, "app is not set") - assertNotEmpty(test, "test is not set") - } } @JsonIgnoreProperties(ignoreUnknown = true)