shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

MySQL encrypt test

Open codefairy08 opened this issue 7 years ago • 0 comments

This issue is for encrypt parsing test. when using EncryptDataSource for encryption, it needs SQL parser doing something for encryption, SQL parser need genereate EncryptColumnToken and encrypt Conditions.the test just check both of them which are expected. The following is the specific design:

  • [x] add encrypt-rule-for-parser.yaml for test, take column 'name' and ‘mobile’ of table 't_encrypt' as encrypt column

  • [x] add test case SQL, ex: select.xml for select test, it need test select,insert,update,delete statement, so it need four files for sql case test.

  • [x] add expected result for test case sql, it also need four files.

  • [x] add EncryptColumnTokenAssert check EncryptColumnToken in DMLStatement

  • [x] add check for encrypt Conditions

  • [x] add unit test

codefairy08 avatar Apr 11 '19 09:04 codefairy08