~bitfehler/vomit-sync

a589b3277f75c60788c0955bfad461c31d217324 — Conrad Hoffmann 3 months ago 7a80ebd
test: introduce `test-full` feature for some tests

Some of the tests require a running IMAP test server. So far, they were
simply `#[ignore]`'d. Use a feature to enable them instead. To run all
tests, simply run `cargo test --features test-full`.
3 files changed, 6 insertions(+), 2 deletions(-)

M Cargo.toml
M src/sync.rs
M tests/vsync_integration.rs
M Cargo.toml => Cargo.toml +5 -0
@@ 14,6 14,10 @@ edition = "2021"
[workspace]
members = ["cli"]

[features]
# Activate full integration tests against an IMAP test server
test-full = []

[dependencies]
chrono = "0.4"
imap-proto = "0"


@@ 36,3 40,4 @@ tempfile = "3.3.0"

[[test]]
name = "vsync_integration"
required-features = ["test-full"]

M src/sync.rs => src/sync.rs +1 -1
@@ 747,6 747,7 @@ pub(crate) fn sync<T: io::Read + io::Write>(
}

#[cfg(test)]
#[cfg(feature = "test-full")]
mod tests {
    extern crate imap;
    extern crate lettre;


@@ 805,7 806,6 @@ mod tests {
    }

    #[test]
    #[ignore]
    fn sync_actions() {
        // Can be run against
        // `docker run -it --rm -p 3025:25 -p 3110:110 -p 3143:143 -p 3465:465 -p 3993:993 outoforder/cyrus-imapd-tester:latest`

M tests/vsync_integration.rs => tests/vsync_integration.rs +0 -1
@@ 59,7 59,6 @@ fn session(user: &str) -> imap::Session<native_tls::TlsStream<TcpStream>> {
}

#[test]
#[ignore]
fn basic_sync() {
    // Can be run against
    // `docker run -it --rm -p 3025:25 -p 3110:110 -p 3143:143 -p 3465:465 -p 3993:993 outoforder/cyrus-imapd-tester:latest`