Skip to content

Add filter tests #86

@LCVcode

Description

@LCVcode

Describe the Bug

Filter expression are not recognized by the CLI, even when using the exact syntax from juju-jockey info. This fix must include additional testing that recognizes this regression.

At a minimum, we require:

  • A matrix of tests which query each object type using each applicable filter.
  • Testing all abbreviations in both the object names and the filter expressions.
  • Testing all supported filters.

Here is an example of the filtering not working in the current code:

$ juju-jockey machine -f ../juju-status.json 'hostname~juju'
Usage: juju-jockey [-h] [-v] [-f FILE] [-H HOSTNAME] [-U USERNAME] [-S USERNAME] [-T SEC] [-J COMMAND] [-c DIR] [-C SEC] [--refresh] OBJECT [EXPRESSION ...]
juju-jockey: error: unrecognized arguments: hostname~juju

I tried several different filter expression syntaxes with no success.

Expected Behavior

Filters should be applied to the list of queries objects and return the result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionLoss of functionality or degrading features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions