Commit Graph

5 Commits

Author SHA1 Message Date
fabianlindfors
9cac25299a Refactor tests to use test framework
This has the added benefit of removing the need for builders and the
derive_builder dependency.
2022-01-15 16:15:31 +01:00
fabianlindfors
a7d70f80b8 Use TOML for migrations in test framework
Previously we set up migrations directly as structs which doesn't match
how users will create them. For the new test framework, we'll instead
write TOML for migrations. This brings the tests closer to how an end
user will interact with Reshape and also lets us write tests to match
the examples in the documentation.
2022-01-15 14:47:28 +01:00
fabianlindfors
945e6374d8 Add test framework
This reduces the amount of boilerplate required to run a test and also
has the added benefit of extending tests as we can now easily test both the
completion and abort paths. So far two tests have been ported over,
create_table and add_column, with the rest to follow.

The framework also improves the output of tests, adding sections clearly
indicating in which part of the migration process a test failed.
2022-01-14 23:49:19 +01:00
fabianlindfors
9b21ebfb86 Add check for dangling changes at end of tests
This checks for dangling temporary columns, triggers and function which
were used by migrations but should be removed once the migration has
been completed or aborted.
2022-01-03 22:09:16 +01:00
fabianlindfors
7d8302a0a4 Initial commit 2021-10-26 00:31:09 +02:00