Files
flamenet-messenger-android/app/src/debug
Paul Hitt 16e0101daf Make the instrumented tests capable of failing
Three separate reasons these suites could never catch a regression, all
fixed here. None of them are about the app; all of them are about the tests
being unable to report the truth.

1. A skipped test reported as a pass. Thirteen guards were bare returns —
   `if (!relayReachable()) return` — so with no relay the method returned
   immediately and the runner recorded PASSED. Now `assumeTrue`, which
   reports SKIPPED, and the run says "(2 skipped)" where it used to say
   nothing at all. Only the guards that abandon a whole test were changed;
   helper loop exits like `if (found) return` are control flow and were
   left alone.

2. The relay was hardcoded to relay1.flamenet.io — production. Every run
   that did work created real accounts there. Now `-e relay <host>`, still
   defaulting to production so an unqualified run is unchanged.

3. Android blocks cleartext HTTP, so a debug build could not reach a relay
   on the developer's machine even when one was running. A debug-only
   network security config permits cleartext to 10.0.2.2, 127.0.0.1 and
   localhost, and nothing else. src/debug, so no release APK is affected.

Together these took the sign-up suite from "2 skipped, reported green" to
"2 run, 2 failed" — which is worth more, because it is true. What it
fails on now (no compose hierarchy at launch) is the next thing to fix.

  ./gradlew :app:connectedDebugAndroidTest \
      -Pandroid.testInstrumentationRunnerArguments.relay=10.0.2.2:18810
2026-09-02 20:58:26 -04:00
..