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 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