Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eco 4788 investigate push admin test failure in webkit #1770

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6bb2f82
Remove Rest#setLog method
lawrence-forooghian May 16, 2024
eab98b9
Remove getRealtimeHost from CompleteDefaults
lawrence-forooghian May 16, 2024
f5361d2
Remove global effects of setting logHandler and logLevel
lawrence-forooghian May 16, 2024
725cb50
Document private API usage in tests
lawrence-forooghian May 2, 2024
a58a6c5
Better handling of failure to start Mocha server
lawrence-forooghian Apr 18, 2024
08ec417
Add Python stuff to gitignore
lawrence-forooghian Apr 17, 2024
ff30f2c
Add abandoned initial attempt at interception proxy
lawrence-forooghian Apr 17, 2024
1ee20a2
Revert "Add abandoned initial attempt at interception proxy"
lawrence-forooghian Apr 17, 2024
4dadcee
ECO-14: Document internal API usage in tests, add interception proxy …
lawrence-forooghian Apr 17, 2024
dd94f9d
isolate failing test
lawrence-forooghian May 15, 2024
243730d
exploring presence test
lawrence-forooghian May 16, 2024
6b0c500
add logs
lawrence-forooghian May 16, 2024
632ece0
turn off log stripping for now
lawrence-forooghian May 17, 2024
43dba0c
further
lawrence-forooghian May 17, 2024
550c7c5
furthe rlogging
lawrence-forooghian May 17, 2024
43913ed
logs
lawrence-forooghian May 17, 2024
952915d
improve logging in proxy
lawrence-forooghian May 17, 2024
5a3d65a
logs
lawrence-forooghian May 17, 2024
ee1fd26
add timestamps to logs
lawrence-forooghian May 17, 2024
5d52c19
add with packet capture
lawrence-forooghian May 17, 2024
4f63a15
restore modular tests
lawrence-forooghian May 20, 2024
50f0899
Make sure we tear down connections in modular.test.js
lawrence-forooghian May 20, 2024
e18f566
investigate push admin test failure
lawrence-forooghian May 20, 2024
562f49f
disable some stuff
lawrence-forooghian May 20, 2024
8b9116a
what about by itself
lawrence-forooghian May 20, 2024
1e761cc
whats the error
lawrence-forooghian May 20, 2024
5b44bd3
Revert "whats the error"
lawrence-forooghian May 20, 2024
04eb10b
print stack
lawrence-forooghian May 20, 2024
e7ef8ac
why is it responding with content-type in ci but not locally?
lawrence-forooghian May 20, 2024
7d04326
sort headers
lawrence-forooghian May 20, 2024
e07fbd2
capture packetds
lawrence-forooghian May 21, 2024
2adfd24
does the test fail with tls off?
lawrence-forooghian May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 74 additions & 3 deletions .github/workflows/test-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
browser: [webkit]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -25,11 +25,82 @@ jobs:
with:
node-version: 20.x
- run: npm ci

# Set up Python (for pipx)
- uses: actions/setup-python@v5
with:
python-version: '3.12'

# Install pipx (for mitmproxy)
# See https://pipx.pypa.io/stable/installation/
- name: Install pipx
run: |
python3 -m pip install --user pipx
sudo pipx --global ensurepath

# https://docs.mitmproxy.org/stable/overview-installation/#installation-from-the-python-package-index-pypi
- name: Install mitmproxy
run: |
pipx install mitmproxy
# We use this library in our addon
pipx inject mitmproxy websockets

- name: Generate mitmproxy SSL certs
run: mitmdump -s test/mitmproxy_addon_generate_certs_and_exit.py

- name: Start interception proxy server
run: ./start-interception-proxy

- name: Install Playwright browsers and dependencies
run: npx playwright install --with-deps
- env:

# For certutil
- name: Install NSS tools
run: sudo apt install libnss3-tools

# This is for Chromium (see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/cert_management.md)
# Note this is the same command that we use for adding it to the Firefox profile (see playwrightHelpers.js)
- name: Install mitmproxy root CA in NSS shared DB
run: |
mkdir -p ~/.pki/nssdb
certutil -A -d sql:$HOME/.pki/nssdb -t "C" -n "Mitmproxy Root Cert" -i ~/.mitmproxy/mitmproxy-ca-cert.pem
certutil -L -d sql:$HOME/.pki/nssdb

# This is for WebKit (I think because it uses OpenSSL)
- name: Install mitmproxy root CA in /usr/local/share/ca-certificates
run: |
sudo cp ~/.mitmproxy/mitmproxy-ca-cert.cer /usr/local/share/ca-certificates/mitmproxy-ca-cert.crt
sudo update-ca-certificates

- name: Install tcpdump
run: sudo apt-get install tcpdump

- name: Run the tests
env:
PLAYWRIGHT_BROWSER: ${{ matrix.browser }}
run: npm run test:playwright
run: |
sudo tcpdump -i any -nn -w packet-capture.pcap &
npm run test:playwright
sudo pkill tcpdump

- name: Upload packet capture
if: always()
uses: actions/upload-artifact@v4
with:
name: packet-capture-${{ matrix.browser }}.pcap
path: packet-capture.pcap

- name: Save interception proxy server logs
if: always()
run: sudo journalctl -u ably-sdk-test-proxy.service > interception-proxy-logs.txt

- name: Upload interception proxy server logs
if: always()
uses: actions/upload-artifact@v4
with:
name: interception-proxy-logs-${{ matrix.browser }}
path: interception-proxy-logs.txt

- name: Upload test results
if: always()
uses: ably/test-observability-action@v1
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/test-node.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ react/
typedoc/generated/
junit/
test/support/mocha_junit_reporter/build/
tmp/

# Python stuff (for interception proxy)
__pycache__
Binary file added capture-5.pcapng
Binary file not shown.
Loading
Loading