file transfer CI: comment out plain HTTP stuff, use rust:1-bullseye

This commit is contained in:
Joakim Frostegård 2021-10-27 21:21:55 +02:00
parent e6d7f78a7a
commit 85412e2976
3 changed files with 30 additions and 28 deletions

View file

@ -1,8 +1,8 @@
name: 'test-transfer' name: 'test-transfer'
description: 'test aquatic file transfer' description: 'test aquatic file transfer'
outputs: outputs:
http_ipv4: # http_ipv4:
description: 'HTTP IPv4 status' # description: 'HTTP IPv4 status'
http_tls_ipv4: http_tls_ipv4:
description: 'HTTP IPv4 over TLS status' description: 'HTTP IPv4 over TLS status'
udp_ipv4: udp_ipv4:

View file

@ -61,11 +61,11 @@ openssl pkcs12 -export -passout "pass:p" -out identity.pfx -inkey key.pem -in ce
cargo build --bin aquatic cargo build --bin aquatic
echo "log_level = 'debug' # echo "log_level = 'debug'
#
[network] # [network]
address = '127.0.0.1:3000'" > http.toml # address = '127.0.0.1:3000'" > http.toml
./target/debug/aquatic http -c http.toml > "$HOME/http.log" 2>&1 & # ./target/debug/aquatic http -c http.toml > "$HOME/http.log" 2>&1 &
echo "log_level = 'debug' echo "log_level = 'debug'
@ -101,12 +101,12 @@ mkdir torrents
# Create torrents # Create torrents
echo "http-test-ipv4" > seed/http-test-ipv4 # echo "http-test-ipv4" > seed/http-test-ipv4
echo "tls-test-ipv4" > seed/tls-test-ipv4 echo "tls-test-ipv4" > seed/tls-test-ipv4
echo "udp-test-ipv4" > seed/udp-test-ipv4 echo "udp-test-ipv4" > seed/udp-test-ipv4
echo "wss-test-ipv4" > seed/wss-test-ipv4 echo "wss-test-ipv4" > seed/wss-test-ipv4
mktorrent -p -o "torrents/http-ipv4.torrent" -a "http://127.0.0.1:3000/announce" "seed/http-test-ipv4" # mktorrent -p -o "torrents/http-ipv4.torrent" -a "http://127.0.0.1:3000/announce" "seed/http-test-ipv4"
mktorrent -p -o "torrents/tls-ipv4.torrent" -a "https://example.com:3001/announce" "seed/tls-test-ipv4" mktorrent -p -o "torrents/tls-ipv4.torrent" -a "https://example.com:3001/announce" "seed/tls-test-ipv4"
mktorrent -p -o "torrents/udp-ipv4.torrent" -a "udp://127.0.0.1:3000" "seed/udp-test-ipv4" mktorrent -p -o "torrents/udp-ipv4.torrent" -a "udp://127.0.0.1:3000" "seed/udp-test-ipv4"
mktorrent -p -o "torrents/wss-ipv4.torrent" -a "wss://example.com:3002" "seed/wss-test-ipv4" mktorrent -p -o "torrents/wss-ipv4.torrent" -a "wss://example.com:3002" "seed/wss-test-ipv4"
@ -149,7 +149,7 @@ cd ..
# Check for completion # Check for completion
HTTP_IPv4="Ok" # Ignore for now # HTTP_IPv4="Ok"
TLS_IPv4="Failed" TLS_IPv4="Failed"
UDP_IPv4="Failed" UDP_IPv4="Failed"
WSS_IPv4="Failed" WSS_IPv4="Failed"
@ -160,14 +160,14 @@ echo "Watching for finished files.."
while [ $i -lt 60 ] while [ $i -lt 60 ]
do do
if test -f "leech/http-test-ipv4"; then # if test -f "leech/http-test-ipv4"; then
if grep -q "http-test-ipv4" "leech/http-test-ipv4"; then # if grep -q "http-test-ipv4" "leech/http-test-ipv4"; then
if [ "$HTTP_IPv4" != "Ok" ]; then # if [ "$HTTP_IPv4" != "Ok" ]; then
HTTP_IPv4="Ok" # HTTP_IPv4="Ok"
echo "HTTP_IPv4 is Ok" # echo "HTTP_IPv4 is Ok"
fi # fi
fi # fi
fi # fi
if test -f "leech/tls-test-ipv4"; then if test -f "leech/tls-test-ipv4"; then
if grep -q "tls-test-ipv4" "leech/tls-test-ipv4"; then if grep -q "tls-test-ipv4" "leech/tls-test-ipv4"; then
if [ "$TLS_IPv4" != "Ok" ]; then if [ "$TLS_IPv4" != "Ok" ]; then
@ -193,7 +193,8 @@ do
fi fi
fi fi
if [ "$HTTP_IPv4" = "Ok" ] && [ "$TLS_IPv4" = "Ok" ] && [ "$UDP_IPv4" = "Ok" ] && [ "$WSS_IPv4" = "Ok" ]; then # if [ "$HTTP_IPv4" = "Ok" ] && [ "$TLS_IPv4" = "Ok" ] && [ "$UDP_IPv4" = "Ok" ] && [ "$WSS_IPv4" = "Ok" ]; then
if [ "$TLS_IPv4" = "Ok" ] && [ "$UDP_IPv4" = "Ok" ] && [ "$WSS_IPv4" = "Ok" ]; then
break break
fi fi
@ -204,14 +205,14 @@ done
echo "Waited for $i seconds" echo "Waited for $i seconds"
echo "::set-output name=http_ipv4::$HTTP_IPv4" # echo "::set-output name=http_ipv4::$HTTP_IPv4"
echo "::set-output name=http_tls_ipv4::$TLS_IPv4" echo "::set-output name=http_tls_ipv4::$TLS_IPv4"
echo "::set-output name=udp_ipv4::$UDP_IPv4" echo "::set-output name=udp_ipv4::$UDP_IPv4"
echo "::set-output name=wss_ipv4::$WSS_IPv4" echo "::set-output name=wss_ipv4::$WSS_IPv4"
echo "" # echo ""
echo "# --- HTTP log --- #" # echo "# --- HTTP log --- #"
cat "http.log" # cat "http.log"
sleep 1 sleep 1
@ -247,11 +248,12 @@ sleep 1
echo "" echo ""
echo "# --- Test results --- #" echo "# --- Test results --- #"
echo "HTTP (IPv4): $HTTP_IPv4" # echo "HTTP (IPv4): $HTTP_IPv4"
echo "HTTP over TLS (IPv4): $TLS_IPv4" echo "HTTP over TLS (IPv4): $TLS_IPv4"
echo "UDP (IPv4): $UDP_IPv4" echo "UDP (IPv4): $UDP_IPv4"
echo "WSS (IPv4): $WSS_IPv4" echo "WSS (IPv4): $WSS_IPv4"
if [ "$HTTP_IPv4" != "Ok" ] || [ "$TLS_IPv4" != "Ok" ] || [ "$UDP_IPv4" != "Ok" ] || [ "$WSS_IPv4" != "Ok" ]; then # if [ "$HTTP_IPv4" != "Ok" ] || [ "$TLS_IPv4" != "Ok" ] || [ "$UDP_IPv4" != "Ok" ] || [ "$WSS_IPv4" != "Ok" ]; then
if [ "$TLS_IPv4" != "Ok" ] || [ "$UDP_IPv4" != "Ok" ] || [ "$WSS_IPv4" != "Ok" ]; then
exit 1 exit 1
fi fi

View file

@ -1,4 +1,4 @@
name: "Test HTTP, UDP and WSS file transfer" name: "Test UDP, TLS and WSS file transfer"
on: on:
push: push:
@ -9,10 +9,10 @@ on:
jobs: jobs:
test-transfer-http: test-transfer-http:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Test BitTorrent file transfer over HTTP (with and without TLS), UDP and WSS" name: "Test BitTorrent file transfer over UDP, TLS and WSS"
timeout-minutes: 20 timeout-minutes: 20
container: container:
image: rust:1.56-bullseye image: rust:1-bullseye
options: --ulimit memlock=524288:524288 options: --ulimit memlock=524288:524288
steps: steps:
- name: Checkout - name: Checkout