-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixed --verbose flag setup in unexpected-changesets #2167
Conversation
- Is a boolean flag - Is not required
➤ Erzsebet Carmean commented: PRIVATE COMMENT @nathan Voxland ( https://liquibase.slack.com/team/U4DK1LG8P ), hi! The --verbose flag for status does not require a value. It looks like the --verbose flag for unexpected-changesets is going to require a true/false value. If so, can we make --verbose for unexpected changesets behave the same as the --verbose for status? Jack Odzhubeiskyi - Depending on Nathan’s answer, there are a couple of manual test cases that you will not need to execute. I’ve labeled them as TBD. |
➤ Jack Odzhubeiskyi commented: Liquibase-4.6.1-fix-unexpected-changesets-SNAPSHOT #3Verify the unexpected-changesets command does not require the verbose parameter. PASS Starting Liquibase at 15:54:23 (version 4.6.1-fix-unexpected-changesets-SNAPSHOT #3 built at 2021-11-12 20:28+0000) 1 unexpected changes were found in root@172.19.0.1@jdbc:mysql://localhost:3306/intuser_db 1 unexpected changes were found in root@172.19.0.1@jdbc:mysql://localhost:3306/intuser_db |
Description
Fixes #1987
Makes UnexpectedChangestsCommandStep.VERBOSE_ARG flag:
Does not change logic of unexpected-changesets command, just fixes the argument handling in the CLI
Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Output without --verbose:
1 unexpected changes were found in LBUSER@jdbc:oracle:thin:@localhost:1523/ORCLPDB1
Output with --verbose:
Test Requirements (Liquibase Internal QA)
This test is database-independent but bug repro was done using the attached changelogs against MySQL. The unexpected-changesets command is used to determine two things:
Manual Tests
Setup
liquibase update --changelog-file lb2124-changelog.xml
Validations
Verify the unexpected-changesets command does not require the verbose parameter.
liquibase unexpected-changesets --changelog-file lb2124-changelog2.xml
Verify the unexpected-changesests command executed with verbose outputs the unexpected changeset in the changelog along with additional detail.
liquibase unexpected-changesets --changelog-file lb2124-changelog2.xml --verbose
TBD :: Verify the unexpected-changesets command executed with verbose=true outputs the unexpected changeset in the changelog along with additional detail.
liquibase unexpected-changesets --changelog-file lb2124-changelog2.xml --verbose true
TBD :: Verify the unexpected-changesets command executed with verbose=false outputs that there is one unexpected changeset in the changelog.
liquibase unexpected-changesets --changelog-file lb2124-changelog2.xml --verbose
Verify unexpected-changests command executed with verbose outputs that there is one unexpected changeset in the DATABASECHANGELOG table.
liquibase unexpected-changesets --changelog-file lb2124-changelog.xml --verbose
Automated Tests
A new functional tests should be added to exercise the unexpected-changesets command.
GIVEN a changelog with createTable table_lb2124
GIVEN a second changelog with createTable table_lb2124_2
WHEN I run
liquibase update --changelog-file <first_changelog>
THEN I EXPECT update is successful
WHEN I run
liquibase unexpected-changesets --changelog-file <second_changelog>
THEN I EXPECT the output to contain that create table_lb2124 is unexpected.
┆Issue is synchronized with this Jira Bug by Unito