Skip to content
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

Remove base tests from execution when using liquibase-test-harness as dependency #222

Open
snemets opened this issue May 5, 2022 · 1 comment

Comments

@snemets
Copy link

snemets commented May 5, 2022

I'm trying to use liquibase-test-harness as test tool for liquibase changesets. The problem is, that using tool as is requires to prepare database to pass tests from dependency.
Currently I'm repacking maven jar to exclude dependency resources and leave only compiled classes to be able to run harness framework with empty database.
Is there another option to exclude mandatory base tests, coming from project dependency?

@KushnirykOleh
Copy link
Contributor

Hi @snemets thanks for reaching us.
There isn't direct way, but i can think of some workarounds.
We provide init scripts for different DB platforms in src/test/resources/docker folder, maybe you can use them to manually prepare DB.
Some of Liquibase changeObjects require metadata about DB objects (like tables, sequences, etc) already present in DB to be able to manipulate them, so we had to prepare Dbs with init script.

Also you can just fork repo and remove everything you don't need - like input changeLog files and put ones you need instead.
Then run your own version form IDE or CMD, or build your own jar with mvn package. This is beauty of open source )
Hope that helps

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

No branches or pull requests

2 participants