Skip to content

Conversation

@dennisvang
Copy link
Contributor

@dennisvang dennisvang commented Nov 13, 2025

Replace SQL test data migrations by JSON test data fixtures.

  • remove reference to test data migration files from flyway test config
  • remove test data migration files (*.sql)
  • add corresponding test data fixture files (*.json) (extend default fixtures, do not duplicate)
  • specify test data location in bootstrap test config (depends on Enable loading of relational db fixtures from multiple directories #793)
  • get repository populator to run again before each test (because flyway clean is called before each test)

@dennisvang dennisvang changed the title Remove sql test data migrations Replace SQL test data migrations by JSON test data fixtures Nov 13, 2025
@dennisvang dennisvang changed the title Replace SQL test data migrations by JSON test data fixtures Bootstrap test data from JSON fixtures instead of SQL migrations Nov 13, 2025
@dennisvang dennisvang force-pushed the proposal/634-remove-sql-test-data-migrations branch from 4d9f371 to 0a80643 Compare November 13, 2025 16:56
@dennisvang dennisvang self-assigned this Nov 13, 2025
this is more consistent with e.g. the 'locations' option for flyway
This allows us to include the prefix in the config, which is more flexible.
For example, we can set file:fixtures for the default fixtures,
which need to be overridable in the docker container,
and we can set classpath:test-fixtures for the test fixtures,
which can then be included in the test/resources dir.

Moreover, this approach is similar to the way flyway.locations are specified.
the populator is done, but that does not necessarily mean any repositories were actually populated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants