Config expressions passing tests.
This commit is contained in:
@@ -56,7 +56,7 @@ async fn report_analyze() {
|
||||
// Create test message
|
||||
let core = Arc::new(core);
|
||||
let mut session = Session::test(core.clone());
|
||||
session.data.remote_ip = "10.0.0.1".parse().unwrap();
|
||||
session.data.remote_ip_str = "10.0.0.1".to_string();
|
||||
session.eval_session_params().await;
|
||||
session.ehlo("mx.test.org").await;
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ async fn report_dmarc() {
|
||||
|
||||
// Create scheduler
|
||||
let mut core = SMTP::test();
|
||||
let ctx = ConfigContext::new(&[]).parse_signatures();
|
||||
core.shared.signers = ConfigContext::new(&[]).parse_signatures().signers;
|
||||
let temp_dir = make_temp_dir("smtp_report_dmarc_test", true);
|
||||
let config = &mut core.report.config;
|
||||
config.path = temp_dir.temp_dir.clone();
|
||||
config.hash = IfBlock::new(16);
|
||||
config.dmarc_aggregate.sign = "['rsa']".parse_if();
|
||||
config.dmarc_aggregate.sign = "\"['rsa']\"".parse_if();
|
||||
config.dmarc_aggregate.max_size = IfBlock::new(4096);
|
||||
config.submitter = IfBlock::new("mx.example.org".to_string());
|
||||
config.dmarc_aggregate.address = IfBlock::new("reports@example.org".to_string());
|
||||
|
||||
@@ -58,12 +58,12 @@ async fn report_tls() {
|
||||
|
||||
// Create scheduler
|
||||
let mut core = SMTP::test();
|
||||
let ctx = ConfigContext::new(&[]).parse_signatures();
|
||||
core.shared.signers = ConfigContext::new(&[]).parse_signatures().signers;
|
||||
let temp_dir = make_temp_dir("smtp_report_tls_test", true);
|
||||
let config = &mut core.report.config;
|
||||
config.path = temp_dir.temp_dir.clone();
|
||||
config.hash = IfBlock::new(16);
|
||||
config.tls.sign = "['rsa']".parse_if();
|
||||
config.tls.sign = "\"['rsa']\"".parse_if();
|
||||
config.tls.max_size = IfBlock::new(4096);
|
||||
config.submitter = IfBlock::new("mx.example.org".to_string());
|
||||
config.tls.address = IfBlock::new("reports@example.org".to_string());
|
||||
|
||||
Reference in New Issue
Block a user