Plugging in our existing tests
Because we have used Newman in our testing pipeline, we do not have to worry about high coupling with our choice of web framework. First, we need to copy over our tests in the scripts
directory with the following command:
cp -r web_app/scripts rocket_app/scripts
However, before running it, we must add a GET
method for our login
view with the following outline:
#[get("/login", data = "<credentials>", format = "json")] pub async fn login_get<'a>(credentials: Json<Login>, db: DB) -> Json<LoginResponse> { // same logic as in the login view }
We then need to import this view into the src/main.rs
file and declare it in the auth
mounting for our server...