Skip to content

Commit

Permalink
chore(ci): add launchpad tests to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Dec 16, 2024
1 parent 039c8ba commit f2b3cf7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 5 additions & 9 deletions node-launchpad/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit f2b3cf7

Please sign in to comment.