-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlinux.rs
More file actions
56 lines (47 loc) · 1.83 KB
/
Copy pathlinux.rs
File metadata and controls
56 lines (47 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use crate::common::fleet_control_api;
use crate::{LinuxCli, LinuxScenarios, init_logging};
use clap::Parser;
pub mod install;
pub mod scenarios;
mod bash;
mod service;
const DEFAULT_AC_CONFIG_PATH: &str =
"/etc/newrelic-agent-control/local-data/agent-control/local_config.yaml";
pub fn local_config_path(agent_id: &str) -> String {
format!(r"/etc/newrelic-agent-control/local-data/{agent_id}/local_config.yaml")
}
const DEFAULT_LOG_PATH: &str = "/var/log/newrelic-agent-control/agent-control/";
pub const AGENT_CONTROL_DATA_DIR: &str = "/var/lib/newrelic-agent-control";
const SERVICE_NAME: &str = "newrelic-agent-control";
/// Run Linux e2e corresponding scenario which will panic on failure
pub fn run_linux_e2e() {
let cli = LinuxCli::parse();
init_logging(&cli.log_level);
// Run the requested test
match cli.scenario {
LinuxScenarios::InfraAgent(args) => {
scenarios::infra_agent::test_installation_with_infra_agent(args);
}
LinuxScenarios::EBPFAgent(args) => {
scenarios::ebpf_agent::test_ebpf_agent(args);
}
LinuxScenarios::NrdotAgent(args) => {
scenarios::nrdot_agent::test_nrdot_agent(args);
}
LinuxScenarios::PreloadAgent(args) => {
scenarios::preload_agent::test_installation_with_preload_agent(args);
}
LinuxScenarios::RemoteConfig(args) => {
scenarios::remote_config::test_remote_config_is_applied(args);
}
LinuxScenarios::Proxy(args) => {
scenarios::proxy::test_agent_control_proxy(args);
}
LinuxScenarios::FleetControl(args) => {
scenarios::fleet_control::test_fleet_control(args);
}
LinuxScenarios::FleetControlApi(args) => {
fleet_control_api::run_fleet_control_api(args.fleet_control);
}
};
}