Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Jun 15, 2021
1 parent dcd8d98 commit d470cb6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
os:
- ubuntu-latest
toolchain:
- stable
- nightly
target:
- x86_64-unknown-linux-gnu
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
os:
- ubuntu-latest
toolchain:
- stable
- nightly
target:
- x86_64-unknown-linux-gnu
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(decl_macro)]

extern crate mprober_lib;

extern crate byte_unit;
Expand Down
10 changes: 5 additions & 5 deletions src/rocket_mounts/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,13 +974,13 @@ mod test {
use std::time::Duration;

use rocket::http::Header;
use rocket::local::Client;
use rocket::local::blocking::Client;

const TEST_DETECT_INTERVAL: u64 = 1000;
const TEST_AUTH_KEY: &str = "magic";

fn create_basic_rocket(has_auth_key: bool) -> Rocket {
let rocket = rocket::ignite()
fn create_basic_rocket(has_auth_key: bool) -> Rocket<Build> {
let rocket = rocket::build()
.manage(super::super::DetectInterval(Duration::from_millis(TEST_DETECT_INTERVAL)));

if has_auth_key {
Expand All @@ -994,7 +994,7 @@ mod test {
fn test_no_need_auth() {
let rocket = create_basic_rocket(false).mount("/api", routes![hostname, hostname_401]);

let client = Client::new(rocket).unwrap();
let client = Client::tracked(rocket).unwrap();

{
let mut req = client.get("/api/hostname");
Expand All @@ -1019,7 +1019,7 @@ mod test {
fn test_need_auth() {
let rocket = create_basic_rocket(true).mount("/api", routes![hostname, hostname_401]);

let client = Client::new(rocket).unwrap();
let client = Client::tracked(rocket).unwrap();

{
let mut req = client.get("/api/hostname");
Expand Down

0 comments on commit d470cb6

Please sign in to comment.