Context
Companion to #3025; the small half of the subfolder phase-2 work from discussion #2887 / issue #2968. PR #2985 gave the framework a subpath setting (set(subpath="/myapp") / WHEELS_SUBPATH), so generated URLs and asset paths now work under a URL prefix — but the CLI test command still assumes the app is mounted at the server root.
Problem
cli/lucli/Module.cfc:4741 — var testPath = coreTests ? "/wheels/core/tests" : "/wheels/app/tests"; builds the runner URL with no subfolder segment.
cli/lucli/Module.cfc:6819 — second hardcoded http://localhost:#serverPort#/wheels/app/tests?... URL with the same assumption.
For an app mounted at /wheelsproject1 (the six-instance IIS/CommandBox setup in #2887), the CLI requests /wheels/app/tests, which the rewrite layer never routes to the app — wheels test is unusable in that topology.
Proposed direction
- Accept an explicit
--base-path=/wheelsproject1 flag on wheels test (and the wheels_test MCP tool input), prefixed onto both URL constructions.
- When the flag is absent, auto-derive: read
WHEELS_SUBPATH from the environment, else scan config/settings.cfm for set(subpath=...) (strip CFML comments first — see Anti-Pattern 14 and the existing stripCfmlComments() helpers). Explicit flag wins over derivation.
- Normalize like the framework does (leading slash, no trailing slash — mirror
$resolveFrameworkPaths() in vendor/wheels/Global.cfc:2447).
Note the CLI ArgSpec migration context (#2861): implement the new flag via ArgSpec, not the legacy argsFromCollection round-trip, so --base-path=... parses reliably.
Acceptance
Refs #2887. Follow-up to #2985 (phase 1).
Context
Companion to #3025; the small half of the subfolder phase-2 work from discussion #2887 / issue #2968. PR #2985 gave the framework a
subpathsetting (set(subpath="/myapp")/WHEELS_SUBPATH), so generated URLs and asset paths now work under a URL prefix — but the CLI test command still assumes the app is mounted at the server root.Problem
cli/lucli/Module.cfc:4741—var testPath = coreTests ? "/wheels/core/tests" : "/wheels/app/tests";builds the runner URL with no subfolder segment.cli/lucli/Module.cfc:6819— second hardcodedhttp://localhost:#serverPort#/wheels/app/tests?...URL with the same assumption.For an app mounted at
/wheelsproject1(the six-instance IIS/CommandBox setup in #2887), the CLI requests/wheels/app/tests, which the rewrite layer never routes to the app —wheels testis unusable in that topology.Proposed direction
--base-path=/wheelsproject1flag onwheels test(and thewheels_testMCP tool input), prefixed onto both URL constructions.WHEELS_SUBPATHfrom the environment, else scanconfig/settings.cfmforset(subpath=...)(strip CFML comments first — see Anti-Pattern 14 and the existingstripCfmlComments()helpers). Explicit flag wins over derivation.$resolveFrameworkPaths()invendor/wheels/Global.cfc:2447).Note the CLI ArgSpec migration context (#2861): implement the new flag via ArgSpec, not the legacy argsFromCollection round-trip, so
--base-path=...parses reliably.Acceptance
wheels test(andwheels test --core) passes against an app served underset(subpath="/myapp")with rewrite rules per the Running Wheels 4 in a subfolder - And figuring out tests (broken) #2887 recipe.Refs #2887. Follow-up to #2985 (phase 1).