Commit f703f250 authored by Alberto Gonzalez Barneo's avatar Alberto Gonzalez Barneo
Browse files

Fixed wrong identation

parent a8eeab3a
Loading
Loading
Loading
Loading
+20 −17
Original line number Diff line number Diff line
@@ -156,37 +156,40 @@ unit_test service:
    - echo "Starting stage: deploy_mock_nodes"
    - for port in 11111 22222 33333; do
        if lsof -i:$port >/dev/null 2>&1; then
          echo "Freeing up port $port...";
          fuser -k $port/tcp;
          echo "Freeing up port $port..."
          fuser -k $port/tcp
        fi
      done
    - MOCK_NODES_DIR="$PWD/src/tests/tools/mock_qkd_nodes"
    - if [ -d "$MOCK_NODES_DIR" ]; then
        cd "$MOCK_NODES_DIR" || exit;
        ./start.sh &;
        MOCK_NODES_PID=$!;
    - |
      if [ -d "$MOCK_NODES_DIR" ]; then
        cd "$MOCK_NODES_DIR" || exit
        ./start.sh &
        MOCK_NODES_PID=$!
      else
        echo "Error: Mock QKD nodes directory '$MOCK_NODES_DIR' not found.";
        exit 1;
        echo "Error: Mock QKD nodes directory '$MOCK_NODES_DIR' not found."
        exit 1
      fi
    - echo "Waiting for mock nodes to be up..."
    - RETRY_COUNT=0
    - MAX_RETRIES=15
    - while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
    - |
      while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
        if curl -s http://127.0.0.1:11111 > /dev/null && \
           curl -s http://127.0.0.1:22222 > /dev/null && \
           curl -s http://127.0.0.1:33333 > /dev/null; then
            echo "Mock nodes are up!";
            break;
            echo "Mock nodes are up!"
            break
        else
            echo "Mock nodes not ready, retrying in 5 seconds...";
            RETRY_COUNT=$((RETRY_COUNT + 1));
            sleep 5;
            echo "Mock nodes not ready, retrying in 5 seconds..."
            RETRY_COUNT=$((RETRY_COUNT + 1))
            sleep 5
        fi
      done
    - if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
        echo "Error: Mock nodes failed to start after multiple attempts.";
        exit 1;
    - |
      if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
        echo "Error: Mock nodes failed to start after multiple attempts."
        exit 1
      fi

    # Run the tests