From dc763552282d2d6e1bb9a7fb8a18d6fbbdcd6b4e Mon Sep 17 00:00:00 2001 From: Jost Schulte Date: Tue, 1 Oct 2024 11:40:13 -0600 Subject: [PATCH] address comments from review --- .github/workflows/test.yml | 2 +- Cargo.toml | 4 ++-- crates/trycp_server/src/configure_player.rs | 2 +- ts/src/local/conductor.ts | 4 +++- ts/test/local/conductor.ts | 1 - 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9733e91..d9fbd348 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: run: nix develop -c $SHELL -c "./build-trycp.sh" - name: Run TryCP integration tests - run: nix develop -c $SHELL -c "cargo test -p trycp_server --test integration --release --target-dir crates/trycp_server/target" + run: nix develop -c $SHELL -c "cargo test -p trycp_server --release --target-dir crates/trycp_server/target" - name: Save TryCP build to cache uses: actions/cache/save@v4 diff --git a/Cargo.toml b/Cargo.toml index b9659b1f..7ddc3d65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,8 @@ resolver = "2" [workspace.dependencies] futures = "0.3" -hdi = "0.5.0-dev.17" -hdk = "0.4.0-dev.19" +hdi = "0.5.0-dev.1" +hdk = "0.4.0-dev.1" nix = { version = "0.29.0", features = ["signal"] } once_cell = "1.5.0" parking_lot = "0.12" diff --git a/crates/trycp_server/src/configure_player.rs b/crates/trycp_server/src/configure_player.rs index 45494f48..e40b78b8 100644 --- a/crates/trycp_server/src/configure_player.rs +++ b/crates/trycp_server/src/configure_player.rs @@ -36,7 +36,7 @@ pub(crate) fn configure_player( let mut admin_port = NEXT_ADMIN_PORT.fetch_add(1, Ordering::SeqCst); loop { - ensure!(admin_port <= ADMIN_PORT_RANGE.end, OutOfPorts); + ensure!(ADMIN_PORT_RANGE.contains(&admin_port), OutOfPorts); let listener = TcpListener::bind(format!("localhost:{admin_port}")); if let Ok(p) = listener { admin_port = p.local_addr().unwrap().port(); diff --git a/ts/src/local/conductor.ts b/ts/src/local/conductor.ts index 85650d17..fcbc7de1 100644 --- a/ts/src/local/conductor.ts +++ b/ts/src/local/conductor.ts @@ -67,6 +67,8 @@ export interface ConductorOptions { /** * Set a DPKI network seed in the conductor instance. + * + * Defaults to "deepkey-test". */ dpkiNetworkSeed?: NetworkSeed; @@ -152,7 +154,7 @@ export class Conductor implements IConductor { ) { if (options?.noDpki && options?.dpkiNetworkSeed) { throw new Error( - "DPKI network can not be set when DPKI is disabled. Enable DPKI or do not provide a DPKI network seed." + "DPKI network seed can not be set when DPKI is disabled. Enable DPKI or do not provide a DPKI network seed." ); } diff --git a/ts/test/local/conductor.ts b/ts/test/local/conductor.ts index 299bcd93..87eab785 100644 --- a/ts/test/local/conductor.ts +++ b/ts/test/local/conductor.ts @@ -5,7 +5,6 @@ import { CellProvisioningStrategy, CloneId, EntryHash, - HolochainError, RevokeAgentKeyResponse, Signal, SignalCb,