Add an (ignored) test for native-tls

This commit is contained in:
Steven Fackler
2016-11-09 21:33:04 +00:00
parent 667b7304eb
commit bdfd2fd9eb

View File

@@ -706,6 +706,18 @@ fn security_framework_ssl() {
or_panic!(conn.execute("SELECT 1::VARCHAR", &[]));
}
#[test]
#[ignore] // need to ignore until native-tls supports extra root certs :(
#[cfg(feature = "with-native-tls")]
fn native_tls_ssl() {
use postgres::tls::native_tls::NativeTls;
let negotiator = NativeTls::new().unwrap();
let conn = or_panic!(Connection::connect("postgres://postgres@localhost",
TlsMode::Require(&negotiator)));
or_panic!(conn.execute("SELECT 1::VARCHAR", &[]));
}
#[test]
fn test_plaintext_pass() {
or_panic!(Connection::connect("postgres://pass_user:password@localhost/postgres", TlsMode::None));