Functional tests for Magalu Cloud CLI.
- Python 3.10 or higher
- uv (Astral's package manager)
- Make
- MGC CLI in PATH (or configure via the
MGC_PATHenvironment variable)
Option A — Manual:
- Install uv following the official instructions: https://github.com/astral-sh/uv
- Example (Linux/Mac):
curl -LsSf https://astral.sh/uv/install.sh | sh - Restart your terminal after installation.
- Example (Linux/Mac):
- In the project directory, run:
uv sync uv run pytest --html=report.html --self-contained-html - To run individual test targets:
uv run pytest tests/test_auth.py uv run pytest tests/test_block.py ...
Option B — Automatic (using the Makefile):
- Run:
make test- The Makefile checks for python3 and curl and attempts to install
uvvia curl into~/.local/bin/uvif not present. - If the Makefile installs
uvto~/.local/bin, ensure~/.local/binis in your PATH, e.g.:export PATH=$HOME/.local/bin:$PATH
- The Makefile checks for python3 and curl and attempts to install
- To run individual test targets:
make test-auth make test-block ...
- The
make testtarget generates a self-contained HTML report namedreport.html. - Open
report.htmlin your browser after the run to review results.
To run all tests:
uv run pytest
To run a specific test file:
uv run pytest tests/test_lbaas.py
Settings:
- General
- Authorization
- Config
- Profile
- Workspaces
Products:
- Block Storage
- DBaaS
- Network
- Virtual machines