Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f3e089d
Initial pytest test migration
jvpasinatto Sep 23, 2025
7bdf097
Merge branch 'main' into pytest-complete
jvpasinatto Sep 23, 2025
fb96a0c
Refactor to adress comments
jvpasinatto Sep 24, 2025
1fc136f
Merge branch 'main' into pytest-complete
jvpasinatto Sep 24, 2025
37aa18d
Make wait more robust
jvpasinatto Sep 25, 2025
c784bf0
Add liveness test
jvpasinatto Sep 26, 2025
4b4bf43
Merge branch 'main' into pytest-complete
gkech Jan 23, 2026
cafa5f4
Add python rules in makefile
jvpasinatto Jan 23, 2026
ab14a77
update dependencies
jvpasinatto Jan 23, 2026
8fabdbe
Add more type hints
jvpasinatto Jan 23, 2026
9195e8a
Print env vars in test initialization and more
jvpasinatto Jan 23, 2026
b572b0d
Add resources collection on failure
jvpasinatto Jan 23, 2026
44858f8
move python scripts to folder
jvpasinatto Jan 29, 2026
ad7521d
fix liveness test and add more type hints
jvpasinatto Jan 29, 2026
9adffbc
fix init deploy test
jvpasinatto Jan 29, 2026
70d4f06
add py-fmt rule
jvpasinatto Jan 29, 2026
974c0d1
Update test readme and small fixes
jvpasinatto Jan 30, 2026
11eed52
use rich to handle logging
jvpasinatto Jan 30, 2026
8a100f3
Add bash wrapper
jvpasinatto Jan 30, 2026
ad60319
update lock file
jvpasinatto Jan 30, 2026
ba739c0
fix openshift detection
jvpasinatto Jan 30, 2026
a8cd1d4
divide tools into separated files plus improvements
jvpasinatto Feb 2, 2026
079499c
Fix report generation
jvpasinatto Feb 3, 2026
9a7560b
Merge branch 'main' into pytest-complete
jvpasinatto Feb 4, 2026
76c1436
Merge branch 'main' into pytest-complete
jvpasinatto May 5, 2026
b5c5903
remove test retry and add permission in gh action py-check
jvpasinatto May 5, 2026
c6c23d3
Merge branch 'main' into pytest-complete
egegunes Jun 4, 2026
fb8cc71
Merge branch 'main' into pytest-complete
gkech Jun 9, 2026
ee5f59a
fixes
jvpasinatto Jul 16, 2026
cfde3d8
Merge branch 'main' into pytest-complete
jvpasinatto Jul 16, 2026
d051208
tests updates and fixes
jvpasinatto Jul 16, 2026
2a8e134
more fixes
jvpasinatto Jul 16, 2026
78121c5
fixes
jvpasinatto Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/e2e-py-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: e2e-tests Python Quality Check

on:
pull_request:
paths:
- 'e2e-tests/**/*.py'
- 'pyproject.toml'
- 'uv.lock'

permissions:
contents: read

jobs:
quality-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Install dependencies
run: uv sync --locked

- name: Run ruff check
run: uv run ruff check e2e-tests/

- name: Run mypy
run: uv run mypy e2e-tests/
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,7 @@ bin/
projects/
installers/olm/operator_*.yaml
installers/olm/bundles

# Test Reports
e2e-tests/reports/
e2e-tests/**/__pycache__/
239 changes: 148 additions & 91 deletions Jenkinsfile

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ undeploy: ## Undeploy operator
test: envtest generate ## Run tests.
DISABLE_TELEMETRY=true KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out

py-deps: uv ## Install e2e-tests Python dependencies
$(UV) sync --locked

py-update-deps: uv ## Update e2e-tests Python dependencies
$(UV) lock --upgrade

py-fmt: uv ## Format and organize imports in e2e-tests
$(UV) run ruff check --select I --fix e2e-tests/
$(UV) run ruff format e2e-tests/

py-check: uv ## Run ruff and mypy checks on e2e-tests
$(UV) run ruff check e2e-tests/
$(UV) run mypy e2e-tests/

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
Expand Down Expand Up @@ -105,6 +119,12 @@ MOCKGEN = $(shell pwd)/bin/mockgen
mockgen: ## Download mockgen locally if necessary.
$(call go-get-tool,$(MOCKGEN), github.com/golang/mock/mockgen@latest)

UV = $(shell pwd)/bin/uv
uv: ## Download uv locally if necessary.
@[ -f $(UV) ] || { \
set -e ;\
curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=$(PROJECT_DIR)/bin sh ;\
}
update-version:
echo $(NEXT_VER) > pkg/version/version.txt

Expand Down
59 changes: 59 additions & 0 deletions e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,65 @@ Test execution produces excessive output. It is recommended to redirect the outp
./e2e-tests/run >> /tmp/tests-run.out 2>&1
```

## Python development setup

The e2e tests are being migrated to pytest. This section covers setting up the Python environment.

### Installing uv

[uv](https://github.com/astral-sh/uv) is used for Python dependency management. Install it via make:

```
make uv
```

Or manually:

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

### Python make targets

```
make py-deps # Install Python dependencies (locked versions)
make py-update-deps # Update Python dependencies
make py-fmt # Format code and organize imports with ruff
make py-check # Run ruff linter and mypy type checks
```

### Running tests with pytest

First, install dependencies:

```
make py-deps
```

Run all pytest-based tests:

```
uv run pytest e2e-tests/
```

Run a specific test file:

```
uv run pytest e2e-tests/init-deploy/test_init_deploy.py
```

Run a specific test:

```
uv run pytest e2e-tests/init-deploy/test_init_deploy.py::TestInitDeploy::test_cluster_creation
```

Run tests matching a pattern:

```
uv run pytest e2e-tests/ -k "init"
```

## Using environment variables to customize the testing process

### Re-declaring default image names
Expand Down
Loading
Loading