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

Feat/rpc tests #1202

Merged
merged 26 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e28e998
chore: update dependencies and refactor test code
willemneal Feb 15, 2024
9c35ddf
fix: consolidate the rpc testing with bindings
willemneal Feb 15, 2024
da34efc
fix: set SOROBAN_FEE=10000
willemneal Feb 15, 2024
624d2f5
fix: change port to allow for local CI testing and increase fee
willemneal Feb 15, 2024
7c31534
fix: port 8000 important
willemneal Feb 15, 2024
a05f702
fix: use newer version of RPC
willemneal Feb 15, 2024
37f0e30
fix: increase fee again
willemneal Feb 15, 2024
6dfea27
fix: update quickstart to latest latest
willemneal Feb 15, 2024
9e9bc16
fix: deploy contract directly and remove fee args
willemneal Feb 16, 2024
f1c0d2c
fix: fmt and ensure stderr for deployoy
willemneal Feb 17, 2024
aed9156
fix: don't install contract if it is already installed
willemneal Feb 17, 2024
80843b7
fix: try fee arg
willemneal Feb 17, 2024
93c31b2
fix: fmt
willemneal Feb 23, 2024
35c98fe
fix: using quickstart:testing
willemneal Feb 23, 2024
aa9c317
fix: add sleep to dotenv tests
willemneal Feb 23, 2024
3b39a7c
fix: add more sleep to dotenv tests
willemneal Feb 23, 2024
b012c7d
fix: use instruction and remove sleep
willemneal Feb 27, 2024
ee89505
fix: use u32::max
willemneal Feb 27, 2024
0876423
:fix: u32::max/2
willemneal Feb 27, 2024
2b9cb64
fix: add padding to instruction from sim if one is not provided
willemneal Feb 27, 2024
a313b8d
fix: make async fn
willemneal Feb 27, 2024
726171c
fix: add back sleep
willemneal Feb 27, 2024
c24f1ea
fix: add wait back in
willemneal Feb 27, 2024
cc198b7
fix: use async_trait
willemneal Feb 28, 2024
33c4cbe
fix: make main deploy async
willemneal Feb 29, 2024
7f3ccae
fix: add back sleep
willemneal Feb 29, 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
42 changes: 42 additions & 0 deletions .github/workflows/rpc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: RPC Tests
on:
push:
branches: [main, release/**]
pull_request:

jobs:
test:
name: test RPC
runs-on: ubuntu-22.04
services:
rpc:
image: stellar/quickstart:testing@sha256:7f074dddaf081b21d273f7346325cc1017c38bbee7b839f8b633b280a663232d
ports:
- 8000:8000
env:
ENABLE_LOGS: true
NETWORK: local
ENABLE_SOROBAN_RPC: true
options: >-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
--health-interval 10s
--health-timeout 5s
--health-retries 50
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration

66 changes: 58 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ sha2 = "0.10.7"
ethnum = "1.3.2"
hex = "0.4.3"
itertools = "0.10.0"
async-trait = "0.1.76"

serde-aux = "4.1.2"
serde_json = "1.0.82"
Expand Down
6 changes: 5 additions & 1 deletion cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ stellar-strkey = { workspace = true }
soroban-sdk = { workspace = true }
sep5 = { workspace = true }
soroban-cli = { workspace = true }
soroban-rpc = { workspace = true }

thiserror = "1.0.31"
sha2 = "0.10.6"
assert_cmd = "2.0.4"
assert_fs = "1.0.7"
predicates = "2.1.5"
fs_extra = "1.3.0"
toml = "0.8.10"


[dev-dependencies]
serde_json = "1.0.93"
which = { workspace = true }
tokio = "1.28.1"
walkdir = "2.4.0"

[features]
integration = []
it = []
Loading
Loading