mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add test fro sql wall renameTableAllow
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.alibaba.druid.bvt.filter.wall;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.wall.WallConfig;
|
||||
import com.alibaba.druid.wall.WallUtils;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class MysqlWallTest_rename_table extends TestCase {
|
||||
|
||||
public void test_true() throws Exception {
|
||||
WallConfig config = new WallConfig();
|
||||
config.setRenameTableAllow(true);
|
||||
Assert.assertTrue(WallUtils.isValidateMySql("RENAME TABLE t1 TO t2", config));
|
||||
}
|
||||
|
||||
public void test_false() throws Exception {
|
||||
WallConfig config = new WallConfig();
|
||||
config.setRenameTableAllow(false);
|
||||
Assert.assertFalse(WallUtils.isValidateMySql("RENAME TABLE t1 TO t2", config));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user