Combine redundant dbfwfilter tests
The fwf test now only tests the functionality of the rules themselves, not the parsing. The fwf_syntax test handles the testing of the parser. The fwf2 test was removed as it was almost identical with the original fwf test.
This commit is contained in:
3
maxscale-system-test/fw/deny14
Normal file
3
maxscale-system-test/fw/deny14
Normal file
@ -0,0 +1,3 @@
|
||||
drop table if exists t1;
|
||||
create table t1(id int);
|
||||
alter table t1 add column b int;
|
2
maxscale-system-test/fw/deny15
Normal file
2
maxscale-system-test/fw/deny15
Normal file
@ -0,0 +1,2 @@
|
||||
grant select on *.* to 'skysql'@'localhost';
|
||||
revoke select on *.* from 'skysql'@'localhost';
|
2
maxscale-system-test/fw/deny16
Normal file
2
maxscale-system-test/fw/deny16
Normal file
@ -0,0 +1,2 @@
|
||||
use test;
|
||||
load data local infile 'test.csv' into table test.t1;
|
12
maxscale-system-test/fw/deny17
Normal file
12
maxscale-system-test/fw/deny17
Normal file
@ -0,0 +1,12 @@
|
||||
select sum(1) from test.t1;
|
||||
select avg(1) from test.t1;
|
||||
select sum(avg(1)) from test.t1;
|
||||
select my_function(1) from test.t1;
|
||||
select my_function("1") from test.t1;
|
||||
select * from test.t1 where 1 = 1;
|
||||
select * from test.t1 where 1 >= 1;
|
||||
select * from test.t1 where 1 <= 1;
|
||||
select * from test.t1 where 1 != 1;
|
||||
select * from test.t1 where 1 <> 1;
|
||||
select function(*) from test.t1;
|
||||
select insert(*) from test.t1;
|
1
maxscale-system-test/fw/deny18
Normal file
1
maxscale-system-test/fw/deny18
Normal file
@ -0,0 +1 @@
|
||||
select 1;
|
3
maxscale-system-test/fw/pass14
Normal file
3
maxscale-system-test/fw/pass14
Normal file
@ -0,0 +1,3 @@
|
||||
select * from mysql.user;
|
||||
use mysql;
|
||||
set @var = 1;
|
3
maxscale-system-test/fw/pass15
Normal file
3
maxscale-system-test/fw/pass15
Normal file
@ -0,0 +1,3 @@
|
||||
select * from mysql.user;
|
||||
use mysql;
|
||||
set @var = 1;
|
2
maxscale-system-test/fw/pass16
Normal file
2
maxscale-system-test/fw/pass16
Normal file
@ -0,0 +1,2 @@
|
||||
select * from mysql.user;
|
||||
set @var = 1;
|
8
maxscale-system-test/fw/pass17
Normal file
8
maxscale-system-test/fw/pass17
Normal file
@ -0,0 +1,8 @@
|
||||
drop table if exists test.t1;
|
||||
create table test.t1(id int);
|
||||
drop function if exists my_function;
|
||||
create function my_function (arg int) returns int deterministic return arg * arg;
|
||||
select "sum(1)";
|
||||
select (1);
|
||||
select * from(select 1) as a;
|
||||
insert into test.t1 values (1);
|
2
maxscale-system-test/fw/pass18
Normal file
2
maxscale-system-test/fw/pass18
Normal file
@ -0,0 +1,2 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (id int);
|
4
maxscale-system-test/fw/rules14
Normal file
4
maxscale-system-test/fw/rules14
Normal file
@ -0,0 +1,4 @@
|
||||
rule test1 deny regex '.*' on_queries drop
|
||||
rule test2 deny regex '.*' on_queries create
|
||||
rule test3 deny regex '.*' on_queries alter
|
||||
users %@% match any rules test1 test2 test3
|
3
maxscale-system-test/fw/rules15
Normal file
3
maxscale-system-test/fw/rules15
Normal file
@ -0,0 +1,3 @@
|
||||
rule test1 deny regex '.*' on_queries grant
|
||||
rule test2 deny regex '.*' on_queries revoke
|
||||
users %@% match any rules test1 test2
|
3
maxscale-system-test/fw/rules16
Normal file
3
maxscale-system-test/fw/rules16
Normal file
@ -0,0 +1,3 @@
|
||||
rule test1 deny regex '.*' on_queries use
|
||||
rule test2 deny regex '.*' on_queries load
|
||||
users %@% match any rules test1 test2
|
5
maxscale-system-test/fw/rules17
Normal file
5
maxscale-system-test/fw/rules17
Normal file
@ -0,0 +1,5 @@
|
||||
rule test1 deny function sum avg on_queries select
|
||||
rule test2 deny function my_function on_queries select
|
||||
rule test3 deny function = >= <= != <> on_queries select
|
||||
rule test4 deny function `function` `insert`
|
||||
users %@% match any rules test1 test2 test3 test4
|
2
maxscale-system-test/fw/rules18
Normal file
2
maxscale-system-test/fw/rules18
Normal file
@ -0,0 +1,2 @@
|
||||
rule no_selects deny on_queries select
|
||||
users %@% match any rules no_selects
|
Reference in New Issue
Block a user