Skip to content

Commit bdfd2fd

Browse files
committed
Add an (ignored) test for native-tls
1 parent 667b730 commit bdfd2fd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test.rs

+12
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,18 @@ fn security_framework_ssl() {
706706
or_panic!(conn.execute("SELECT 1::VARCHAR", &[]));
707707
}
708708

709+
#[test]
710+
#[ignore] // need to ignore until native-tls supports extra root certs :(
711+
#[cfg(feature = "with-native-tls")]
712+
fn native_tls_ssl() {
713+
use postgres::tls::native_tls::NativeTls;
714+
715+
let negotiator = NativeTls::new().unwrap();
716+
let conn = or_panic!(Connection::connect("postgres://postgres@localhost",
717+
TlsMode::Require(&negotiator)));
718+
or_panic!(conn.execute("SELECT 1::VARCHAR", &[]));
719+
}
720+
709721
#[test]
710722
fn test_plaintext_pass() {
711723
or_panic!(Connection::connect("postgres://pass_user:password@localhost/postgres", TlsMode::None));

0 commit comments

Comments
 (0)