From 85412e2976a54e60de57783b6ce2973362570889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Wed, 27 Oct 2021 21:21:55 +0200 Subject: [PATCH] file transfer CI: comment out plain HTTP stuff, use rust:1-bullseye --- .github/actions/test-transfer/action.yml | 4 +- .github/actions/test-transfer/entrypoint.sh | 48 +++++++++++---------- .github/workflows/test-transfer.yml | 6 +-- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/actions/test-transfer/action.yml b/.github/actions/test-transfer/action.yml index aa5afef..c04e4e8 100644 --- a/.github/actions/test-transfer/action.yml +++ b/.github/actions/test-transfer/action.yml @@ -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: diff --git a/.github/actions/test-transfer/entrypoint.sh b/.github/actions/test-transfer/entrypoint.sh index 876fdef..d6a7eea 100755 --- a/.github/actions/test-transfer/entrypoint.sh +++ b/.github/actions/test-transfer/entrypoint.sh @@ -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 \ No newline at end of file diff --git a/.github/workflows/test-transfer.yml b/.github/workflows/test-transfer.yml index ee24cc3..c1ae76b 100644 --- a/.github/workflows/test-transfer.yml +++ b/.github/workflows/test-transfer.yml @@ -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