1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-30 12:00:38 +00:00

fix tests for codecov

This commit is contained in:
Rob Ede 2021-02-27 20:58:44 +00:00
parent b95e1dda34
commit d242f57758
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
2 changed files with 3 additions and 1 deletions

View file

@ -66,7 +66,7 @@ required-features = ["compress"]
[[test]]
name = "test_server"
required-features = ["compress"]
required-features = ["compress", "cookies"]
[[example]]
name = "on_connect"

View file

@ -21,6 +21,7 @@ use flate2::{
Compression,
};
use futures_util::ready;
#[cfg(feature = "openssl")]
use openssl::{
pkey::PKey,
ssl::{SslAcceptor, SslMethod},
@ -54,6 +55,7 @@ const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World";
#[cfg(feature = "openssl")]
fn openssl_config() -> SslAcceptor {
let cert = rcgen::generate_simple_self_signed(vec!["localhost".to_owned()]).unwrap();
let cert_file = cert.serialize_pem().unwrap();