Skip to content

Commit

Permalink
rustfmt remaining rustls-mio tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed Nov 1, 2020
1 parent b311589 commit fa5a2c3
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 77 deletions.
2 changes: 1 addition & 1 deletion rustls-mio/tests/badssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mod common;

mod online {
use super::common::{TlsClient, polite};
use super::common::{polite, TlsClient};

fn connect(hostname: &str) -> TlsClient {
TlsClient::new(hostname)
Expand Down
3 changes: 2 additions & 1 deletion rustls-mio/tests/bugs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ fn partial_chain() {
let mut server = OpenSSLServer::new_rsa(test_ca.path(), 3000);
server.partial_chain();
server.run();
server.client()
server
.client()
.verbose()
.expect("Ciphers common between both SSL end points:")
.go();
Expand Down
12 changes: 8 additions & 4 deletions rustls-mio/tests/client_suites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fn ecdhe_rsa_aes_128_gcm_sha256() {

let mut server = OpenSSLServer::new_rsa(test_ca.path(), 5000);
server.run();
server.client()
server
.client()
.verbose()
.suite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256")
.expect("Ciphers common between both SSL end points:\nECDHE-RSA-AES128-GCM-SHA256")
Expand All @@ -25,7 +26,8 @@ fn ecdhe_rsa_aes_256_gcm_sha384() {

let mut server = OpenSSLServer::new_rsa(test_ca.path(), 5010);
server.run();
server.client()
server
.client()
.verbose()
.suite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384")
.expect("Ciphers common between both SSL end points:\nECDHE-RSA-AES256-GCM-SHA384")
Expand All @@ -39,7 +41,8 @@ fn ecdhe_ecdsa_aes_128_gcm_sha256() {

let mut server = OpenSSLServer::new_ecdsa(test_ca.path(), 5020);
server.run();
server.client()
server
.client()
.verbose()
.suite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256")
.expect("Ciphers common between both SSL end points:\nECDHE-ECDSA-AES128-GCM-SHA256")
Expand All @@ -53,7 +56,8 @@ fn ecdhe_ecdsa_aes_256_gcm_sha384() {

let mut server = OpenSSLServer::new_ecdsa(test_ca.path(), 5030);
server.run();
server.client()
server
.client()
.verbose()
.suite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384")
.expect("Ciphers common between both SSL end points:\nECDHE-ECDSA-AES256-GCM-SHA384")
Expand Down
8 changes: 6 additions & 2 deletions rustls-mio/tests/curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ fn curve_nistp256() {
let test_ca = common::new_test_ca();

let mut server = OpenSSLServer::new_rsa(test_ca.path(), 4000);
server.arg("-named_curve").arg("prime256v1");
server
.arg("-named_curve")
.arg("prime256v1");
server.run();
server.client()
.verbose()
Expand All @@ -23,7 +25,9 @@ fn curve_nistp384() {
let test_ca = common::new_test_ca();

let mut server = OpenSSLServer::new_rsa(test_ca.path(), 4010);
server.arg("-named_curve").arg("secp384r1");
server
.arg("-named_curve")
.arg("secp384r1");
server.run();
server.client()
.verbose()
Expand Down
6 changes: 4 additions & 2 deletions rustls-mio/tests/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ fn no_ecdhe() {
}
server.run();

server.client()
server
.client()
.verbose()
.fails()
.expect_log("TLS alert received:")
Expand All @@ -33,7 +34,8 @@ fn tls11_only() {
server.arg("-tls1_1");
server.run();

server.client()
server
.client()
.verbose()
.fails()
.expect_log("TLS alert received:")
Expand Down
Loading

0 comments on commit fa5a2c3

Please sign in to comment.