Commit 89041780 authored by George Kadianakis's avatar George Kadianakis
Browse files

Disable chutney tests and enable all other v2/v3 functionals tests

parent aeec1e9a
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -5,11 +5,7 @@ python: 3.7
env:
  - TEST=unit
  - TEST=functional_v3
before_install:
  # Install tor and chutney if doing functional tests
  - if [[ $TEST == functional* ]]; then ./test/scripts/install-tor.sh; fi
  - if [[ $TEST == 'functional_v2' ]]; then source test/scripts/install-chutney-v2.sh; fi
  - if [[ $TEST == 'functional_v3' ]]; then source test/scripts/install-chutney-v3.sh; fi
  - TEST=functional_v2
install:
  - pip install -r requirements.txt
  - pip install -r test-requirements.txt
+0 −31
Original line number Diff line number Diff line
#!/bin/bash
# Script to install Chutney, configure a Tor network and wait for the hidden
# service system to be available.
git clone https://git.torproject.org/chutney.git
cd chutney
# Stop chutney network if it is already running
./chutney stop networks/hs-v2-min
./chutney configure networks/hs-v2-min
./chutney start networks/hs-v2-min
./chutney status networks/hs-v2-min

# Retry verify until hidden service subsystem is working
n=0
until [ $n -ge 20 ]
do
  output=$(./chutney verify networks/hs-v2-min)
  # Check if chutney output included 'Transmission: Success'.
  if [[ $output == *"Transmission: Success"* ]]; then
    hs_address=$(echo $output | grep -Po -m 1 "([a-z2-7]{16}.onion:\d{2,5})" | head -n1)
    client_address=$(echo $output | grep -Po -m 1 "(localhost:\d{2,5})" | head -n1)
    echo "HS system running with service available at $hs_address"
    export CHUTNEY_ONION_ADDRESS="$hs_address"
    export CHUTNEY_CLIENT_PORT="$client_address"
    break
  else
    echo "HS system not running yet. Sleeping 15 seconds"
    n=$[$n+1]
    sleep 15
  fi
done
cd ..
+0 −31
Original line number Diff line number Diff line
#!/bin/bash
# Script to install Chutney, configure a Tor network and wait for the hidden
# service system to be available.
git clone https://git.torproject.org/chutney.git
cd chutney
# Stop chutney network if it is already running
./chutney stop networks/hs-v3-min
./chutney configure networks/hs-v3-min
./chutney start networks/hs-v3-min
./chutney status networks/hs-v3-min

# Retry verify until hidden service subsystem is working
n=0
until [ $n -ge 20 ]
do
  output=$(./chutney verify networks/hs-v3-min)
  # Check if chutney output included 'Transmission: Success'.
  if [[ $output == *"Transmission: Success"* ]]; then
    hs_address=$(echo $output | grep -Po -m 1 "([a-z2-7]{56}.onion:\d{2,5})" | head -n1)
    client_address=$(echo $output | grep -Po -m 1 "(localhost:\d{2,5})" | head -n1)
    echo "HS system running with service available at $hs_address"
    export CHUTNEY_ONION_ADDRESS="$hs_address"
    export CHUTNEY_CLIENT_PORT="$client_address"
    break
  else
    echo "HS system not running yet. Sleeping 15 seconds"
    n=$[$n+1]
    sleep 15
  fi
done
cd ..

test/scripts/install-tor.sh

deleted100755 → 0
+0 −15
Original line number Diff line number Diff line
#!/bin/bash
# Script to install Tor
set -ex

sudo apt install apt-transport-https
echo "deb http://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.torproject.org/torproject.org bionic main" | sudo tee -a /etc/apt/sources.list

echo "wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import"
wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
echo "gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -"
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

sudo apt-get update -qq
sudo apt-get install -qq tor deb.torproject.org-keyring