@@ -121,6 +121,65 @@ Test execution produces excessive output. It is recommended to redirect the outp
121121./e2e-tests/run >> /tmp/tests-run.out 2>&1
122122```
123123
124+ ## Python development setup
125+
126+ The e2e tests are being migrated to pytest. This section covers setting up the Python environment.
127+
128+ ### Installing uv
129+
130+ [ uv] ( https://github.com/astral-sh/uv ) is used for Python dependency management. Install it via make:
131+
132+ ```
133+ make uv
134+ ```
135+
136+ Or manually:
137+
138+ ```
139+ curl -LsSf https://astral.sh/uv/install.sh | sh
140+ ```
141+
142+ ### Python make targets
143+
144+ ```
145+ make py-deps # Install Python dependencies (locked versions)
146+ make py-update-deps # Update Python dependencies
147+ make py-fmt # Format code and organize imports with ruff
148+ make py-check # Run ruff linter and mypy type checks
149+ ```
150+
151+ ### Running tests with pytest
152+
153+ First, install dependencies:
154+
155+ ```
156+ make py-deps
157+ ```
158+
159+ Run all pytest-based tests:
160+
161+ ```
162+ uv run pytest e2e-tests/
163+ ```
164+
165+ Run a specific test file:
166+
167+ ```
168+ uv run pytest e2e-tests/init-deploy/test_init_deploy.py
169+ ```
170+
171+ Run a specific test:
172+
173+ ```
174+ uv run pytest e2e-tests/init-deploy/test_init_deploy.py::TestInitDeploy::test_cluster_creation
175+ ```
176+
177+ Run tests matching a pattern:
178+
179+ ```
180+ uv run pytest e2e-tests/ -k "init"
181+ ```
182+
124183## Using environment variables to customize the testing process
125184
126185### Re-declaring default image names
@@ -129,7 +188,7 @@ You can use environment variables to re-declare all default images used for test
129188full list of variables is the following one:
130189
131190* ` IMAGE ` - Percona Server for MongoDB Operator, ` perconalab/percona-server-mongodb-operator:main ` by default,
132- * ` IMAGE_MONGOD ` - mongod, ` perconalab/percona-server-mongodb-operator:main-mongod4.4 ` by default,
191+ * ` IMAGE_MONGOD ` - mongod, ` perconalab/percona-server-mongodb-operator:main-mongod8.0 ` by default,
133192* ` IMAGE_PMM_CLIENT ` - Percona Monitoring and Management (PMM) client, ` perconalab/pmm-client:dev-latest ` by default,
134193* ` IMAGE_BACKUP ` - backup, ` perconalab/percona-server-mongodb-operator:main-backup ` by default,
135194
0 commit comments