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'
description: 'test aquatic file transfer'
outputs:
http_ipv4:
description: 'HTTP IPv4 status'
# http_ipv4:
# description: 'HTTP IPv4 status'
http_tls_ipv4:
description: 'HTTP IPv4 over TLS status'
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
echo "log_level = 'debug'
[network]
address = '127.0.0.1:3000'" > http.toml
./target/debug/aquatic http -c http.toml > "$HOME/http.log" 2>&1 &
# echo "log_level = 'debug'
#
# [network]
# address = '127.0.0.1:3000'" > http.toml
# ./target/debug/aquatic http -c http.toml > "$HOME/http.log" 2>&1 &
echo "log_level = 'debug'
@ -101,12 +101,12 @@ mkdir 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 "udp-test-ipv4" > seed/udp-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/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"
@ -149,7 +149,7 @@ cd ..
# Check for completion
HTTP_IPv4="Ok" # Ignore for now
# HTTP_IPv4="Ok"
TLS_IPv4="Failed"
UDP_IPv4="Failed"
WSS_IPv4="Failed"
@ -160,14 +160,14 @@ echo "Watching for finished files.."
while [ $i -lt 60 ]
do
if test -f "leech/http-test-ipv4"; then
if grep -q "http-test-ipv4" "leech/http-test-ipv4"; then
if [ "$HTTP_IPv4" != "Ok" ]; then
HTTP_IPv4="Ok"
echo "HTTP_IPv4 is Ok"
fi
fi
fi
# if test -f "leech/http-test-ipv4"; then
# if grep -q "http-test-ipv4" "leech/http-test-ipv4"; then
# if [ "$HTTP_IPv4" != "Ok" ]; then
# HTTP_IPv4="Ok"
# echo "HTTP_IPv4 is Ok"
# fi
# fi
# fi
if test -f "leech/tls-test-ipv4"; then
if grep -q "tls-test-ipv4" "leech/tls-test-ipv4"; then
if [ "$TLS_IPv4" != "Ok" ]; then
@ -193,7 +193,8 @@ do
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
fi
@ -204,14 +205,14 @@ done
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=udp_ipv4::$UDP_IPv4"
echo "::set-output name=wss_ipv4::$WSS_IPv4"
echo ""
echo "# --- HTTP log --- #"
cat "http.log"
# echo ""
# echo "# --- HTTP log --- #"
# cat "http.log"
sleep 1
@ -247,11 +248,12 @@ sleep 1
echo ""
echo "# --- Test results --- #"
echo "HTTP (IPv4): $HTTP_IPv4"
# echo "HTTP (IPv4): $HTTP_IPv4"
echo "HTTP over TLS (IPv4): $TLS_IPv4"
echo "UDP (IPv4): $UDP_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
fi

View file

@ -1,4 +1,4 @@
name: "Test HTTP, UDP and WSS file transfer"
name: "Test UDP, TLS and WSS file transfer"
on:
push:
@ -9,10 +9,10 @@ on:
jobs:
test-transfer-http:
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
container:
image: rust:1.56-bullseye
image: rust:1-bullseye
options: --ulimit memlock=524288:524288
steps:
- name: Checkout