From 381d368fbfd773fa07b62e32dc51d38a888ea873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Fri, 9 Feb 2024 21:50:57 +0300 Subject: [PATCH] fix(tests): update the asserts in expired SSL certificate test --- lychee-bin/tests/cli.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lychee-bin/tests/cli.rs b/lychee-bin/tests/cli.rs index 6ff653df8f..aed26341ea 100644 --- a/lychee-bin/tests/cli.rs +++ b/lychee-bin/tests/cli.rs @@ -153,13 +153,11 @@ mod cli { // Parse site error status from the fail_map let output_json = serde_json::from_slice::(&output.stdout).unwrap(); let site_error_status = &output_json["fail_map"][&test_path.to_str().unwrap()][0]["status"]; + let error_details = site_error_status["details"].to_string(); - assert_eq!( - "error:0A000086:SSL routines:tls_post_process_server_certificate:\ - certificate verify failed:../ssl/statem/statem_clnt.c:1883: \ - (certificate has expired)", - site_error_status["details"] - ); + assert!(error_details + .contains("error:0A000086:SSL routines:tls_post_process_server_certificate:")); + assert!(error_details.contains("(certificate has expired)")); Ok(()) }