bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.66k stars 511 forks source link

testsys: Enable downgrade upgrade testing #2525

Open ecpullen opened 1 year ago

ecpullen commented 1 year ago

What I'd like:

TestSys can currently run upgrade downgrade testing, but migrations should also be able to be tested the other way.

Any alternatives you've considered:

ecpullen commented 1 year ago

Proposed Solution

Problem: Currently if I want to run a migration test I would use cargo make TESTSYS_TEST=migration test and that will run a migration with quick testing. However, it is possible that a user wants to perform a migration test with a workload test instead.

Solution: We add an additional env variable TESTSYS_MIGRATION which can either be up or down.

Behavior: up → Run a upgrade/downgrade migration down → Run a downgrade/upgrade migration

Additional Changes: Some users have already integrated TESTSYS_TEST=migration into their workflow, so, -e TESTSYS_TEST=migration would be equivalent to -e TESTSYS_TEST=quick -e TESTSYS_MIGRATION=up