gh-ost
gh-ost copied to clipboard
Add basic tests for applier
Description
This PR adds basic tests to a few funcs from go/logic/applier.go, also two small fixes were made based on findings in testing
Details:
- Added tests to func that don't use MySQL in
go/logic/applier_test.go - Removed extra spaces in
sql. BuildDMLUpdateQuery()fromgo/sql/builder.go - Modified
applier.generateSqlModeQuery()to avoid duplicate commas:- Before example (double-comma):
sql_mode = CONCAT(@@session.sql_mode, ',,NO_AUTO_VALUE_ON_ZERO') - After example:
sql_mode = CONCAT(@@session.sql_mode, ',NO_AUTO_VALUE_ON_ZERO')
- Before example (double-comma):
In case this PR introduced Go code changes:
- [x] contributed code is using same conventions as original code
- [x]
script/cibuildreturns with no formatting errors, build errors or unit test errors.