diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 60faed6af6..d426b66cd5 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -134,6 +134,10 @@ jobs: - name: Run node tests timeout-minutes: 25 run: cargo test --release --package ant-node --lib + + - name: Run launchpad tests + timeout-minutes: 25 + run: cargo test --release --package node-launchpad # The `can_store_after_restart` can be executed with other package tests together and passing # on local machine. However keeps failing (when executed together) on CI machines. diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 23a9b78f99..8b4cc22cce 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -252,6 +252,10 @@ jobs: timeout-minutes: 25 run: cargo test --release --package ant-bootstrap + - name: Run launchpad tests + timeout-minutes: 25 + run: cargo test --release --package node-launchpad + - name: Run node tests timeout-minutes: 25 run: cargo test --release --package ant-node --lib diff --git a/node-launchpad/src/app.rs b/node-launchpad/src/app.rs index 7db62de89e..457ba41f6d 100644 --- a/node-launchpad/src/app.rs +++ b/node-launchpad/src/app.rs @@ -321,6 +321,7 @@ mod tests { use super::*; use ant_bootstrap::PeersArgs; use color_eyre::eyre::Result; + use serde_json::json; use std::io::Cursor; use std::io::Write; use tempfile::tempdir; @@ -333,22 +334,17 @@ mod tests { let mountpoint = get_primary_mount_point(); - // Create a valid configuration file with all fields - let valid_config = format!( - r#" - {{ + let config = json!({ "discord_username": "happy_user", "nodes_to_start": 5, - "storage_mountpoint": "{}", + "storage_mountpoint": mountpoint.display().to_string(), "storage_drive": "C:", "connection_mode": "Automatic", "port_from": 12000, "port_to": 13000 - }} - "#, - mountpoint.display() - ); + }); + let valid_config = serde_json::to_string_pretty(&config)?; std::fs::write(&config_path, valid_config)?; // Create default PeersArgs