Skip to content

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

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

isc-klu wants to merge 4 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 real iris-community:latest-cd containers, run by a new prepare-release.yml workflow on prepare-* PRs and on manual dispatch (Podman on the runner).

What runs

src/test/cases.ts generates one .code-workspace per case into test-fixtures/.generated/; runTest.ts opens each in a downloaded VS Code with the released Server Manager installed alongside, and src/test/suite/extension.test.ts runs the checks that apply. 12 launches across four connection shapes × -named/-anonymous × (-active/-inactive where it applies). test-fixtures/README.md is the full matrix, the container layout, and how to run it locally.

Two containers back every case: iris (password only) and iris-anon (unauthenticated only), each with a 10-second /api/atelier session timeout so expired-session recovery meets a real 401.

Coverage

  • clientSide-os-hostobjectscript.conn with host/port/credentials
  • clientSide-os-dockerobjectscript.conn.docker-compose port resolution (through Podman)
  • clientSide-smobjectscript.conn.server naming an intersystems.servers entry
  • serverSide-sm — an isfs:// folder on an entry (no objectscript.conn)

Each case, in a fresh user-data-dir: resolves without prompting (host, port, ns, credentials as configured); a class written through the folder syncs to the server and back on delete iff the connection is active; flipping objectscript.conn.active is honored (host and sm); a serverSide folder lists the namespace; and Server Manager's getServerSpec returns the configured spec. Every check then repeats past the session timeout so a lapsed cookie must be renewed. Any credential prompt fails the case, since VS Code suppresses modal dialogs in tests and the input box would block to the mocha timeout.

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.

🤖 Generated with Claude Code

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>
isc-klu and others added 3 commits September 14, 2026 15:37
Run the IRIS containers under Podman and drop the runner's Docker Compose so
the extension's docker-compose connection resolves through Podman too. Fixes
the docker-compose case (needs objectscript.conn.active) and stops the
post-timeout round-trip from re-verifying delete-sync, which older releases
don't re-wire after a session lapses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <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