Skip to content

Wrong link to test results #589

Open

Description

@astramax57

Describe the bug

I'm using microcks as binary and run testing stage in gitlab CI as follows:
"$CI_PROJECT_DIR/utils/microcks-cli" test
"$api_version"
"$API_ENDPOINT"
OPEN_API_SCHEMA
--microcksURL="$MICROCKS_URL"
--keycloakClientId="$KEYCLOAK_CLIENT_ID"
--keycloakClientSecret="$KEYCLOAK_CLIENT_SECRET"
--insecure-tls
--filteredOperations='["GET /api/v1/version", "GET /api/v1/services"]'
--waitFor=10sec 2>&1 | tee -a microcks-results/test-report.txt

Report file contains link to results in JSON, but link is corrupted: https://microcks.devops.t-argos.ru/api//#/tests/6ad0b96d3739ce4b92d69ea8

test-report.txt

Expected behavior

Correct link is https://microcks.devops.t-argos.ru/api/tests/6ad0b96d3739ce4b92d69ea8 , without //# in the middle.

Actual behavior

No response

How to Reproduce?

No response

Microcks version or git rev

Microcks-CLI 1.0.3

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

binary

Additional information

No response

Activity

  1. lbroudoux commented on Oct 16, 2026

    @lbroudoux
    Member

    Hi @astramax57

    Thanks for reporting this one!

    The link to the executed test was meant to provide quick access to the UI showing the test result. So I think having a # in the URL is correct, as the Angular UI is using this for client-side navigation. I think the problem here is rather tied to the prepended /api prefix that comes from the microcksURL flag, and that should be removed when building the link.

  2. yada commented on Oct 17, 2026

    @yada
    Member

    Reproduced on current master (f9550f5) against a real microcks-uber:latest-native server.

    • microcks test ... --microcksURL http://localhost:18089/api prints Full TestResult details are available here: http://localhost:18089/api/#/tests/<id>.
    • That URL does not work: GET http://localhost:18089/api/#/tests returns 404, while http://localhost:18089/#/tests returns 200.
    • With --microcksURL http://localhost:18089 (no /api), the link is http://localhost:18089/#/tests/<id>, which is correct.
    • --output json carries the same bad link.

    This confirms @lbroudoux's analysis: the # is fine, and the problem is the /api suffix of --microcksURL being kept in the link. The link is built in cmd/test.go:153, and a similar one in cmd/testDryRun.go:454 (I did not test that one). Trimming a trailing /api (and /) from the server address before building the link should fix it.

    Disclosure: this comment was drafted with AI assistance, and the results were run locally.

  3. SajanBisht commented on Oct 17, 2026

    @SajanBisht

    Hi, I'd like to work on this issue. I plan to fix the URL construction for both the regular test and dry-run commands and add regression tests for URLs with and without the /api suffix.
    Is anyone already working on this, or would it be okay for me to submit a PR?

  4. yada commented on Oct 27, 2026

    @yada
    Member

    Hi @SajanBisht, thanks for offering. Yes, please go ahead and submit a PR; nobody else is working on it.

    Suggested scope:

    • Build the link from the server address with a trailing /api and any trailing / removed, in both cmd/test.go (Full TestResult details are available here) and cmd/testDryRun.go (Test details (live while watching)). The dry-run link has not been tested yet.
    • Add regression tests for --microcksURL with and without /api, and with a trailing slash.
    • Keep the # in the link, as the UI uses it for client-side navigation.

    Please open the PR with a conventional-commit title and disclose any AI usage, as described in CONTRIBUTING.md.

    Disclosure: this comment was drafted with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions