Removing code
All checks were successful
Rust Build / Check (pull_request) Successful in 47s
Rust Build / Test Suite (pull_request) Successful in 53s
Rust Build / Rustfmt (pull_request) Successful in 27s
Rust Build / Clippy (pull_request) Successful in 48s
Rust Build / build (pull_request) Successful in 1m28s
All checks were successful
Rust Build / Check (pull_request) Successful in 47s
Rust Build / Test Suite (pull_request) Successful in 53s
Rust Build / Rustfmt (pull_request) Successful in 27s
Rust Build / Clippy (pull_request) Successful in 48s
Rust Build / build (pull_request) Successful in 1m28s
This commit is contained in:
24
src/main.rs
24
src/main.rs
@@ -2,11 +2,9 @@ use axum::{
|
|||||||
Router,
|
Router,
|
||||||
routing::{get, post},
|
routing::{get, post},
|
||||||
};
|
};
|
||||||
// use std::net::SocketAddr;
|
|
||||||
|
|
||||||
use icarus_auth::callers;
|
use icarus_auth::callers;
|
||||||
use icarus_auth::config;
|
use icarus_auth::config;
|
||||||
// use sqlx::Postgres;
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
@@ -52,14 +50,9 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use axum::{
|
use axum::{
|
||||||
body::Body,
|
body::Body,
|
||||||
// extract::connect_info::MockConnectInfo,
|
|
||||||
http::{Request, StatusCode},
|
http::{Request, StatusCode},
|
||||||
};
|
};
|
||||||
use http_body_util::BodyExt;
|
use http_body_util::BodyExt;
|
||||||
// use http_body_util::BodyExt; // for `collect`
|
|
||||||
// use serde_json::{Value, json};
|
|
||||||
// use tokio::net::TcpListener;
|
|
||||||
// use tower::{Service, ServiceExt}; // for `call`, `oneshot`, and `ready`
|
|
||||||
use tower::ServiceExt; // for `call`, `oneshot`, and `ready`
|
use tower::ServiceExt; // for `call`, `oneshot`, and `ready`
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
@@ -80,23 +73,6 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(response.status(), StatusCode::OK);
|
assert_eq!(response.status(), StatusCode::OK);
|
||||||
|
|
||||||
/*
|
|
||||||
match response.into_body().collect().await {
|
|
||||||
Ok(o) => {
|
|
||||||
let parsed: String = match String::from_utf8(o.to_bytes()) {
|
|
||||||
Ok(s) => s,
|
|
||||||
Err(err) => {
|
|
||||||
String::new()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Err(err) => {
|
|
||||||
assert!(false,
|
|
||||||
"Error: {:?}", err.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
let body = response.into_body().collect().await.unwrap().to_bytes();
|
let body = response.into_body().collect().await.unwrap().to_bytes();
|
||||||
assert_eq!(&body[..], b"Hello, World!");
|
assert_eq!(&body[..], b"Hello, World!");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user