From 19245dd1e0c8e1e007a3b98527e379337d57b49a Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Sat, 27 May 2023 18:24:24 +0200 Subject: tests: extend tests for destroy command Extend tests to cover destroy command for chains, flowtables, sets, maps. In addition rename a destroy command test for rules with a duplicated number. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/chains/0044chain_destroy_0 | 7 +++++++ tests/shell/testcases/chains/0045chain_destroy_0 | 8 ++++++++ tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft | 2 ++ tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft | 2 ++ 4 files changed, 19 insertions(+) create mode 100755 tests/shell/testcases/chains/0044chain_destroy_0 create mode 100755 tests/shell/testcases/chains/0045chain_destroy_0 create mode 100644 tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft create mode 100644 tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft (limited to 'tests/shell/testcases/chains') diff --git a/tests/shell/testcases/chains/0044chain_destroy_0 b/tests/shell/testcases/chains/0044chain_destroy_0 new file mode 100755 index 00000000..070021cf --- /dev/null +++ b/tests/shell/testcases/chains/0044chain_destroy_0 @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +$NFT add table t + +$NFT destroy chain t nochain diff --git a/tests/shell/testcases/chains/0045chain_destroy_0 b/tests/shell/testcases/chains/0045chain_destroy_0 new file mode 100755 index 00000000..b356f8f8 --- /dev/null +++ b/tests/shell/testcases/chains/0045chain_destroy_0 @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +$NFT add table t +$NFT add chain t c + +$NFT destroy chain t c diff --git a/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft b/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft new file mode 100644 index 00000000..985768ba --- /dev/null +++ b/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft @@ -0,0 +1,2 @@ +table ip t { +} diff --git a/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft b/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft new file mode 100644 index 00000000..985768ba --- /dev/null +++ b/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft @@ -0,0 +1,2 @@ +table ip t { +} -- cgit v1.2.3