use of com.alibaba.druid.wall.spi.PGWallProvider in project druid by alibaba.
the class WallStatTest_drop_table method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
provider.getConfig().setDropTableAllow(true);
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDropCount());
}
use of com.alibaba.druid.wall.spi.PGWallProvider in project druid by alibaba.
the class WallStatTest_insert method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getInsertCount());
}
use of com.alibaba.druid.wall.spi.PGWallProvider in project druid by alibaba.
the class WallStatTest_select_1 method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
Assert.assertTrue(provider.checkValid(sql));
{
WallTableStat tableStat = provider.getTableStat("lhwbbs_posts_reply");
Assert.assertEquals(1, tableStat.getSelectCount());
}
{
WallTableStat tableStat = provider.getTableStat("lhwbbs_posts");
Assert.assertEquals(1, tableStat.getSelectCount());
}
}
use of com.alibaba.druid.wall.spi.PGWallProvider in project druid by alibaba.
the class WallStatTest_create_table method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
provider.getConfig().setCreateTableAllow(true);
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getCreateCount());
}
use of com.alibaba.druid.wall.spi.PGWallProvider in project druid by alibaba.
the class WallStatTest_delete method testPG.
public void testPG() throws Exception {
WallProvider provider = new PGWallProvider();
Assert.assertTrue(provider.checkValid(sql));
WallTableStat tableStat = provider.getTableStat("t");
Assert.assertEquals(1, tableStat.getDeleteCount());
}
Aggregations