Skip to content

pki ca-kraconnector-show command should display usage when no parameters or invalid parameters are provided #5127

@kimettog

Description

@kimettog

Summary :
pki ca-kraconnector-show --help command should display usage when no parameters or invalid parameters are provided

Build:
Fedora release 42 (Adams)
dogtag-pki-11.7.0-0.1.alpha1.20250617181155UTC.9f944cd4.fc42.x86_64
COPR: @pki/master

Steps to reproduce:

  1. Install necessary dogtag pki pakages
  2. Install CA and KRA subsystems
  3. Run the command to get usage with --help
pki -d /opt/pki/certdb -P http -p 20080 -h pki1.example.com -c
                SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-show --help

Usage is provided correctly
4. Now give no parameter or bogus input eg "ASDF' instead of "--help"

Expected:
Expected that the command would provide command usage as it does for "--help"

# pki -d /opt/pki/certdb -P https -p 20443 -h pki1.example.com -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-show --help
usage: ca-kraconnector-show [OPTIONS...]
    --debug     Run in debug mode.
    --help      Show help message.
 -v,--verbose   Run in verbose mode.

Actual :
The command tries to execute with " " or invalid input params giving misleading error

`pki -d /opt/pki/certdb -P https -p 20443 -h pki1.example.com -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-show asdf`
ConnectorNotFoundException: No KRA connectors

 pki -d /opt/pki/certdb -P https -p 20443 -h pki1.example.com -c SECret.123 -n "PKI CA Administrator for Example.Org" ca-kraconnector-show
ConnectorNotFoundException: No KRA connectors

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug fixesTicket CreatedregressionRegression bug. Introduced due to changes in unrelated code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions