fix: config file parse errors not reported as missing DATABASE_URL
This commit is contained in:
@@ -377,3 +377,15 @@ fn secure_cookies_and_image_conversion_accept_true_only() {
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn malformed_config_file_reports_the_file_not_a_missing_database_url() {
|
||||
Jail::expect_with(|jail| {
|
||||
jail_with(jail, &[]);
|
||||
jail.create_file("config.toml", "[server\nport = = 1\n")?;
|
||||
let err = load().expect_err("config.toml is malformed");
|
||||
assert!(matches!(err, ConfigError::Unreadable(_)), "{err}");
|
||||
assert!(!err.to_string().contains("DATABASE_URL"), "{err}");
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user