eventing
eventing copied to clipboard
Create paired upgrade tests
Related to https://github.com/knative-extensions/eventing-kafka-broker/issues/4047
This brings the building blocks for creating paired upgrade tests in other repositories like eventing-kafka-broker.
Proposed Changes
- Introduce type
DurableFeature
which holds two interconnected features: SetupF, VerifyF. This allows re-using existing Features created for reconciler-test framework, with slight modifications. The original feature should be split into two parts:- Setup feature - this feature does all the required setup for the feature, typically the Setup, Prerequisite phases of REKT tests
- Verify feature - this feature does the verification, typically the Requirement and Assert phases of the REKT tests
- The DurableFeature also holds the environment that was created at the beginning and thus allows re-using the same namespace (and resources) after upgrade/downgrade.
- There are also a few decorators that will allow different types of tests.
-
NewFeatureSmoke
- this will create an object that will run same tests before upgrade, after upgrade, after downgrade. This will always include creating new resources (Setup), verifying resources (Assert), and deleting namespace (Teardown). -
NewFeatureOnlyUpgrade
- will create resources before upgrade, verify and tear down after upgrade, there's no operation after downgrade. -
NewFeatureOnlyDowngrade
- will create resources after upgrade, verify and tear down after downgrade, there's no operation at the beginning before upgrade. -
NewFeatureBothUpgradeDowngrade
- this will create resources before upgrade, verify them after upgrade, and verify and tear down after downgrade.
-
- There's also the type
FeatureGroupWithUpgradeTests
which just aggregates operations across a slice of features.
Pre-review Checklist
- [ ] At least 80% unit test coverage
- [ ] E2E tests for any new behavior
- [ ] Docs PR for any user-facing impact
- [ ] Spec PR for any new API feature
- [ ] Conformance test for any change to the spec
Release Note
Docs