Simplify test infrastructure and fix versions#456
Conversation
…folder - Remove shared/test/ directory and iosTests symlink - Both iosTests/ and androidTests/ now expect test_credentials.json at their root (gitignored) - prepareios.js and prepareandroid.js copy it to where the native project reads it (ios/ for Xcode, android assets for Android) - CI workflows run create_test_credentials_from_env.js before prepare so the file exists when prepare copies it
Tests should always run against the local code, not a remote branch. This removes the need to push changes before testing.
Ensures the latest test_credentials.json is always picked up regardless of when prepareandroid.js was run.
| jvmToolchain(17) | ||
| } | ||
|
|
||
| // Copy test_credentials.json from androidTests/ root into assets before each build |
There was a problem hiding this comment.
Is this a good time to switch to the same /shared/test/ directory that the other repos use?
Edit: The directory already exists in the repo, it just isn't used.
There was a problem hiding this comment.
I did it half-way (android using it, but ios left unchanged) - then moved away from it because of the different expectations around login server. But now that it's fixed, a shared/tests/test_credentials.json would make sense. Maybe I'll do that in the next PR (the 0.83 upgrade ;-).
There was a problem hiding this comment.
It makes using the workspace and automating CI fixes a lot easier when the setup for all repos is standardized.
|
Android CI failure explained: The MobileSync tests timeout because test_credentials.json never reaches the APK and the other tests do not get a chance to run. Locally, they all pass. Two issues:
Both fixes need to land in dev before Android CI can pass. |
Summary
iosTests/andandroidTests/expecttest_credentials.jsonat their root (removedshared/test/directory and symlink)file:..forreact-native-forcein testpackage.json— tests always run against local code, no push requiredtest_credentials.jsonto assets at build time (no more ordering dependency withprepareandroid.js)react-android/hermes-androidversion:0.81.5→0.82.1.gitignorefor test artifactscreate_test_credentials_from_env.jsbefore prepare scriptsTest plan
prepareandroid.jsruns successfullytest_credentials.jsonprints a clear warning