registry-operator / adr

Collection of Architectural Decision Records (ADRs)
The Unlicense
0 stars 2 forks source link

[registry-operator]: end-to-end testing framework #6

Open shanduur opened 4 months ago

shanduur commented 4 months ago

Context and Problem Statement

Ensuring the reliability and functionality of the registry-operator is essential to maintain a seamless experience for developers and DevOps teams utilizing CNCF Distribution Registry instances. End-to-end testing plays a critical role in validating the deployment, scaling, and management capabilities of the registry-operator across various scenarios.

The selection of an appropriate end-to-end testing framework is paramount to establish robust testing standards and practices. Factors such as adherence to language idioms, support for testing complex workflows, community adoption, and extensibility are crucial considerations in this decision-making process.

Considered Options

shanduur commented 3 months ago

I've done some initial investigation and I really enjoy pytest-bdd. It has huge community, easily integrates with feature files written with Gherkin syntax, and as it is a pytest plugin, it can benefit from multiple other pytest plugins.

Also, dependency management with Poetry is frictionless. It also easily integrates with linting tools, providing single file for configuration management for many, e.g. mypy, black, isort.

tests
├── README.md
├── e2e
│   ├── __init__.py
│   ├── features
│   │   └── sanity.feature
│   ├── framework
│   │   ├── __init__.py
│   │   ├── kubernetes.py
│   │   └── utils.py
│   └── test_sanity.py
├── poetry.lock
└── pyproject.toml
malgorzatadutka commented 3 months ago

I'd like to use testing (Go) for the unit tests, Ginkgo doesn't have integration with feature files. Radish and pytest-bdd are quite similar. I would choose pytest-bdd with the community support.

purpleturtll commented 3 months ago

+1 for pytest-bdd. Seems to be the most "getting out of your way" when writing scenarios.

shanduur commented 2 months ago

Reopening.

One more option worth considering: