From 3c0a376bca76937446fb96d4f6a2f6ef9ea5b69f Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Thu, 4 Feb 2021 09:19:45 +0100 Subject: [PATCH 1/2] Fix test cookie_file --- integration/tests/{cookie_file.txt => cookie_file.cookies} | 0 integration/tests/cookie_file.html | 2 +- integration/tests/cookie_file.hurl | 3 ++- integration/tests/cookie_file.json | 2 +- integration/tests/cookie_file.options | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) rename integration/tests/{cookie_file.txt => cookie_file.cookies} (100%) diff --git a/integration/tests/cookie_file.txt b/integration/tests/cookie_file.cookies similarity index 100% rename from integration/tests/cookie_file.txt rename to integration/tests/cookie_file.cookies diff --git a/integration/tests/cookie_file.html b/integration/tests/cookie_file.html index d51dfa293..be9b11de0 100644 --- a/integration/tests/cookie_file.html +++ b/integration/tests/cookie_file.html @@ -1 +1 @@ -
GET http://localhost:8000/cookie_file
\ No newline at end of file +
# curl --cookie tests/cookie_file.cookies http://localhost:8000/cookie_fileGET http://localhost:8000/cookie_file
HTTP/* 200
\ No newline at end of file diff --git a/integration/tests/cookie_file.hurl b/integration/tests/cookie_file.hurl index b72b7e1fb..930bfef18 100644 --- a/integration/tests/cookie_file.hurl +++ b/integration/tests/cookie_file.hurl @@ -1,2 +1,3 @@ +# curl --cookie tests/cookie_file.cookies http://localhost:8000/cookie_file GET http://localhost:8000/cookie_file - +HTTP/* 200 diff --git a/integration/tests/cookie_file.json b/integration/tests/cookie_file.json index 6d19ee12e..926a97880 100644 --- a/integration/tests/cookie_file.json +++ b/integration/tests/cookie_file.json @@ -1 +1 @@ -{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookie_file"}}]} \ No newline at end of file +{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookie_file"},"response":{"status":200}}]} \ No newline at end of file diff --git a/integration/tests/cookie_file.options b/integration/tests/cookie_file.options index a2005337d..8625a0a32 100644 --- a/integration/tests/cookie_file.options +++ b/integration/tests/cookie_file.options @@ -1 +1 @@ ---cookie cookie_file.cookies +--cookie tests/cookie_file.cookies From b78f248e4ac2300e4b95f8cbf3962c8ef57ea5c9 Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Wed, 3 Feb 2021 20:31:09 +0100 Subject: [PATCH 2/2] Add test artifacts --- .github/workflows/test.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 532df105a..f0565fa00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,7 @@ jobs: cargo build --verbose - name: Test Prequisites run: | - pip3 install Flask && cd integration && python3 server.py & + pip3 install Flask && cd integration && python3 server.py >server.log 2>&1 & wget https://snapshots.mitmproxy.org/5.2/mitmproxy-5.2-linux.tar.gz -O - | tar -xz && ./mitmdump -p 8888 --modify-header "/From-Proxy/Hello" & - name: Run Tests run: | @@ -69,7 +69,14 @@ jobs: - name: Run Integration Tests run: | export PATH="$PWD/target/debug:$PATH" - integration/integration.py + cd integration + ./integration.py + - name: Archive production artifacts + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: tests-ubuntu-${{ matrix.rust }}-artifacts + path: integration/server.log test-osx: runs-on: macos-latest @@ -94,7 +101,7 @@ jobs: cargo build --verbose - name: Test Prequisites run: | - pip3 install Flask && cd integration && python3 server.py & + pip3 install Flask && cd integration && python3 server.py >server.log 2>&1 & wget https://snapshots.mitmproxy.org/5.2/mitmproxy-5.2-osx.tar.gz -O - | tar -xz && ./mitmdump -p 8888 --modify-header "/From-Proxy/Hello" & - name: Run Tests run: | @@ -102,4 +109,11 @@ jobs: - name: Run Integration Tests run: | export PATH="$PWD/target/debug:$PATH" - integration/integration.py + cd integration + ./integration.py + - name: Archive production artifacts + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: tests-osx-${{ matrix.rust }}-artifacts + path: integration/server.log