Fix all tests, add CI build script
Some checks failed
test / test (push) Has been cancelled

This commit is contained in:
2024-12-30 15:29:19 +10:30
parent 7d985977f2
commit 2a06228000
5 changed files with 44 additions and 8 deletions

View File

@@ -89,7 +89,6 @@ mod tests {
let host = container.get_host().await?;
let port = container.get_host_port_ipv4(1433).await?;
let connection_string = format!("jdbc:sqlserver://{}:{};username=sa;password=TestOnlyContainer123", host, port).to_owned();
let connection_string = "jdbc:sqlserver://localhost:1433;username=sa;password=TestOnlyContainer123;Encrypt=False".to_owned();
let runner = PullFromDBNodeRunner {
pull_from_db_node: PullFromDBNode {

View File

@@ -138,3 +138,26 @@ impl RunnableNode for UploadNodeRunner {
Ok(())
}
}
#[cfg(test)]
mod tests {
use crate::graph::upload_to_db::{DBType, UploadNode, UploadNodeRunner};
#[test]
pub fn check_basic_upload() {
let upload_ode = UploadNodeRunner {
upload_node: UploadNode {
file_path: "".to_owned(),
table_name: "".to_string(),
column_mappings: None,
post_script: None,
db_type: DBType::Mysql,
connection_string: "".to_string(),
}
};
}
#[test]
pub fn check_batch_upload() {}
}

View File

@@ -425,14 +425,14 @@ mod tests {
#[test]
fn move_money() {
super::move_money(
&mut csv::Reader::from_path("reclassrule.csv").unwrap(),
&mut csv::Reader::from_path("line.csv").unwrap(),
&mut csv::Reader::from_path("account.csv").unwrap(),
&mut csv::Reader::from_path("costcentres.csv").unwrap(),
&mut csv::Writer::from_path("output.csv").unwrap(),
&mut csv::Reader::from_path("testing/input/move_money/reclassrule.csv").unwrap(),
&mut csv::Reader::from_path("testing/input/move_money/line.csv").unwrap(),
&mut csv::Reader::from_path("testing/input/account.csv").unwrap(),
&mut csv::Reader::from_path("testing/input/costcentre.csv").unwrap(),
&mut csv::Writer::from_path("testing/output/output.csv").unwrap(),
false,
true,
)
.unwrap();
.expect("Failed to move money");
}
}

View File

@@ -381,7 +381,7 @@ mod tests {
#[test]
fn test_read_definitions() {
let definitions = read_definitions(
&mut csv::Reader::from_path("service_builder_definitions.csv").unwrap(),
&mut csv::Reader::from_path("testing/input/create_products/service_builder_definitions.csv").unwrap(),
);
if let Err(error) = &definitions {
println!("{}", error)