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

Add unit test for mysql configstore #5502

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Conversation

Shaddoll
Copy link
Contributor

What changed?

  • Add unit test for mysql configstore
  • Split sql statements into a different file

Why?
To improve code quality

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

Comment on lines +26 to +28
_selectLatestConfigQuery = "SELECT row_type, version, timestamp, data, data_encoding FROM cluster_config WHERE row_type = ? ORDER BY version LIMIT 1;"

_insertConfigQuery = "INSERT INTO cluster_config (row_type, version, timestamp, data, data_encoding) VALUES(?, ?, ?, ?, ?)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be consistent with general Go style for constants let's drop the underscore from names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common/persistence/sql/sqlplugin/mysql/configstore_test.go Outdated Show resolved Hide resolved
common/persistence/sql/sqlplugin/mysql/configstore_test.go Outdated Show resolved Hide resolved
@Shaddoll Shaddoll enabled auto-merge (squash) December 20, 2023 01:41
@Shaddoll Shaddoll merged commit 2722701 into uber:master Dec 20, 2023
16 checks passed
@Shaddoll Shaddoll deleted the mysql-test branch December 20, 2023 02:02
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

Successfully merging this pull request may close these issues.

2 participants