Define la estructura para tests y ejemplos

This commit is contained in:
Manuel Cillero 2023-06-09 10:33:54 +02:00
parent cd76355430
commit 0af85c4d77
14 changed files with 74 additions and 24 deletions

View file

@ -0,0 +1,15 @@
use pagetop::prelude::*;
struct HealthCheck;
impl ModuleTrait for HealthCheck {}
async fn spawn_app() {
let server = Application::prepare(&HealthCheck).unwrap().server();
let _ = actix_web::rt::spawn(server);
}
#[actix_web::test]
async fn health_check_works() {
spawn_app();
}