Skip to content

Commit eda5540

Browse files
commoddityadshmhOlshansk
authored
[E2E] Major E2E test refactor, add WebSocket and Cosmos SDK test cases (#373)
## 🌿 Summary Major refactor of E2E tests to add WebSocket support and comprehensive Cosmos SDK test cases, along with improved test organization and documentation. ### 🌱 Primary Changes: - Added WebSocket testing support for EVM JSON-RPC methods with persistent connections - Implemented full Cosmos SDK test coverage including REST, CometBFT, and EVM endpoints - Refactored test code into logical packages for better maintainability (assertions, calculations, logging, etc.) ### 🍃 Secondary changes: - Updated CI workflows to include WebSocket test jobs - Enhanced documentation with WebSocket testing instructions - Improved test metrics and reporting with better error tracking - Added support for testing Pocket and XRPLEVM services in CI ## 🛠️ Type of change Select one or more from the following: - [x] New feature, functionality or library ## 🤯 Sanity Checklist - [x] For code, I have run 'make test_all' --------- Co-authored-by: Arash Deshmeh <adshmh@gmail.com> Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
1 parent c8686e5 commit eda5540

49 files changed

Lines changed: 2504 additions & 1318 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/run-e2e-tests.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ jobs:
5252
# ------------------------------------ #
5353

5454
run-e2e-tests-shannon:
55-
name: Run E2E tests - Shannon
55+
name: Run E2E tests - HTTP Requests
5656
runs-on: "ubuntu-22.04"
5757
needs:
5858
- build-and-test-docker-image
5959
strategy:
6060
matrix:
6161
# DEV_NOTE: Add new services here if they should be tested as part of the Shannon E2E CI suite
62-
service_id: [eth]
62+
service_id: [eth, pocket, xrplevm]
6363
steps:
6464
- uses: actions/checkout@v4
6565

@@ -136,3 +136,47 @@ jobs:
136136

137137
- name: Run E2E test - ETH Fallback
138138
run: make e2e_test_eth_fallback ${{ secrets.SHANNON_ETH_FALLBACK_URL }}
139+
140+
run-e2e-tests-websockets:
141+
name: Run E2E tests - WebSockets
142+
runs-on: "ubuntu-22.04"
143+
needs:
144+
- build-and-test-docker-image
145+
strategy:
146+
matrix:
147+
# DEV_NOTE: Only xrplevm supports WebSocket testing currently
148+
service_id: [xrplevm]
149+
steps:
150+
- uses: actions/checkout@v4
151+
152+
- name: Set up Go
153+
uses: actions/setup-go@v5
154+
with:
155+
go-version: "1.24"
156+
157+
- name: Download Docker image artifact from previous job
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: path-image
161+
path: ${{ runner.temp }}
162+
163+
- name: Load Docker image
164+
run: |
165+
docker load --input ${{ runner.temp }}/path-image.tar
166+
docker image ls -a
167+
168+
- name: copy Shannon E2E config
169+
run: make config_prepare_shannon_e2e
170+
171+
- name: update Shannon E2E config from secrets
172+
env:
173+
SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }}
174+
SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }}
175+
SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}}
176+
run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh
177+
178+
- name: Set Docker container to log to stdout in CI environment
179+
run: ./e2e/scripts/ci/set_docker_log.sh
180+
181+
- name: Run WebSocket E2E test - Service ID ${{ matrix.service_id }}
182+
run: make e2e_test_websocket ${{ matrix.service_id }}

config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func Test_LoadGatewayConfigFromYAML(t *testing.T) {
9393
SystemOverheadAllowanceDuration: defaultSystemOverheadAllowanceDuration,
9494
},
9595
Logger: LoggerConfig{
96-
Level: defaultLogLevel,
96+
Level: "error",
9797
},
9898
},
9999
wantErr: false,

config/examples/config.shannon_example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ shannon_config:
7878
logger_config:
7979
# Valid values are: debug, info, warn, error
8080
# Defaults to info if not specified
81-
level: "info"
81+
level: "error"

config/examples/e2e_load_test.archival.config.yaml

Lines changed: 0 additions & 127 deletions
This file was deleted.

config/examples/e2e_load_test.config.yaml

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)