use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallHavingTest6 method test_check_false.
public void test_check_false() throws Exception {
WallConfig config = new WallConfig();
config.setSelectHavingAlwayTrueCheck(false);
config.setConditionAndAlwayTrueAllow(true);
config.setCommentAllow(true);
Assert.assertTrue(WallUtils.isValidateMySql(sql, config));
Assert.assertTrue(WallUtils.isValidateMySql(sql1, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallSelectWhereTest6 method test_check_true.
public void test_check_true() throws Exception {
WallConfig config = new WallConfig();
config.setSelectWhereAlwayTrueCheck(true);
config.setConditionAndAlwayTrueAllow(true);
config.setCommentAllow(true);
Assert.assertFalse(WallUtils.isValidateMySql(sql, config));
Assert.assertFalse(WallUtils.isValidateMySql(sql1, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallSelectWhereTest6 method test_check_false.
public void test_check_false() throws Exception {
WallConfig config = new WallConfig();
config.setSelectWhereAlwayTrueCheck(false);
config.setConditionAndAlwayTrueAllow(true);
config.setCommentAllow(true);
Assert.assertTrue(WallUtils.isValidateMySql(sql, config));
Assert.assertTrue(WallUtils.isValidateMySql(sql1, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallTruncateTest method testMySql.
public void testMySql() throws Exception {
WallConfig config = new WallConfig();
Assert.assertTrue(WallUtils.isValidateMySql(sql, config));
}
use of com.alibaba.druid.wall.WallConfig in project druid by alibaba.
the class WallTruncateTest method testORACLE.
public void testORACLE() throws Exception {
WallConfig config = new WallConfig();
Assert.assertTrue(WallUtils.isValidateOracle(sql, config));
}
Aggregations