Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Nov 6, 2023
1 parent c23031a commit 5d46601
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,17 @@ function zot_teardown {
function test_copy_buffer_size() {
local buffer_size=$1
local file_type=$2
cd "$BATS_TEST_TMPDIR"

# create a temporary dir
local tmpdir=$(mktemp -d "$BATS_TEST_TMPDIR")
cd "$tmpdir"
if [ "$PRIVILEGE_LEVEL" = "priv" ]; then
return
fi

"${ROOT_DIR}/stacker" unpriv-setup
chown -R $SUDO_USER:$SUDO_USER .

mkdir folder1
truncate -s $buffer_size folder1/file1
if [ $file_type = "tar" ]
Expand Down Expand Up @@ -245,4 +255,5 @@ EOF
stacker clean
rm -rf folder1
cd "$ROOT_DIR"
rm -rf "tmpdir"
}

0 comments on commit 5d46601

Please sign in to comment.