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() {