Skip to content

Commit

Permalink
Add invalid app tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Jan 27, 2019
1 parent 9d532b0 commit 2beb000
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test_runner/src/test/kotlin/ftl/args/IosArgsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class IosArgsTest {
private val testPath = "./src/test/kotlin/ftl/fixtures/tmp/EarlGreyExample.zip"
private val xctestrunFile =
"./src/test/kotlin/ftl/fixtures/tmp/EarlGreyExampleSwiftTests_iphoneos12.1-arm64e.xctestrun"
private val invalidApp = "../test_app/apks/invalid.apk"
private val xctestrunFileAbsolutePath = xctestrunFile.absolutePath()
private val testAbsolutePath = testPath.absolutePath()
private val iosNonDefault = """
Expand Down Expand Up @@ -256,6 +257,30 @@ IosArgs
}
}

@Test
fun `disableSharding allows using invalid app`() {
val yaml = """
gcloud:
test: $invalidApp
xctestrun-file: $invalidApp
flank:
disableSharding: true
"""
IosArgs.load(yaml).testShardChunks
}

@Test(expected = RuntimeException::class)
fun `Invalid app throws`() {
val yaml = """
gcloud:
test: $invalidApp
xctestrun-file: $invalidApp
flank:
disableSharding: false
"""
IosArgs.load(yaml).testShardChunks
}

// gcloudYml

@Test
Expand Down

0 comments on commit 2beb000

Please sign in to comment.