-
Notifications
You must be signed in to change notification settings - Fork 37
Enable loading of relational db fixtures from multiple directories #793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable loading of relational db fixtures from multiple directories #793
Conversation
otherwise checkstyle complains...
src/main/java/org/fairdatapoint/database/rdf/migration/RdfDevelopmentMigrationRunner.java
Outdated
Show resolved
Hide resolved
this is possible because we take history into account, since #797
otherwise tests fail because expected rdf statements are not available
|
Tests are refusing to run in the workflow on windows runner, apparently due to some config issue: However, the exact same tests do run on the ubuntu runner, although some of them fail: The latter is due to the change in default value from |
|
So now all tests pass on ubuntu and mac, but still failing to load application context on the windows runner. Probably an issue with the workflow itself, but this has not changed, so perhaps something to do with workflow dependencies? Update: The windows runner logs show it is still using However, even after fixing this in |
The test assertions expect the db to be empty. Previously, bootstrap.enabled was false by default, but now it is true by default. Therefore we need to disable bootstrap explicitly in these tests.
c1ee079 to
a79f9c8
Compare
|
So, if we disable bootstrapping altogether, all tests pass, including the windows tests. The data are still coming from the test sql migrations, which are still active... (but, then again, same holds for the non-windows runners) |
…migrations" This reverts commit f877668.
actually mongo is not used anymore, but spring will try to configure it because it is used in the spring-rdf-migration dependency
|
With proper logging enabled during tests, we now have the problem from the windows runner: We can reproduce this type of error on unix by including a null character in the filename, which is illegal on unix. For example: Path.of(fixturesDir).resolve("\0") |
On unix we can simply do Path.resolve(*.json), but on windows that fails with 'Illegal char <*> at index 0: *.json', so we do use Path to handle slashes, but only add the * after converting back to string
This reverts commit a6b8d40.
This reverts commit 99b47fd.
This is needed because resolve fails on windows due to invalid path character *. Note that we can safely concatenate /*.json (with the initial slash) because Path.of() removes any trailing slashes.
2e40309 to
81fb68c
Compare

This PR enables the configuration of multiple fixtures directories as follows:
or, using environment variables:
or, using command line arguments:
All JSON fixture files are added to a single, sorted,
resourceslist.This gives more flexibility in case e.g. users want to load additional fixture files from container secrets, or similar scenarios.
TODO