Skip to content

Commit 8e69c95

Browse files
authored
add tests (#36)
* split cscs api client code into separate files * add tests
1 parent 4b82df9 commit 8e69c95

14 files changed

Lines changed: 509 additions & 218 deletions

File tree

Cargo.lock

Lines changed: 24 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coman/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,6 @@ anyhow = "1.0.90"
7878
vergen-gix = { version = "1.0.2", features = ["build", "cargo"] }
7979

8080
[dev-dependencies]
81+
claim = "0.5.0"
82+
injectorpp = "0.4.0"
8183
rstest = "0.26.1"

coman/src/app/messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::path::PathBuf;
22

33
use crate::{
44
app::user_events::UserEvent,
5-
cscs::api_client::{JobDetail, System},
5+
cscs::api_client::types::{JobDetail, System},
66
};
77

88
#[derive(Debug, PartialEq)]

coman/src/app/user_events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
app::messages::View,
3-
cscs::api_client::{Job, JobDetail, PathEntry, System},
3+
cscs::api_client::types::{Job, JobDetail, PathEntry, System},
44
};
55

66
#[derive(Debug, Eq, Clone, PartialEq, PartialOrd, Ord)]

coman/src/components/file_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
messages::{DownloadPopupMsg, Msg},
1515
user_events::{FileEvent, UserEvent},
1616
},
17-
cscs::{api_client::PathType, ports::BackgroundTask},
17+
cscs::{api_client::types::PathType, ports::BackgroundTask},
1818
};
1919

2020
#[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Clone)]

coman/src/components/system_select_popup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
messages::{Msg, SystemSelectMsg},
1212
user_events::UserEvent,
1313
},
14-
cscs::api_client::System,
14+
cscs::api_client::types::System,
1515
};
1616

1717
#[derive(MockComponent)]

coman/src/components/workload_details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
messages::{JobMsg, Msg},
1616
user_events::UserEvent,
1717
},
18-
cscs::api_client::JobDetail,
18+
cscs::api_client::types::JobDetail,
1919
};
2020

2121
pub struct WorkloadDetails {

coman/src/components/workload_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
messages::{JobMsg, Msg},
1414
user_events::{CscsEvent, UserEvent},
1515
},
16-
cscs::api_client::Job,
16+
cscs::api_client::types::Job,
1717
};
1818

1919
#[derive(MockComponent)]

0 commit comments

Comments
 (0)