2020-02-12 08:35:32 +00:00
|
|
|
|
mod common;
|
|
|
|
|
|
2021-12-21 17:40:01 +00:00
|
|
|
|
pub use common::*;
|
2020-02-12 08:35:32 +00:00
|
|
|
|
use spamassassin_milter::*;
|
|
|
|
|
|
|
|
|
|
/// Runs a ‘live’ test against a real SpamAssassin server instance. This test is
|
|
|
|
|
/// run on demand, as SpamAssassin will actually analyse the input, and do DNS
|
|
|
|
|
/// queries etc.
|
|
|
|
|
#[test]
|
2020-11-28 14:46:08 +00:00
|
|
|
|
#[ignore]
|
2020-02-12 08:35:32 +00:00
|
|
|
|
fn live() {
|
2020-11-28 14:46:08 +00:00
|
|
|
|
// When no port is specified, `spamc` will try to connect to the default
|
2020-02-14 08:03:38 +00:00
|
|
|
|
// `spamd` port 783 (see also `/etc/services`).
|
2020-11-28 14:46:08 +00:00
|
|
|
|
let config = configure_spamc(Config::builder()).build();
|
2020-02-12 08:35:32 +00:00
|
|
|
|
|
|
|
|
|
let miltertest = spawn_miltertest_runner(file!());
|
|
|
|
|
|
|
|
|
|
run("inet:3333@localhost", config).expect("milter execution failed");
|
|
|
|
|
|
|
|
|
|
let exit_code = miltertest.join().expect("panic in miltertest runner");
|
|
|
|
|
assert!(exit_code.success(), "miltertest returned error exit code");
|
|
|
|
|
}
|