fix(keystone): fail closed on EC2 auth and apply configured timeout (#4464)

This commit is contained in:
Zhengchao An
2026-07-08 18:31:48 +08:00
committed by GitHub
parent 7a33ba5e21
commit 9ffedc0e2b
9 changed files with 94 additions and 78 deletions
+16
View File
@@ -268,6 +268,22 @@ mod tests {
assert!(!config.enable_tenant_prefix);
assert!(!config.implicit_tenants);
assert_eq!(config.timeout_seconds, 99);
// The configured timeout must actually be forwarded to the
// client, not silently dropped in favour of a hardcoded value.
assert_eq!(config.get_timeout(), Duration::from_secs(99));
let client = crate::KeystoneClient::new(
config.auth_url.clone(),
KeystoneVersion::V3,
config.admin_user.clone(),
config.admin_password.clone(),
config.admin_project.clone(),
config.get_admin_domain(),
config.verify_ssl,
config.get_timeout(),
);
assert_eq!(client.timeout(), Duration::from_secs(99));
},
);
}