Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zktaiga committed Sep 19, 2023
1 parent 34d2d69 commit 4d110ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/startup.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::routes::{health_check, subscriptions};
use actix_web::dev::Server;
use actix_web::{web, App, HttpResponse, HttpServer};
use actix_web::{web, App, HttpServer};
use std::net::TcpListener;

pub fn run(listener: TcpListener) -> Result<Server, std::io::Error> {
Expand Down
2 changes: 1 addition & 1 deletion tests/health_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net::TcpListener;
fn spawn_app() -> String {
let listener = TcpListener::bind("127.0.0.1:0").expect("Failed to bind random port");
let port = listener.local_addr().unwrap().port();
let server = z2p::run(listener).expect("Failed to bind address");
let server = z2p::startup::run(listener).expect("Failed to bind address");
let _ = tokio::spawn(server);
format!("127.0.0.1:{}", port)
}
Expand Down

0 comments on commit 4d110ca

Please sign in to comment.