summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/transactions/0040set_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/transactions/0040set_0')
-rwxr-xr-xtests/shell/testcases/transactions/0040set_014
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/shell/testcases/transactions/0040set_0 b/tests/shell/testcases/transactions/0040set_0
index 0ffc4416..7386ecfb 100755
--- a/tests/shell/testcases/transactions/0040set_0
+++ b/tests/shell/testcases/transactions/0040set_0
@@ -2,14 +2,6 @@
set -e
-tmpfile=$(mktemp)
-if [ ! -w $tmpfile ] ; then
- echo "Failed to create tmp file" >&2
- exit 0
-fi
-
-trap "rm -rf $tmpfile" EXIT # cleanup if aborted
-
RULESET="table ip filter {
map client_to_any {
type ipv4_addr : verdict
@@ -28,8 +20,7 @@ RULESET="table ip filter {
chain CIn_1 {
}
}"
-echo "$RULESET" > $tmpfile
-$NFT -f $tmpfile
+$NFT -f - <<< $RULESET
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1
@@ -45,8 +36,7 @@ fi
RULESET="delete element ip filter client_to_any { 1.2.3.4 : goto CIn_1 }
delete chain ip filter CIn_1"
-echo "$RULESET" > $tmpfile
-$NFT -f $tmpfile
+$NFT -f - <<< $RULESET
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1