Skip to content

Commit d0bd0e9

Browse files
committed
fix(tests): update tests for SSV API rename and PbsState signature change
Align test code with recent refactors: replace removed `ssv_api_url` field with `ssv_node_api_url`/`ssv_public_api_url`, pass the new `PathBuf` argument to `PbsState::new`, and add Nix/devenv paths to .gitignore.
1 parent ed4747c commit d0bd0e9

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ targets.json
1616
.idea/
1717
logs
1818
.vscode/
19+
20+
# Nix
21+
.direnv/
22+
.devenv/
23+
devenv.*
24+
devenv.lock
25+
.devenv.flake.nix
26+
.envrc

tests/tests/pbs_cfg_file_update.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ async fn test_cfg_file_update() -> Result<()> {
5959
* or anything close to it */
6060
extra_validation_enabled: false,
6161
rpc_url: None,
62-
ssv_api_url: Url::parse("http://example.com").unwrap(),
62+
ssv_node_api_url: Url::parse("http://example.com").unwrap(),
63+
ssv_public_api_url: Url::parse("http://example.com").unwrap(),
6364
http_timeout_seconds: 10,
6465
register_validator_retry_limit: 3,
6566
validator_registration_batch_size: None,

tests/tests/pbs_mux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async fn test_ssv_multi_with_node() -> Result<()> {
345345
config.registry_muxes = Some(registry_muxes);
346346

347347
// Run PBS service
348-
let state = PbsState::new(config);
348+
let state = PbsState::new(config, PathBuf::new());
349349
let pbs_server = tokio::spawn(PbsService::run::<(), DefaultBuilderApi>(state));
350350
info!("Started PBS server with pubkey {pubkey}");
351351

@@ -441,7 +441,7 @@ async fn test_ssv_multi_with_public() -> Result<()> {
441441
config.registry_muxes = Some(registry_muxes);
442442

443443
// Run PBS service
444-
let state = PbsState::new(config);
444+
let state = PbsState::new(config, PathBuf::new());
445445
let pbs_server = tokio::spawn(PbsService::run::<(), DefaultBuilderApi>(state));
446446
info!("Started PBS server with pubkey {pubkey}");
447447

0 commit comments

Comments
 (0)