Skip to content

Commit

Permalink
rust: Panic on failing reqwest requests in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanCoding committed Apr 23, 2024
1 parent 7288fe9 commit 8311c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/tests/real_api_integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async fn from_http_response_stream_returns_malicious_verdict() {
let vaas = get_vaas().await;

let ct = CancellationToken::from_seconds(10);
let response = result.unwrap();
let response = result.unwrap().error_for_status().unwrap();
let content_length: usize = response.content_length().unwrap() as usize;
let byte_stream = response.bytes_stream();
let verdict = vaas.for_stream(byte_stream, content_length, &ct).await;
Expand All @@ -136,7 +136,7 @@ async fn from_http_response_stream_no_hash_lookup_no_cache_lookup_returns_malici
let vaas = get_vaas_with_flags(false, false).await;

let ct = CancellationToken::from_seconds(10);
let response = result.unwrap();
let response = result.unwrap().error_for_status().unwrap();
let content_length: usize = response.content_length().unwrap() as usize;
let byte_stream = response.bytes_stream();
let verdict = vaas.for_stream(byte_stream, content_length, &ct).await;
Expand Down

0 comments on commit 8311c9f

Please sign in to comment.