summaryrefslogtreecommitdiff
path: root/test_util/src
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-03-15 18:15:56 -0400
committerGitHub <noreply@github.com>2022-03-15 18:15:56 -0400
commit5d60ee7f1280d8000b918e7fb9e11e3ddca779e7 (patch)
tree9e5480290aadec91020c33e3f8145b495cd394d8 /test_util/src
parent60466de5d5808280542d1a62f86bacffef555cc2 (diff)
chore(test_util): use pretty_assertions::assert_eq when not pattern matching (#13965)
Diffstat (limited to 'test_util/src')
-rw-r--r--test_util/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index 664469cf8..75a8840e3 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -15,6 +15,7 @@ use hyper::Response;
use hyper::StatusCode;
use lazy_static::lazy_static;
use os_pipe::pipe;
+use pretty_assertions::assert_eq;
use regex::Regex;
use rustls::Certificate;
use rustls::PrivateKey;
@@ -1801,7 +1802,9 @@ impl CheckOutputIntegrationTest {
std::fs::read_to_string(output_path).expect("cannot read output")
};
- if !wildcard_match(&expected, &actual) {
+ if !expected.contains("[WILDCARD]") {
+ assert_eq!(actual, expected)
+ } else if !wildcard_match(&expected, &actual) {
println!("OUTPUT\n{}\nOUTPUT", actual);
println!("EXPECTED\n{}\nEXPECTED", expected);
panic!("pattern match failed");
@@ -2090,6 +2093,7 @@ pub fn parse_max_mem(output: &str) -> Option<u64> {
#[cfg(test)]
mod tests {
use super::*;
+ use pretty_assertions::assert_eq;
#[test]
fn parse_wrk_output_1() {