Adapt tests for moved test data

This commit is contained in:
Dominik Werder
2022-02-17 12:55:34 +01:00
parent 264c4307b9
commit 47acaa68a0
14 changed files with 492 additions and 198 deletions

View File

@@ -1470,8 +1470,8 @@ pub fn test_cluster() -> Cluster {
listen: "0.0.0.0".into(),
port: 6170 + id as u16,
port_raw: 6170 + id as u16 + 100,
data_base_path: format!("../tmpdata/node{:02}", id).into(),
cache_base_path: format!("../tmpdata/node{:02}", id).into(),
data_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)),
cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)),
ksprefix: "ks".into(),
backend: "testbackend".into(),
splits: None,
@@ -1502,13 +1502,13 @@ pub fn sls_test_cluster() -> Cluster {
port: 6190 + id as u16,
port_raw: 6190 + id as u16 + 100,
data_base_path: format!("NOdatapath{}", id).into(),
cache_base_path: format!("../tmpdata/node{:02}", id).into(),
cache_base_path: test_data_base_path_databuffer().join(format!("node{:02}", id)),
ksprefix: "NOKS".into(),
backend: "sls-archive".into(),
splits: None,
archiver_appliance: None,
channel_archiver: Some(ChannelArchiver {
data_base_paths: vec![PathBuf::from("/data/daqbuffer-testdata/sls/gfa03")],
data_base_paths: vec![test_data_base_path_channel_archiver_sls()],
database: Database {
host: "localhost".into(),
name: "testingdaq".into(),
@@ -1531,3 +1531,18 @@ pub fn sls_test_cluster() -> Cluster {
file_io_buffer_size: Default::default(),
}
}
pub fn test_data_base_path_databuffer() -> PathBuf {
let homedir = std::env::var("HOME").unwrap();
let data_base_path = PathBuf::from(homedir).join("daqbuffer-testdata").join("databuffer");
data_base_path
}
pub fn test_data_base_path_channel_archiver_sls() -> PathBuf {
let homedir = std::env::var("HOME").unwrap();
let data_base_path = PathBuf::from(homedir)
.join("daqbuffer-testdata")
.join("sls")
.join("gfa03");
data_base_path
}