Skip to content

Commit

Permalink
Refactor test-script.bats to remove unnecessary use of 'sudo' in inst…
Browse files Browse the repository at this point in the history
…allation command
  • Loading branch information
bengo237 committed Sep 19, 2024
1 parent 45422d6 commit 66f7188
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/tests/test-script.bats
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bats

# Install sudo if not present
if ! command -v sudo &> /dev/null; then
apt-get update && apt-get install -y sudo
fi

bash /app/scripts/deps.sh

chmod +x /app/scripts/install.sh
Expand All @@ -10,5 +15,4 @@ chmod +x /app/scripts/install.sh
export WAZUH_MANAGER="10.0.0.2"
run sudo bash /app/scripts/install.sh
[ "$status" -eq 0 ]
}

}

0 comments on commit 66f7188

Please sign in to comment.