diff --git a/tests/test_fetch.rs b/tests/test_fetch.rs index f7aec2f91..17d5fb59f 100644 --- a/tests/test_fetch.rs +++ b/tests/test_fetch.rs @@ -588,6 +588,8 @@ fn fetch_custom_header() { .arg(r#"[ ."headers"."X-Api-Key", ."headers"."X-Api-Secret" ]"#) .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got = wrk.stdout::(&mut cmd); let expected = "[\"DEMO_KEY\",\"ABC123XYZ\"]"; assert_eq!(got, expected); @@ -647,6 +649,8 @@ fn fetch_custom_user_agent() { .arg("Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got = wrk.stdout::(&mut cmd); assert!(got.contains( "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" @@ -787,6 +791,8 @@ fn fetchpost_custom_user_agent() { .arg("Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got = wrk.stdout::(&mut cmd); assert!(got.contains( "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" @@ -1072,6 +1078,8 @@ fn fetchpost_simple_test() { .arg("response") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got: Vec> = wrk.read_stdout(&mut cmd); let mut got_parsed: Vec> = Vec::new(); @@ -1405,6 +1413,8 @@ fn fetchpost_literalurl_test() { .arg("response") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got: Vec> = wrk.read_stdout(&mut cmd); let mut got_parsed: Vec> = Vec::new(); @@ -1548,6 +1558,8 @@ fn fetchpost_payload_template() { .arg(r#"."data""#) .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got: Vec> = wrk.read_stdout(&mut cmd); let expected = vec![ @@ -1614,6 +1626,8 @@ fn fetchpost_payload_template_with_report() { .arg("short") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got: Vec> = wrk.read_stdout(&mut cmd); let expected = vec![ @@ -1669,6 +1683,8 @@ fn fetchpost_with_headers() { .arg(r#"."headers""#) .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got = wrk.stdout::(&mut cmd); assert!(got.contains("X-Test-Header")); assert!(got.contains("test123")); @@ -1740,6 +1756,8 @@ fn fetchpost_content_type() { .arg("text/plain") .arg("data.csv"); + wrk.assert_success(&mut cmd); + let got = wrk.stdout::(&mut cmd); assert!(got.starts_with( r#"{"args":{},"data":"\"Greeting: Hello World\"","files":{},"form":{},"headers":{"#