diff options
author | Laura Garcia Liebana <nevola@gmail.com> | 2018-03-07 22:51:10 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-03-09 12:45:16 +0100 |
commit | 7d93e2c2fbc77f05fd7acb63a2acf9874c9ad58f (patch) | |
tree | 6773a61dcd261a25d525457bf8b6049787345424 /tests/shell/testcases/sets/dumps/0024named_objects_0.nft | |
parent | 1870165e0241bd06f96da43edbee0e0e82bfa09d (diff) |
tests: shell: autogenerate dump verification
Complete the automated shell tests with the verification of
the test file dump, only for positive tests and if the test
execution was successful.
It's able to generate the dump file with the -g option.
Example:
# ./run-tests.sh -g testcases/chains/0001jumps_0
The dump files are generated in the same path in the folder named
dumps/ with .nft extension.
It has been avoided the dump verification code in every test
file.
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/sets/dumps/0024named_objects_0.nft')
-rw-r--r-- | tests/shell/testcases/sets/dumps/0024named_objects_0.nft | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/dumps/0024named_objects_0.nft b/tests/shell/testcases/sets/dumps/0024named_objects_0.nft new file mode 100644 index 00000000..929c5d93 --- /dev/null +++ b/tests/shell/testcases/sets/dumps/0024named_objects_0.nft @@ -0,0 +1,28 @@ +table inet x { + counter user123 { + packets 12 bytes 1433 + } + + quota user123 { + over 2000 bytes + } + + quota user124 { + over 2000 bytes + } + + set y { + type ipv4_addr + } + + map test { + type ipv4_addr : quota + elements = { 192.168.2.2 : "user124", 192.168.2.3 : "user124" } + } + + chain y { + type filter hook input priority 0; policy accept; + counter name ip saddr map { 1.1.1.1 : "user123", 2.2.2.2 : "user123", 192.168.2.2 : "user123" } + quota name ip saddr map @test drop + } +} |