@@ -83,20 +83,33 @@ mod tests {
8383 }
8484
8585 #[ test]
86- fn postgres_pool_key_ignores_mysql_ssl_key_fields ( ) {
87- let required = connection_params ( "postgres" , Some ( "required " ) ) ;
88- let disabled = connection_params ( "postgres" , Some ( "disabled " ) ) ;
86+ fn postgres_pool_key_changes_when_ssl_mode_changes ( ) {
87+ let required = connection_params ( "postgres" , Some ( "require " ) ) ;
88+ let disabled = connection_params ( "postgres" , Some ( "disable " ) ) ;
8989
90- assert_eq ! (
90+ assert_ne ! (
9191 build_connection_key( & required, Some ( "conn-1" ) ) ,
9292 build_connection_key( & disabled, Some ( "conn-1" ) )
9393 ) ;
9494 }
9595
9696 #[ test]
97- fn sqlite_pool_key_ignores_mysql_ssl_key_fields ( ) {
97+ fn postgres_pool_key_changes_when_ssl_ca_changes ( ) {
98+ let without_ca = connection_params ( "postgres" , Some ( "verify-ca" ) ) ;
99+ let mut with_ca = connection_params ( "postgres" , Some ( "verify-ca" ) ) ;
100+ with_ca. ssl_ca = Some ( "/tmp/postgres-ca.pem" . to_string ( ) ) ;
101+
102+ assert_ne ! (
103+ build_connection_key( & without_ca, Some ( "conn-1" ) ) ,
104+ build_connection_key( & with_ca, Some ( "conn-1" ) )
105+ ) ;
106+ }
107+
108+ #[ test]
109+ fn sqlite_pool_key_ignores_tls_key_fields ( ) {
98110 let required = connection_params ( "sqlite" , Some ( "required" ) ) ;
99- let disabled = connection_params ( "sqlite" , Some ( "disabled" ) ) ;
111+ let mut disabled = connection_params ( "sqlite" , Some ( "disabled" ) ) ;
112+ disabled. ssl_ca = Some ( "/tmp/sqlite-ca.pem" . to_string ( ) ) ;
100113
101114 assert_eq ! (
102115 build_connection_key( & required, Some ( "conn-1" ) ) ,
0 commit comments