Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/bootstrap/jobs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod tests {
use camino::Utf8PathBuf;
use torrust_tracker_configuration::TslConfig;

use super::make_rust_tls;
use super::{make_rust_tls, Error};

#[tokio::test]
async fn it_should_error_on_bad_tls_config() {
Expand All @@ -65,9 +65,7 @@ mod tests {
.expect("tls_was_enabled")
.expect_err("bad_cert_and_key_files");

assert!(err
.to_string()
.contains("bad tls config: No such file or directory (os error 2)"));
assert!(matches!(err, Error::BadTlsConfig { source: _ }));
}

#[tokio::test]
Expand All @@ -83,7 +81,7 @@ mod tests {
.expect("tls_was_enabled")
.expect_err("missing_config");

assert_eq!(err.to_string(), "tls config missing");
assert!(matches!(err, Error::MissingTlsConfig { location: _ }));
}
}

Expand Down