fix(ci): update calls.json index and fix non-root permission in route_router_traffic test
This commit is contained in:
+249
-221
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ NFT_RUNTIME="$ROOT_DIR/tachyon/files/usr/lib/nft/apply.uc"
|
|||||||
WORK_DIR="$(mktemp -d)"
|
WORK_DIR="$(mktemp -d)"
|
||||||
NFT_LOG="$WORK_DIR/nft.log"
|
NFT_LOG="$WORK_DIR/nft.log"
|
||||||
LOGGER_LOG="$WORK_DIR/logger.log"
|
LOGGER_LOG="$WORK_DIR/logger.log"
|
||||||
export NFT_LOG LOGGER_LOG
|
export NFT_LOG LOGGER_LOG WORK_DIR
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -rf "$WORK_DIR"
|
rm -rf "$WORK_DIR"
|
||||||
@@ -31,28 +31,28 @@ assert_contains() {
|
|||||||
|
|
||||||
mkdir -p "$WORK_DIR/bin"
|
mkdir -p "$WORK_DIR/bin"
|
||||||
|
|
||||||
cat >"$WORK_DIR/bin/nft" <<'NFT'
|
cat >"$WORK_DIR/bin/nft" <<NFT
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
{
|
{
|
||||||
printf 'nft'
|
printf 'nft'
|
||||||
for arg in "$@"; do
|
for arg in "\$@"; do
|
||||||
printf '\t%s' "$arg"
|
printf '\t%s' "\$arg"
|
||||||
done
|
done
|
||||||
printf '\n'
|
printf '\n'
|
||||||
} >> "${NFT_LOG:?}"
|
} >> "\${NFT_LOG:?}"
|
||||||
|
|
||||||
if [ "$#" -ge 5 ] && [ "$1" = "flush" ] && [ "$2" = "chain" ]; then
|
if [ "\$#" -ge 5 ] && [ "\$1" = "flush" ] && [ "\$2" = "chain" ]; then
|
||||||
if [ ! -f "$WORK_DIR/chain_exists" ]; then
|
if [ ! -f "$WORK_DIR/chain_exists" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$#" -ge 5 ] && [ "$1" = "add" ] && [ "$2" = "chain" ]; then
|
if [ "\$#" -ge 5 ] && [ "\$1" = "add" ] && [ "\$2" = "chain" ]; then
|
||||||
touch "$WORK_DIR/chain_exists"
|
touch "$WORK_DIR/chain_exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$#" -ge 5 ] && [ "$1" = "delete" ] && [ "$2" = "chain" ]; then
|
if [ "\$#" -ge 5 ] && [ "\$1" = "delete" ] && [ "\$2" = "chain" ]; then
|
||||||
rm -f "$WORK_DIR/chain_exists"
|
rm -f "$WORK_DIR/chain_exists"
|
||||||
fi
|
fi
|
||||||
NFT
|
NFT
|
||||||
|
|||||||
Reference in New Issue
Block a user