v0.3.2-pre.005-fix.001

This commit is contained in:
2026-08-29 19:35:35 +02:00
parent d93184d41d
commit c1dbaad88d
3 changed files with 59 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-postgres-lib/unit_tests/runtime.rs
// version: 1
// version: 2
fn network() -> ksp_store_api::RawNetworkId {
return match ksp_store_api::RawNetworkId::new("devnet") {
@@ -58,7 +58,7 @@ fn typed_disabled_policy_overrides_uri_tls_and_connection_controls() {
assert_eq!(config.get_ssl_mode(), tokio_postgres::config::SslMode::Disable);
assert_eq!(config.get_ssl_negotiation(), tokio_postgres::config::SslNegotiation::Postgres);
assert_eq!(config.get_application_name(), std::option::Option::Some(super::APPLICATION_NAME));
assert_eq!(config.get_connect_timeout(), std::option::Option::Some(std::time::Duration::from_secs(10)));
assert_eq!(config.get_connect_timeout(), std::option::Option::Some(&std::time::Duration::from_secs(10)));
return;
}
@@ -75,7 +75,7 @@ fn typed_verify_full_policy_forces_tls_and_rejects_hostaddr_only_identity() {
assert_eq!(config.get_ssl_mode(), tokio_postgres::config::SslMode::Require);
assert_eq!(config.get_ssl_negotiation(), tokio_postgres::config::SslNegotiation::Postgres);
assert_eq!(config.get_application_name(), std::option::Option::Some(super::APPLICATION_NAME));
assert_eq!(config.get_connect_timeout(), std::option::Option::Some(std::time::Duration::from_secs(10)));
assert_eq!(config.get_connect_timeout(), std::option::Option::Some(&std::time::Duration::from_secs(10)));
let hostaddr_only = settings("hostaddr=127.0.0.1 user=operator dbname=ksp", crate::PostgresBackendTlsMode::VerifyFull);
let rejected = super::normalized_config(&hostaddr_only);
assert_eq!(rejected.err().map(|value| return value.kind()), std::option::Option::Some(crate::PostgresBackendErrorKind::ConfigInvalid));