A skipped live sign-up must report skipped, not passed

The two live sign-up tests guarded themselves with a bare `return`, so
without `-e live true` they finished immediately and reported PASSED. A
test that did nothing and says it passed is worse than one that did not run:
a suite of those is indistinguishable from a suite that works, which is the
only reason to run it.

`assumeTrue` instead, with the message saying how to opt in. Assumed-out
shows as skipped, so the count reflects what was actually exercised.

The iOS side already had this reasoning written down; Android had the
comment's opposite.

Compiles: :app:compileDebugAndroidTestKotlin.
This commit is contained in:
Paul Hitt
2026-09-03 19:02:54 -04:00
parent 40da124b27
commit 96b612597d
@@ -92,15 +92,28 @@ class LiveSignUpFleetTest {
signOutIfSignedIn() signOutIfSignedIn()
} }
/**
* 🔴 `assumeTrue`, never a bare `return`.
*
* A bare return leaves the test reporting PASSED having done nothing, and
* a suite of those is indistinguishable from a suite that works — which is
* the whole reason to run it. Assumed-out shows as skipped, so the count
* tells the truth about what was actually exercised.
*/
private fun requireLiveOptIn() =
assumeTrue(
"pass -e live true to run these — they create real accounts on accounts.flamenet.io",
args.getString("live") == "true")
@Test @Test
fun signUpOnTheManagedRelay() { fun signUpOnTheManagedRelay() {
assumeTrue("pass -e live true to run this - it creates real accounts", args.getString("live") == "true") requireLiveOptIn()
signUpLive(managed, "m") signUpLive(managed, "m")
} }
@Test @Test
fun signUpOnASharedSelfHostedRelay() { fun signUpOnASharedSelfHostedRelay() {
assumeTrue("pass -e live true to run this - it creates real accounts", args.getString("live") == "true") requireLiveOptIn()
signUpLive(sharedSelfHosted, "s") signUpLive(sharedSelfHosted, "s")
} }