Skip to content

Commit

Permalink
ci: use owners on memcheck workflow local network
Browse files Browse the repository at this point in the history
With the new `--owner-prefix` argument available on the `local run` command and the local testnet
action updated for this, we can use it in the `memcheck` workflow to specify that nodes should be
assigned the owners "node_1", "node_2", and so on.
  • Loading branch information
jacderida authored and joshuef committed May 19, 2024
1 parent 566cd3c commit 8dfde99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ jobs:
uses: maidsafe/sn-local-testnet-action@main
with:
action: start
build: true
faucet-path: target/release/faucet
interval: 2000
join: true
node-path: target/release/safenode
faucet-path: target/release/faucet
owner-prefix: node
platform: ubuntu-latest
set-safe-peers: false
join: true
build: true

# In this case we did *not* want SAFE_PEERS to be set to another value by starting the testnet
- name: Check SAFE_PEERS was not changed
Expand Down
4 changes: 1 addition & 3 deletions sn_node_manager/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,8 @@ fn get_node_owner(
) -> Option<String> {
if let Some(prefix) = owner_prefix {
Some(format!("{}_{}", prefix, number))
} else if let Some(owner) = owner {
Some(owner.clone())
} else {
None
owner.clone()
}
}

Expand Down

0 comments on commit 8dfde99

Please sign in to comment.