Skip to content

Commit

Permalink
fix: update expected body in HTTP tests
Browse files Browse the repository at this point in the history
This commit updates the expected response body from
https://api.brigade.sh/healthz to be an empty response.

This partially addresses
deislabs#81
by fixing the failing tests, but the larger issue remains — finding a
test endpoint we could use to properly test the response body.

Signed-off-by: Radu Matei <[email protected]>
  • Loading branch information
radu-matei committed Jan 9, 2022
1 parent 1e0ac38 commit 336b424
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/as/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function get(): void {
check(res, 200, "content-type");
let bytes = res.bodyReadAll();
let body = String.UTF8.decode(bytes.buffer);
if (!body.includes("OK")) {
if (!body.includes("")) {
Console.write("got " + body);
abort();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub extern "C" fn get() {
let str = std::str::from_utf8(&res.body_read_all().unwrap())
.unwrap()
.to_string();
assert_eq!(str, r#""OK""#);
assert_eq!(str, r#""#);
assert_eq!(res.status_code, 200);
assert!(!res
.header_get("content-type".to_string())
Expand Down

0 comments on commit 336b424

Please sign in to comment.