test: let the suite address a regtest stack that is not on localhost - #206
Open
mdozhdev wants to merge 1 commit into
Open
test: let the suite address a regtest stack that is not on localhost#206mdozhdev wants to merge 1 commit into
mdozhdev wants to merge 1 commit into
Conversation
The suite assumes the stack runs on the machine the tests run on: LND is
reached at localhost, its cert and macaroon are read from the working
copy, and connectToLND types 0.0.0.0 into the app. That holds only while
Docker and the iOS Simulator share a host, which GitHub-hosted macOS
runners cannot do.
Make the address configurable, keeping every current default so existing
runs are unaffected:
docker-compose.yml LND advertises LND_EXTERNAL_IP, else 127.0.0.1
constants.ts lndConfig host, ports and credential paths from env
lnd.ts connectToLND uses the configured host
wdio.conf.ts forwards E2E_LOCAL_HOST into the app's launch
environment, which is how a build made before the
stack existed learns its address
The credential paths are separate from the host because they are files,
so they have to be fetched from wherever the stack runs before the suite
can use them.
Required by either way of running the stack off the Mac, so it is
independent of that choice.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The suite assumes the regtest stack runs on the machine the tests run on — LND at
localhost, its cert and macaroon read from the working copy, andconnectToLNDtyping0.0.0.0into the app.That holds only while Docker and the iOS Simulator share a host. GitHub-hosted macOS runners cannot run Docker (Apple's Virtualization framework has no nested virtualization for macOS guests, closed not planned), which is why the iOS suite runs on a self-hosted Mac at ~2h per run against ~20m for the same tests on Android's hosted Linux runners.
What
Makes the address configurable. Every current default is preserved, so existing runs are unaffected.
docker-compose.ymlLND_EXTERNAL_IP, else127.0.0.1constants.tslndConfighost, ports and credential paths from envlnd.tsconnectToLNDuses the configured hostwdio.conf.tsE2E_LOCAL_HOSTinto the app's launch environmentCredential paths are separate from the host because they are files — they have to be fetched from wherever the stack runs before the suite can read them.
wdio.conf.tsis the link that is easy to miss: settingE2E_LOCAL_HOSTin a workflow only sets it on the runner's shell. Appium launches the app as a separate process, so it needsprocessArguments.envto reachEnv.swift.Scope
This is the groundwork both candidate approaches need, split out so it can be agreed independently of which one is chosen:
Both depend on this. On its own it changes no behaviour — nothing sets these variables yet.
The matching app-side change is synonymdev/bitkit-ios#680, which lets
Env.swiftreadE2E_LOCAL_HOSTat launch rather than only fromInfo.plistat build time.Verified
tsc --noEmitandeslintclean.docker compose configrenders127.0.0.1with nothing set and the supplied address whenLND_EXTERNAL_IPis present; confirmed against a running LND that it advertises the injected value.Related