Fixes failing tests (#813)

* fixes failing  tests

* fmt clippy

* updated dockerfile

* fixes failing tests; adds important fix from extracts_versions PR

* assert_eq -> assert_status, giving better error messages

* fixed random failure bug

* fmt, clippy, etc
This commit is contained in:
Wyatt Verchere
2024-01-05 08:20:56 -08:00
committed by GitHub
parent f5802fee31
commit 10eed05d87
37 changed files with 555 additions and 330 deletions

View File

@@ -1,3 +1,4 @@
use actix_http::StatusCode;
use actix_web::test;
use bytes::Bytes;
use common::api_common::ApiProject;
@@ -6,6 +7,8 @@ use common::api_v3::ApiV3;
use common::database::USER_USER_PAT;
use common::environment::{with_test_environment, TestEnvironment};
use crate::common::asserts::assert_status;
mod common;
#[actix_rt::test]
@@ -14,7 +17,7 @@ pub async fn error_404_body() {
// 3 errors should have 404 as non-blank body, for missing resources
let api = &test_env.api;
let resp = api.get_project("does-not-exist", USER_USER_PAT).await;
assert_eq!(resp.status(), 404);
assert_status(&resp, StatusCode::NOT_FOUND);
let body = test::read_body(resp).await;
let empty_bytes = Bytes::from_static(b"");
assert_ne!(body, empty_bytes);