From e7c986226f3623a44fe9ca0896dfdb4a5cbd10f3 Mon Sep 17 00:00:00 2001 From: daywalker90 <8257956+daywalker90@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:54:55 +0200 Subject: [PATCH] fix test setup --- tests/requirements.txt | 3 ++- tests/setup.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index b552182..15197bf 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,3 @@ python-socketio>=5 -websocket-client>=1 \ No newline at end of file +websocket-client>=1 +pyln-client>=24.05 \ No newline at end of file diff --git a/tests/setup.sh b/tests/setup.sh index 998c4d7..5d30ad7 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -56,12 +56,12 @@ fi # Extract the contents if [[ $archive_file == *.tar.gz ]]; then - if ! tar -xzvf "$script_dir/$archive_file" -C "$clnrest_dir"; then + if ! sudo tar -xzvf "$script_dir/$archive_file" -C "$clnrest_dir"; then echo "Error extracting the contents of $archive_file" >&2 exit 1 fi elif [[ $archive_file == *.zip ]]; then - if ! unzip "$script_dir/$archive_file" -d "$clnrest_dir"; then + if ! sudo unzip "$script_dir/$archive_file" -d "$clnrest_dir"; then echo "Error extracting the contents of $archive_file" >&2 exit 1 fi @@ -70,8 +70,8 @@ else exit 1 fi -cp "$clnrest_dir/clnrest-rs" "$clnrest_dir/clnrest" -cp "$clnrest_dir/clnrest-rs" "$clnrest_dir/clnrest.py" +sudo cp "$clnrest_dir/clnrest-rs" "$clnrest_dir/clnrest" +sudo cp "$clnrest_dir/clnrest-rs" "$clnrest_dir/clnrest.py" # Function to check if a Python package is installed check_package() {