Maybe make coverage tests work?
This commit is contained in:
parent
fd5d76391d
commit
a1bc689504
1 changed files with 10 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ use std::net::TcpStream;
|
||||||
fn tls() -> native_tls::TlsConnector {
|
fn tls() -> native_tls::TlsConnector {
|
||||||
native_tls::TlsConnector::builder()
|
native_tls::TlsConnector::builder()
|
||||||
.danger_accept_invalid_certs(true)
|
.danger_accept_invalid_certs(true)
|
||||||
|
.danger_accept_invalid_hostnames((true)
|
||||||
.build()
|
.build()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
@ -70,7 +71,15 @@ fn connect_insecure_then_secure() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn connect_secure() {
|
fn connect_secure() {
|
||||||
imap::connect("127.0.0.1:3993", "imap.example.com", &tls()).unwrap();
|
imap::connect(
|
||||||
|
&format!(
|
||||||
|
"{}:3993",
|
||||||
|
std::env::var("TEST_HOST").unwrap_or("127.0.0.1".to_string())
|
||||||
|
),
|
||||||
|
"imap.example.com",
|
||||||
|
&tls(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue