-
Notifications
You must be signed in to change notification settings - Fork 18
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
Advanced Test completion #435
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KushnirykOleh
approved these changes
Dec 21, 2022
…ded MySQL diff test with additional db objects
# Conflicts: # src/main/resources/liquibase/harness/diff/diffDatabases.yml
Green build for advanced test run: https://github.com/liquibase/liquibase-test-harness/actions/runs/3758151094 CC :: @KushnirykOleh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here are described workflows implemented to fit all technical rquirements for Advanced test accordingly:
I) Implemented generateChangelog test in AdvancedTest.groovy. Workflow::
1) Execute Liquibase update command;
2) Execute Liquibase generateChangelog command
3) Validate generated changelog by checking for presence of change type name in initial changelog and generated changelog for .xml, .yml, .json.. For .sql changelog we check for full equality of sql statements in generated changelog and initial changelog.
4) Rollback changes
5) Repeat consiquently for all four fie formats.
II) Implemented diffChangelog test DiffCommandTest.groovy. Workflow for diffChangelog test:
1) Execute Liquibase update command against target database
2) Execute Liquibase diffChangelog command for all four file formats
3) Validate generated diffChangelog (expected to find opposite change type to one in original changelog: e.g. createTable -> dropTable (drop table for .sql), createView -> dropView (drop view for .sql), addForeignKey -> dropForeignKey etc. (drop constraint for .sql))
4) Rollback changes
III) Modified diff test in DiffCommandTest.groovy. Current workflow:
1) Execute Liquibase update command against target database (target and reference databases are of the same type)
2) Execute Liquibase diff command and obtain diff content in .txt
3) Compare generated diff content to expected diff content (full equality comparison)
4) Rollback changes
IV) Modified Snapshot test in SnapshotObjectTest.groovy. Current workflow:
1) Execute Liquibase snapshot command
2) Execute Liquibase snapshot command (.json format)
3) Compare generated snapshot to expected snapshot snippet (Comparison checks for presence of objects from expected snapshot snippet in generated snapshot)
4) Rollback changes
V) Stress test (was implemented in previous version in AdvancedTest.groovy):
1) Run consiquently Liquibase update command that creates a table with 50 columns, inserts 10k rows into it, updates data in all rows, selects all data
2) Track execution time of all operations
2) Rollback changes
As a result current version of Advanced test consists of 3 parts:
AdvancedTest.grovvy (Stress test and generateChangelog command test) <-
DiffCommandTest (diffChangelog command test and diff command test)
SnapshotObjectTest.groovy (Snapshot command test)
All these parts will be united and run in a singe test suite.