Add unit test for EncryptOrderByItemTokenGenerator#16012
Merged
strongduanmu merged 1 commit intoapache:masterfrom Mar 13, 2022
huang-yilong:15822
Merged
Add unit test for EncryptOrderByItemTokenGenerator#16012strongduanmu merged 1 commit intoapache:masterfrom huang-yilong:15822
strongduanmu merged 1 commit intoapache:masterfrom
huang-yilong:15822
Conversation
strongduanmu
requested changes
Mar 12, 2022
Member
strongduanmu
left a comment
There was a problem hiding this comment.
@trydamere Thank you for your contribution, this pr looks good to me. I'll merge this pr after removing the useless blank line.
| when(encryptRule.findEncryptTable("t_encrypt")).thenReturn(Optional.of(encryptTable)); | ||
| return encryptRule; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Hi @trydamere, can you remove this useless blank line?
Contributor
Author
There was a problem hiding this comment.
Sure. I'll do it.
strongduanmu
requested changes
Mar 12, 2022
| when(sqlStatementContext.getGroupByContext().getItems()).thenReturn(Collections.emptyList()); | ||
| when(sqlStatementContext.getSubqueryContexts().values()).thenReturn(Collections.emptyList()); | ||
| when(sqlStatementContext.getTablesContext()).thenReturn(new TablesContext(Collections.singletonList(simpleTableSegment))); | ||
| return sqlStatementContext; |
Member
There was a problem hiding this comment.
Hi @trydamere, rename sqlStatementContext with result may be better.
| when(encryptTable.findEncryptorName("certificate_number")).thenReturn(Optional.of("encryptor_name")); | ||
| when(encryptRule.findEncryptor("t_encrypt", "certificate_number")).thenReturn(Optional.of(mock(EncryptAlgorithm.class))); | ||
| when(encryptRule.findEncryptTable("t_encrypt")).thenReturn(Optional.of(encryptTable)); | ||
| return encryptRule; |
Member
There was a problem hiding this comment.
Rename encryptRule with result.
strongduanmu
requested changes
Mar 12, 2022
Member
strongduanmu
left a comment
There was a problem hiding this comment.
Hi @trydamere, can you sync latest master branch to solve ci error?
Contributor
Author
|
I will do it. |
This file contains hidden or 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
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.
Fixes #15822.
Changes proposed in this pull request: