Skip to content

Commit

Permalink
Fix encrypt e2e test case exception caused by EncryptRule#getLogicCol…
Browse files Browse the repository at this point in the history
…umnByCipherColumn (#28709)
  • Loading branch information
strongduanmu authored Oct 10, 2023
1 parent 3dcf45d commit c2e6330
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public boolean isCipherColumn(final String columnName) {
public String getLogicColumnByCipherColumn(final String cipherColumnName) {
for (Entry<String, EncryptColumn> entry : columns.entrySet()) {
if (entry.getValue().getCipher().getName().equalsIgnoreCase(cipherColumnName)) {
return entry.getKey();
return entry.getValue().getName();
}
}
throw new EncryptLogicColumnNotFoundException(cipherColumnName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void assertIsEncryptColumn() {

@Test
void assertGetLogicColumnByCipherColumn() {
assertNotNull(encryptTable.getLogicColumnByCipherColumn("cipherColumn"));
assertThat(encryptTable.getLogicColumnByCipherColumn("cipherColumn"), is("logicColumn"));
}

@Test
Expand Down

0 comments on commit c2e6330

Please sign in to comment.