Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3965: Enhance dal-test helpers and schemas r=nickgerace a=nickgerace ## Description This PR aims to enhance `dal-test` helpers and test exclusive schemas. As a result of these changes, panics of any kind are banned by default outside of macro expansion helpers. Now, when authoring test exclusive schemas or authoring tests, error reporting should be clearer than before. For the helpers, we leverage `color_eyre` via its `Result` type and `eyre!` macro in order to make error propagation better in tests via explicit `expect` statements and other failures. Inner panics are now disallowed in helpers themselves in order to give better error location reporting when running tests via `buck2` with default settings. For the test exclusive schemas, everything has been refactored to be more explicit about how schemas are organized and where migrations are centralized. These changes reflect the shape of the schemas back in the old engine when they were in the dal. In addition to these changes, the helpers for test exclusive schemas have been polished, including some unnecessary usages of async functions and replaced panics. These helpers have been moved to the central module file and now, the only public, exported function is the `migrate` function. Finally, panics within test exclusive schema scaffolding have also been replaced with proper error propagation. As a result of these changes, both `DalTestHelpersError` and `ChangeSetTestHelpers` have been removed alongside their result types. ## Example Test Failure ![image](https://github.com/systeminit/si/assets/39320683/bacd3264-b105-42ae-99bb-ee550e1ab6b5) ## Secondary Changes - Fix swallowed errors when setting types in frame integration tests - Split property editor test view into its own submodule - Move auth token creation into expand helpers (moved from the regular test helpers) - Temporarily disable `delete_frame_with_child_with_resource` test due to intermittent failures ## History This PR is the continuation of #3964, which was purely closed because I accidentally deleted the branch. Co-authored-by: Nick Gerace <[email protected]>
- Loading branch information