Compare commits
No commits in common. "701de28cf8efe5d827e59e1af2448146640083aa" and "c55ebec16c8e37bec15b9d78c2297f00e8b83529" have entirely different histories.
701de28cf8
...
c55ebec16c
|
|
@ -1,8 +1,6 @@
|
||||||
pub mod files;
|
pub mod files;
|
||||||
pub mod prcs;
|
pub mod prcs;
|
||||||
pub mod services;
|
pub mod services;
|
||||||
pub mod hagent;
|
|
||||||
pub mod metrics;
|
|
||||||
|
|
||||||
use crate::options::structs::TrackingProcess;
|
use crate::options::structs::TrackingProcess;
|
||||||
use files::create_watcher;
|
use files::create_watcher;
|
||||||
|
|
@ -212,7 +210,7 @@ pub fn get_container_id() -> Option<String> {
|
||||||
}
|
}
|
||||||
Some(String::from_utf8_lossy(&output.stdout).to_string())
|
Some(String::from_utf8_lossy(&output.stdout).to_string())
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(er) => {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
// module needed to check host-agent health condition and to communicate with it
|
|
||||||
|
|
||||||
//
|
|
||||||
// code will be here
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod hagent_unittets {
|
|
||||||
#[tokio::test]
|
|
||||||
// maybe bool : true -> alive, false -> dead
|
|
||||||
// simple request on api
|
|
||||||
async fn hagent_healthcheck() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
#[tokio::test]
|
|
||||||
// Result<maybe Response>
|
|
||||||
// one-shot func
|
|
||||||
async fn send_metrics_to_hagent() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
// module needed to get metrics such as
|
|
||||||
// cpu load, memmory load and net activity
|
|
||||||
|
|
||||||
//
|
|
||||||
// code will be here
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod metrics_unittets {
|
|
||||||
#[tokio::test]
|
|
||||||
// Option<String> output
|
|
||||||
// echo func
|
|
||||||
async fn get_cpu_load() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
#[tokio::test]
|
|
||||||
// Option<String> output
|
|
||||||
// echo func
|
|
||||||
async fn get_ram_load() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
#[tokio::test]
|
|
||||||
// Option<String> output
|
|
||||||
// echo func
|
|
||||||
async fn get_mem_load() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
#[tokio::test]
|
|
||||||
// can't be tested this way because of 0-0 loop of checking buffer
|
|
||||||
// async func with loop inside
|
|
||||||
async fn get_net_stat(){
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
#[tokio::test]
|
|
||||||
async fn init_sumodules() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
// Option<Vec<TrackingProcess OR String>> output
|
|
||||||
// echo func
|
|
||||||
#[tokio::test]
|
|
||||||
async fn get_info_about_subsystems() {
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// use runner_rs::*;
|
use runner_rs::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test() {
|
fn test() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue