fix typos in drone tests
continuous-integration/drone/push Build is passing Details

This commit is contained in:
ayham 2021-08-21 17:13:46 +03:00
parent edf212de7e
commit 661e3709fb
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
3 changed files with 11 additions and 12 deletions

View File

@ -32,7 +32,7 @@ steps:
commands: commands:
- sleep 75 - sleep 75
- ./scripts/deploy_sandbox_client.sh server:4000 - ./scripts/deploy_sandbox_client.sh server:4000
- cargo test --no-default_features --features "client,tls_no_verify" - cargo test --no-default-features --features "client,tls_no_verify"
services: services:
- name: database - name: database

View File

@ -1,9 +1,9 @@
extern crate log; extern crate log;
#[cfg(feature = "server")]
use libtrader::server;
#[cfg(feature = "client")] #[cfg(feature = "client")]
use libtrader::client; use libtrader::client;
#[cfg(feature = "server")]
use libtrader::server;
fn main() { fn main() {
#[cfg(feature = "server")] #[cfg(feature = "server")]
@ -18,13 +18,12 @@ fn main() {
// Spawn server // Spawn server
rt.block_on(async move { rt.block_on(async move {
server::IP.scope("0.0.0.0:0000".parse().unwrap(), async move { server::IP
// for main task logging .scope("0.0.0.0:0000".parse().unwrap(), async move {
server::initialize() // for main task logging
.await server::initialize().await.expect("failed running server");
.expect("failed running server"); })
}) .await;
.await;
}); });
} }

View File

@ -7,10 +7,10 @@ use tokio::io::AsyncReadExt;
use tokio::io::AsyncWriteExt; use tokio::io::AsyncWriteExt;
use tokio::net::TcpStream; use tokio::net::TcpStream;
#[cfg(all(feature = "server", not(feature = "client")))]
use tokio_rustls::server::TlsStream;
#[cfg(all(feature = "client", not(feature = "server")))] #[cfg(all(feature = "client", not(feature = "server")))]
use tokio_rustls::client::TlsStream; use tokio_rustls::client::TlsStream;
#[cfg(all(feature = "server", not(feature = "client")))]
use tokio_rustls::server::TlsStream;
#[derive(Serialize, Deserialize, PartialEq, Debug, Default)] #[derive(Serialize, Deserialize, PartialEq, Debug, Default)]
pub struct Message { pub struct Message {