Describe the feature
The current upgrade/downgrade tests are orchestrated from Bash. It runs pre-upgrade Golang tests, calls Bash functions to perform the upgrade, runs post-upgrade Golang tests, calls Bash functions for downgrade, runs post-downgrade Golang tests.
This is a proposal for changing the orchestration where the Golang test suite including pre-upgrade, post-upgrade and post-downgrade tests would run as a monolithic test suite, performing upgrades and downgrades using a plugable mechanism.
The scenario would look like this:
- Start the single Golang test suite for upgrades/downgrades
- The test suite runs pre-upgrade tests
- A plugin is called to perform an upgrade
- The test suite runs post-upgrade tests
- A plugin is called to perform a downgrade
- The test suite runs post-downgrade tests
- The Golang test suite ends
Upstream tests would include a default plugin that would call bash scripts for upgrading/downgrading Knative.
Downstream tests could provide their own mechanism for upgrades/downgrades, possibly using Golang API. If no extra plugin is provided the test suite would execute the default plugin.
Advantages of this approach:
- makes it possible to run the whole test suite from Golang and step through the program/debug it (this would be more convenient in downstream where upgrades are done using Golang API but it can be used in upstream as well)
- removes the need for the system to communicate with the prober test via pipe in order to end it
- more cohesive upgrade/downgrade test suite
- easier execution in environments other than upstream
Describe the feature
The current upgrade/downgrade tests are orchestrated from Bash. It runs pre-upgrade Golang tests, calls Bash functions to perform the upgrade, runs post-upgrade Golang tests, calls Bash functions for downgrade, runs post-downgrade Golang tests.
This is a proposal for changing the orchestration where the Golang test suite including pre-upgrade, post-upgrade and post-downgrade tests would run as a monolithic test suite, performing upgrades and downgrades using a plugable mechanism.
The scenario would look like this:
Upstream tests would include a default plugin that would call bash scripts for upgrading/downgrading Knative.
Downstream tests could provide their own mechanism for upgrades/downgrades, possibly using Golang API. If no extra plugin is provided the test suite would execute the default plugin.
Advantages of this approach: