Skip to content

Commit

Permalink
namespaces and channels are cleaned up after use
Browse files Browse the repository at this point in the history
  • Loading branch information
ckampfe committed Feb 6, 2025
1 parent 4b14d1e commit ae24d68
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,22 @@ mod tests {
let get_response_text = get_response.text().await.unwrap();
let get_response_parsed: TestMessage = serde_json::from_str(&get_response_text).unwrap();
assert_eq!(get_response_parsed, test_message_clone);

let namespaces: Vec<String> =
reqwest::get(format!("http://localhost:{port}/channels/namespaces"))
.await
.unwrap()
.json()
.await
.unwrap();

assert_eq!(namespaces, Vec::<String>::new());

let ids = reqwest::get(format!("http://localhost:{port}/channels/a_great_ns"))
.await
.unwrap();

assert_eq!(ids.status(), StatusCode::NOT_FOUND)
}

#[tokio::test]
Expand Down

0 comments on commit ae24d68

Please sign in to comment.