Skip to content

Commit

Permalink
chore(starknet_integration_tests): urn sudo in the first step of the …
Browse files Browse the repository at this point in the history
…integration test

commit-id:d62fe262
  • Loading branch information
nadin-Starkware committed Feb 13, 2025
1 parent 302ac43 commit 2d5cce3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/sequencer_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# crates/starknet_integration_tests/src/bin/sequencer_node_integration_tests/
# with names such as positive_flow.rs, revert_flow.rs, restart_flow.rs.

# The test requires sudo privileges for running certain commands.
# Ensure sudo privileges are available before proceeding.
sudo -v || { echo "Sudo authentication failed. Exiting."; exit 1; }

# TODO(noamsp): find a way to get this mapping automatically instead of hardcoding
declare -A TEST_ALIASES=(
[positive]="positive_flow_integration_test"
Expand All @@ -27,11 +31,13 @@ TEST="${1:-positive}"

echo "Running integration test alias: $TEST"

# Stop any running instances of starknet_sequencer_node (ignore error if not found)
killall starknet_sequencer_node 2>/dev/null
SEQUENCER_BINARY="starknet_sequencer_node"

# Stop any running instances of SEQUENCER_BINARY (ignore error if not found)
killall "$SEQUENCER_BINARY" 2>/dev/null

# Build the main node binary (if required)
cargo build --bin starknet_sequencer_node
cargo build --bin "$SEQUENCER_BINARY"

# Helper function to run a test binary
run_test() {
Expand Down

0 comments on commit 2d5cce3

Please sign in to comment.