Skip to content

Integration tests against an IRIS container for release-preparation PRs - #1870

Draft
isc-klu wants to merge 19 commits into
intersystems-community:masterfrom
isc-klu:integration-tests
Draft

Integration tests against an IRIS container for release-preparation PRs#1870
isc-klu wants to merge 19 commits into
intersystems-community:masterfrom
isc-klu:integration-tests

Conversation

@isc-klu

@isc-klu isc-klu commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Closes #1863. Integration suite against a real iris-community:latest-cd container, run from a new prepare-release.yml workflow on prepare-* PRs and on manual dispatch. The npm test step leaves the per-PR workflows.

Configurations × checks

src/test/suite/extension.test.ts. Each workspace folder in test-fixtures/ci.code-workspace is one configuration, with its settings in the matching directory under test-fixtures/. The same check runs against every configuration it applies to.

Configuration connects save + delete syncs toggle active expired session check after expiry
client-hostport: client-side, objectscript.conn with host/port and credentials, no intersystems.servers skipped
client-compose: client-side, objectscript.conn with docker-compose and credentials, no intersystems.servers skipped skipped
client-named-server: client-side, objectscript.conn.server naming an intersystems.servers entry with credentials skipped
client-inactive: client-side, objectscript.conn active: false naming an intersystems.servers entry without a password (unreachable host) stays inactive, exposes no password
server-side: intersystems.servers entry with credentials ✓ (+ lists the namespace)

Checks: connects = credentials in settings used without prompting, serverForUri returns them; save + delete syncs = a class written through the folder appears on the server and disappears when deleted, verified over REST; toggle active = objectscript.conn.active false then true is honoured; expired session = after 13 s idle (server timeout 10 s) save + delete still works without prompting; check after expiry = the connection check on re-enabling after 13 s idle recovers without prompting.

Related issues and PRs: connects → language-server#415/#1846 (client-hostport), #1858/#1860 (client-compose), #1837/#1836, #1820 (client-named-server, server-side); client-inactive#1832/#1835, #1740, #1825/#1824; toggle → #1747/#1748, #1805/#1808; expired session → #1829, #1823/#1830, #1824; check after expiry → #1861/#1864.

Verified to catch regressions by reverting the fix on master and watching the suite fail: #1846, #1860, #1830. Reverting #1835 did not fail the suite (activation didn't block here).

Skipped, pre-existing bugs: check after expiry prompts for a password and never settles (#1861); fails on master, passes on the #1864 branch, which should un-skip it. client-compose never goes inactive: AtelierAPI.setConnection hard-codes active: true for a resolved docker-compose connection.

Not covered: unauthenticated connections (#1840; IRIS routes any .../api/atelier path to the primary web app), UI-only paths (#1787, #1784), activation timeout (#1810), session leaks (#1805).

How it works

Every configuration connects to the same container. Its /api/atelier session timeout is 10 s so expiry checks hit a real 401. ~90 s once the container is up; test-fixtures/README.md covers running it locally with Podman or Docker.

Activation dedupes connection checks by server name, so client-named-server (server ci, shared with server-side) only connects once a document in it becomes active; the test opens a file there to mirror that.

Runner fixes

npm test could not launch VS Code: @vscode/test-electron 2.x looks for the since-renamed Contents/MacOS/Electron (bumped to 3.x); Electron rejects -n; ELECTRON_RUN_AS_NODE from an extension-spawned terminal made VS Code run as plain Node; the mocha promise settled before the tests ran.

Replaces the placeholder test with a suite that opens a multi-root workspace whose folders connect to
one iris-community container by each supported mechanism (objectscript.conn host/port, docker-compose
port resolution, intersystems.servers entry, isfs), plus an inactive folder pointing at an unreachable
host. The container's /api/atelier session timeout is 10 s so expired-session recovery is exercised.

Runs from a new prepare-release.yml workflow on PRs from prepare-* branches and on manual dispatch;
the old npm test step is removed from the per-PR workflows.

Also fixes the runner, which could not launch VS Code at all: bump @vscode/test-electron to 3.x
(2.x looks for the renamed Contents/MacOS/Electron), drop the rejected -n arg, unset
ELECTRON_RUN_AS_NODE inherited from extension-spawned terminals, use a fresh user-data-dir per run,
and make the mocha runner's promise settle when the tests finish.

Closes intersystems-community#1863

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-release unit tests

1 participant