Add CI test for configurable REST context path (/myidm)#152
Draft
Copilot wants to merge 3 commits intocopilot/make-rest-context-path-configurablefrom
Draft
Add CI test for configurable REST context path (/myidm)#152Copilot wants to merge 3 commits intocopilot/make-rest-context-path-configurablefrom
Copilot wants to merge 3 commits intocopilot/make-rest-context-path-configurablefrom
Conversation
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/36248858-6fb3-48ba-8451-c3d8066eb2da Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CI test for custom context path validation
Add CI test for configurable REST context path (/myidm)
Apr 8, 2026
Updated OpenIDM startup process in the build workflow.
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.
Validates end-to-end that the
openidm.context.pathsystem property (introduced in PR #142) works correctly by running the full Playwright smoke suite against a second OpenIDM instance started with/myidmas the context path.Changes
e2e/ui-smoke-test.spec.mjsCONTEXT_PATHvariable driven byOPENIDM_CONTEXT_PATHenv (default:/openidm)/openidmin REST test URLs with${CONTEXT_PATH}:.github/workflows/build.ymlThree new Linux-only steps inserted after the existing "UI Smoke Tests (Playwright)" step:
openidm/shutdown.sh, waits for PID file removalOPENIDM_OPTS="-Dopenidm.context.path=/myidm", waits for ready state, asserts no ERROR/SEVERE in logsOPENIDM_CONTEXT_PATH=/myidm(reuses already-installed packages)Original prompt
Context
PR #142 makes the REST context path configurable via
openidm.context.pathsystem property. We need to add a CI test that validates the custom context path/myidmactually works end-to-end.Changes required
1.
e2e/ui-smoke-test.spec.mjs— parameterize context pathAdd a new
CONTEXT_PATHvariable derived from environment, and use it in REST API tests instead of hardcoded/openidm:Replace all hardcoded
/openidm/in REST test URLs with${CONTEXT_PATH}/:${BASE_URL}/openidm/info/ping→${BASE_URL}${CONTEXT_PATH}/info/ping${BASE_URL}/openidm/config/ui/configuration→${BASE_URL}${CONTEXT_PATH}/config/ui/configuration2.
.github/workflows/build.yml— add custom context path test stepsAfter the existing "UI Smoke Tests (Playwright)" step (around line 60-68), add these new steps (all with
if: runner.os == 'Linux'):Step: "Stop OpenIDM (default context path)"
Step: "Start OpenIDM with custom context path /myidm"
Step: "UI Smoke Tests with /myidm context path (Playwright)"
These 3 new steps must be inserted AFTER the existing "UI Smoke Tests (Playwright)" step and BEFORE the existing "Test on Windows" step.
Important notes
/openidmtestingopenidm/shutdown.shfor graceful shutdown (notkill)rm -rf openidm/logs/*to clean ALL log files before restarttimeout 1m bash -c 'while [ -f openidm/.openidm.pid ]; do sleep 2; done'The following is the prior conversation context from the user's chat exploration (may be truncated):
User: необходимо предложить тест в build.yml на смену /openidm в /myidm с проверкой "UI Smoke Tests (Playwright)"
Assistant:
Let me research the current build workflow and test structure to understand how to add this test.
Assistant: Now let me look at the PR branch to see what changes have been made to support the configurable context path:
Assistant: Теперь я вижу полную картину. Посмотрю, как именно запускается OpenIDM, чтобы понять, куда передать системное свойство
openidm.context.path.Assistant: Теперь у меня есть полная картина. Вот что нужно:
build.yml— добавить второй запуск OpenIDM с-Dopenidm.context.path=/myidmи второй прогон Playwright сOPENIDM_CONTEXT_PATH=/myidme2e/ui-smoke-test.spec.mjs— REST API тесты используют хардкод/openidm/..., нужно параметризовать черезOPENIDM_CONTEXT_PATHВот предложение по изменениям:
Предлагаемые изменения
1.
e2e/ui-smoke-test.spec.mjs— параметризовать context pathДобавить переменную
CONTEXT_PATHи использовать её в REST-тестах:И заменить хардкод в REST-тестах: