Skip to content

test: Add unit tests for openstack CLI commands, expand tox testenv - #35

Merged
fghaas merged 2 commits into
cleura:mainfrom
fghaas:tests
Sep 2, 2026
Merged

test: Add unit tests for openstack CLI commands, expand tox testenv#35
fghaas merged 2 commits into
cleura:mainfrom
fghaas:tests

Conversation

@fghaas

@fghaas fghaas commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This meta-package has zero source code of its own -- it exists purely to
bundle a curated set of OpenStack client libraries pinned to versions
known to work with Cleura Cloud. The tests validate that every
dependency correctly registers its CLI commands, can be loaded without
error, and follows the expected cliff.command.Command contract.

Without these tests, a dependency update that silently breaks command
registration or changes the CLI interface would go undetected until a
user hits the issue. The tests serve as a regression guard for the
entire dependency bundle.

  • Add tests/test_commands.py with tests covering:
    • Package metadata (name, version, Python requirement, license)
    • Console script entry points (openstack and cleura-openstack)
    • OpenStack command entry points loading, command counts, and class structure
    • Well-known command availability across command groups
    • OpenStackShell class attributes and methods
    • subprocess integration tests for --help output
  • Add tests/init.py for the tests package
  • Add [dependency-groups] pytest for test dependencies
  • Add pytest invocation to tox testenvs

Assisted-by: opencode/qwen3.6-35b-a3b-fp8

This meta-package has zero source code of its own -- it exists purely to
bundle a curated set of OpenStack client libraries pinned to versions
known to work with Cleura Cloud. The tests validate that every
dependency correctly registers its CLI commands, can be loaded without
error, and follows the expected cliff.command.Command contract.

Without these tests, a dependency update that silently breaks command
registration or changes the CLI interface would go undetected until a
user hits the issue. The tests serve as a regression guard for the
entire dependency bundle.

- Add tests/test_commands.py with tests covering:
  - Package metadata (name, version, Python requirement, license)
  - Console script entry points (openstack and cleura-openstack)
  - OpenStack command entry points loading, command counts, and class structure
  - Well-known command availability across command groups
  - OpenStackShell class attributes and methods
  - subprocess integration tests for --help output
- Add tests/__init__.py for the tests package
- Add [dependency-groups] pytest for test dependencies
- Add pytest invocation to tox testenvs

Assisted-by: opencode/qwen3.6-35b-a3b-fp8
NamrataSitlani
NamrataSitlani previously approved these changes Sep 1, 2026
- test_token_issue: verify 'openstack token issue' returns successfully
- test_quota_show: verify 'openstack quota show' returns successfully
- test_*_list: verify 'openstack <subcommand> list' returns successfully

All tests are gated by @pytest.mark.skipif on non-empty OS_CLOUD env var.

Make sure we pass OS_ variables through to the tox testenv.

Assisted-by: opencode/qwen3.6-35b-a3b-fp8
@fghaas
fghaas merged commit b4818ac into cleura:main Sep 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants