Skip to content

Commit a4a2ee5

Browse files
feat(cli): beacon CLI tests (#294)
* Command test beacon ported from Charon. Added url parsing and basic auth for request_rrt function. * clippy and some functions extracted * fmt * skip result extracted * pass string by reference to tests * cli test commands constants module * Added beacon.rs unit tests, moved common test functions to helpers module. * fmt * reduced usage of clippy::arithmetic_side_effects to concrete lines, added NonZero for SLOT_TIME_SECS and SLOTS_IN_EPOCH * slot update comment * reveiw corrections * Corrected passing cancelation token to the beacon test * Docker compose file for the pluto alpha test beacon * fixed tests * Made test cases const array * unneeded child_token * JoinSet for collecting tests result instead of channels vector * unneeded clone * Comment regarding status code check * review corrections * review cont. * missing log info * fixed canceling timeout task * tokio::fs::write instead of std * Update crates/cli/src/commands/test/beacon.rs Co-authored-by: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com> * Apply suggestion from @emlautarom1 Co-authored-by: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com> * review, fixed intervals tick for tests * fmt * changed &str to impl AsRef<str> * removed parse_endpoint_url, percent_decode, apply_basic_auth * shadowing variables instead of renaming * impl AsRef instead of `&` * join set * cancelation fixes, more Join Sets usage * improved returning failed test * review cont. * unneeded files * missing join set * removed redundant sleeping in simulation test * percent-encoding not needed * child_token -> clone in cli/src/main.rs --------- Co-authored-by: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com>
1 parent 2ce84e7 commit a4a2ee5

14 files changed

Lines changed: 3472 additions & 937 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ reqwest.workspace = true
4040
tempfile.workspace = true
4141
test-case.workspace = true
4242
backon.workspace = true
43+
wiremock.workspace = true
4344

4445
[lints]
4546
workspace = true

0 commit comments

Comments
 (0)