From 8dee5d488a032856c9d8291525e96fa0404091ee Mon Sep 17 00:00:00 2001 From: Pawel Pasterz Date: Wed, 30 Sep 2020 12:08:08 +0200 Subject: [PATCH] Update test --- .../SanityWithAutoConfigureTest.kt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/buildSrc/src/test/java/com/osacky/flank/gradle/integration/SanityWithAutoConfigureTest.kt b/buildSrc/src/test/java/com/osacky/flank/gradle/integration/SanityWithAutoConfigureTest.kt index a810c161..ee30b0fd 100644 --- a/buildSrc/src/test/java/com/osacky/flank/gradle/integration/SanityWithAutoConfigureTest.kt +++ b/buildSrc/src/test/java/com/osacky/flank/gradle/integration/SanityWithAutoConfigureTest.kt @@ -71,6 +71,13 @@ class SanityWithAutoConfigureTest { ] }) flakyTestAttempts.set(3) } + oranges { + useOrchestrator.set(false) + testTargets.set(project.provider { [ + "class com.osacky.flank.gradle.sample.ExampleInstrumentedTest#runAndFail" + ] }) + flakyTestAttempts.set(6) + } } } """ @@ -154,6 +161,46 @@ class SanityWithAutoConfigureTest { output-style: single """.trimIndent() ) + + val orangesResult = gradleRun( + projectDir = testProjectRoot.root, + arguments = listOf("printYmlOranges") + ) + + assertThat(orangesResult.output).contains("BUILD SUCCESSFUL") + assertThat(orangesResult.output).containsMatch( + """ + gcloud: + app: [0-9a-zA-Z\/_]*/build/outputs/apk/debug/[0-9a-zA-Z\/_]*-debug.apk + test: [0-9a-zA-Z\/_]*/build/outputs/apk/androidTest/debug/[0-9a-zA-Z\/_]*-debug-androidTest.apk + device: + - model: Pixel2 + version: 26 + - model: Nexus5 + version: 23 + + use-orchestrator: false + auto-google-login: false + record-video: true + performance-metrics: true + timeout: 15m + environment-variables: + clearPackageData: true + test-targets: + - class com.osacky.flank.gradle.sample.ExampleInstrumentedTest#runAndFail + num-flaky-test-attempts: 6 + + flank: + smart-flank-gcs-path: gs://test-lab-yr9w6qsdvy45q-iurp80dm95h8a/flank/test_app_android.xml + keep-file-path: false + ignore-failed-tests: false + disable-sharding: false + smart-flank-disable-upload: false + legacy-junit-result: false + full-junit-result: false + output-style: single + """.trimIndent() + ) } @Test