puter icon indicating copy to clipboard operation
puter copied to clipboard

Test pipeline for database migrations.

Open KernelDeimos opened this issue 1 year ago • 1 comments

We need a way to test database migrations for all possible initial states. This can be accomplished with a test that iterates over the migrations and runs a Puter clone starting at that version, and upgrades it. Version -1 (i.e. new database) should also be included so issues like #639 never happen again. It should also be possible to add additional changes to test at each version, such as having a user named system before the migration script which adds the new system user.

KernelDeimos avatar Jul 27 '24 23:07 KernelDeimos

First bit of work on this: 02504690cfb1a790b44b6447f918680047af0148

We can now run an instance of Puter that will immediately shutdown upon successful boot or any alarm with a corresponding (0 or 1) exit code. This makes an easy test case for migrations that fail with an exception.

KernelDeimos avatar Jul 28 '24 08:07 KernelDeimos