Skip to content

microcks test invalid runner error lists SOAP instead of SOAP_HTTP #348

@hazelmayank

Description

@hazelmayank

Describe the bug

Image

microcks test accepts SOAP_HTTP as a supported runner, but the invalid-runner error message lists SOAP instead. A user who reads the error and copies SOAP from it is told that's also invalid — by the same message that just listed it.

The valid runner set is defined by the runnerChoices map at cmd/test.go:32 and includes SOAP_HTTP, not SOAP. The error string at cmd/test.go:73 has drifted from that map.

Expected behavior

The error message should list SOAP_HTTP, matching the values actually accepted by runnerChoices (and the runner list already documented in documentation/cmd/test.md):

<runner> should be one of: HTTP, SOAP_HTTP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA, ASYNC_API_SCHEMA, GRPC_PROTOBUF, GRAPHQL_SCHEMA

A user who copies any name from this list should be able to use it without further rejection.

Actual behavior

The command currently prints:

<runner> should be one of: HTTP, SOAP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA, ASYNC_API_SCHEMA, GRPC_PROTOBUF, GRAPHQL_SCHEMA

SOAP is in the list, but SOAP is rejected by the validator. The error message is internally inconsistent with the code two lines above it.

How to Reproduce?

  1. Clone the repository fresh: git clone https://github.com/microcks/microcks-cli.git
  2. Change into the directory: cd microcks-cli
  3. Trigger the validator with any invalid runner:
go run . test foo:1 http://x SOAP
go run . test foo:1 http://x BOGUS
  1. Observe that the printed error lists SOAP as a valid runner, even though SOAP is itself the value that just triggered the error.

Microcks version or git rev

No response

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

No response

Additional information

Root cause. The runnerChoices map at cmd/test.go:32 includes SOAP_HTTP:

runnerChoices = map[string]bool{
    "HTTP": true, "SOAP_HTTP": true, "SOAP_UI": true, "POSTMAN": true,
    "OPEN_API_SCHEMA": true, "ASYNC_API_SCHEMA": true,
    "GRPC_PROTOBUF": true, "GRAPHQL_SCHEMA": true,
}

…but the error string at cmd/test.go:73 says SOAP instead of SOAP_HTTP. The two have drifted; the validator accepts the new name while the error message still advertises the old one.

Proposed fix. Replace SOAP with SOAP_HTTP in the error string at cmd/test.go:73. One line. No behavior change; only the user-facing message changes to match the validator and the documentation.

I would like to send a small PR for this if the maintainers agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions