Skip to content

Conversation

jvpasinatto
Copy link
Contributor

@jvpasinatto jvpasinatto commented Jun 6, 2025

K8SPSMDB-1192 Powered by Pull Request Badge

CHANGE DESCRIPTION

  • Add a wrapper script for executing e2e tests with Pytest
  • Test reports are generated and stored by default in the e2e-tests/reports directory
  • Update PR tests to use this wrapper. By default, it outputs .xml and .html reports.
  • Add test duration and html report to Github PR comment
  • Add Github action to run mypy and ruff on the python code

How to run using uv:

Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

Create venv and install/sync dependencies
uv sync

Run all tests
uv run pytest e2e-tests/test_pytest_wrapper.py -v -s

Run specific test
uv run pytest e2e-tests/test_pytest_wrapper.py -v -s --test-regex '^one-pod$'

Run a test suite
uv run pytest e2e-tests/test_pytest_wrapper.py -v -s --test-suite backups

Run and collect k8s resources
uv run pytest e2e-tests/test_pytest_wrapper.py -v -s --test-regex '^one-pod$' --collect-k8s-resources

--collect-k8s-resources flag to automatically collect Kubernetes logs and resource state on test failure, storing diagnostic data in e2e-tests/reports

@pull-request-size pull-request-size bot added the size/L 100-499 lines label Jun 6, 2025
@pull-request-size pull-request-size bot added size/XL 500-999 lines and removed size/L 100-499 lines labels Jun 12, 2025
@gkech
Copy link
Contributor

gkech commented Jun 12, 2025

I think we need to add to gitignore e2e-tests/__pycache__/

@gkech
Copy link
Contributor

gkech commented Jun 12, 2025

we can maybe add the reports/ directory as well to avoid unintentional report file commits.

@JNKPercona
Copy link
Collaborator

Test Name Result Time
arbiter passed 00:11:39
balancer passed 00:22:38
cross-site-sharded passed 00:18:44
custom-replset-name passed 00:10:26
custom-tls passed 00:14:38
custom-users-roles passed 00:11:23
custom-users-roles-sharded passed 00:12:08
data-at-rest-encryption passed 00:12:35
data-sharded passed 00:25:30
demand-backup passed 00:14:32
demand-backup-eks-credentials-irsa passed 00:00:08
demand-backup-fs passed 00:24:45
demand-backup-incremental failure 00:14:45
demand-backup-incremental-sharded passed 00:59:52
demand-backup-physical-parallel passed 00:08:16
demand-backup-physical-aws passed 00:12:47
demand-backup-physical-azure passed 00:11:41
demand-backup-physical-gcp passed 00:12:06
demand-backup-physical-minio passed 00:21:20
demand-backup-physical-sharded-parallel passed 00:09:44
demand-backup-physical-sharded-aws passed 00:18:30
demand-backup-physical-sharded-azure passed 00:18:12
demand-backup-physical-sharded-gcp passed 00:17:53
demand-backup-physical-sharded-minio passed 00:18:27
demand-backup-sharded passed 00:24:43
expose-sharded passed 00:33:53
finalizer passed 00:10:20
ignore-labels-annotations passed 00:07:54
init-deploy passed 00:14:36
ldap passed 00:08:23
ldap-tls passed 00:11:18
limits passed 00:06:39
liveness passed 00:08:35
mongod-major-upgrade passed 00:13:14
mongod-major-upgrade-sharded passed 00:21:43
monitoring-2-0 passed 00:25:02
monitoring-pmm3 passed 00:28:29
multi-cluster-service passed 01:30:17
multi-storage passed 00:20:08
non-voting-and-hidden passed 00:17:12
one-pod passed 00:07:56
operator-self-healing-chaos passed 00:13:52
pitr passed 00:22:29
pitr-physical passed 01:02:58
pitr-sharded passed 00:20:54
pitr-physical-backup-source passed 00:57:02
preinit-updates passed 00:05:02
pvc-resize passed 00:12:42
recover-no-primary passed 00:28:37
replset-overrides passed 00:16:35
rs-shard-migration passed 00:13:50
scaling passed 00:11:32
scheduled-backup passed 00:17:35
security-context passed 00:07:06
self-healing-chaos passed 00:15:49
service-per-pod passed 00:19:10
serviceless-external-nodes passed 00:07:22
smart-update passed 00:09:05
split-horizon passed 00:08:19
stable-resource-version passed 00:04:48
storage passed 00:08:31
tls-issue-cert-manager passed 00:31:19
upgrade passed 00:10:10
upgrade-consistency passed 00:05:10
upgrade-consistency-sharded-tls passed 00:49:16
upgrade-sharded passed 00:20:31
users passed 00:17:38
version-service passed 00:26:45
We run 68 out of 68 21:17:45

Commit: 45d7fd6
Image: perconalab/percona-server-mongodb-operator:PR-1962-45d7fd6e
Test report: report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants