Skip to content

Commit

Permalink
fix(tests): update the asserts in expired SSL certificate test
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Feb 9, 2024
1 parent 90ed0e7 commit 381d368
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lychee-bin/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,11 @@ mod cli {
// Parse site error status from the fail_map
let output_json = serde_json::from_slice::<Value>(&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(())
}

Expand Down

0 comments on commit 381d368

Please sign in to comment.