Skip to content

Add integration tests to our CLI #5385

Description

@thedrow

Checklist

  • I have checked the issues list for similar or identical enhancement to an existing feature.
  • I have checked the commit log to find out if a the same enhancement was already implemented in master.

Brief Summary

Following the breakage caused by #4990 which was reported by #5383 it seems that we need more coverage to our CLI.

Design

I suggest that we take a BDD approach to these tests.
BDD tests describe the behaviour a user expects when he does something.

For example in this case:

Scenario: A user tries to generate a report and specifies a Celery app that does not exist
  Given a user tries to load a Celery app that does not exist
  When they run `celery -A doesnotexist report`
  Then the following error message is printed in red:
     """
     Error: 
     Unable to load celery application.
     The module doesnotexist was not found.
     """

or something along those lines.

Architectural Considerations

We'll need to install pytest-bdd as part of the test suite.

Proposed Behavior

None

Proposed UI/UX

Whatever pytest-bdd provides us with.

Diagrams

N/A

Alternatives

Write this tests without BDD.
They will be less clear to the user.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions