Skip to content

Commit 7a1fbda

Browse files
Test NodeConfig::super_admin_dn
1 parent ee78b3f commit 7a1fbda

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

rust/operator-binary/src/controller/build/node_config.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ impl NodeConfig {
279279
.tls_internal_secret_class()
280280
.is_some()
281281
{
282-
// TLS config for TRANSPORT port which is always enabled.
283282
config.insert(
284283
CONFIG_OPTION_PLUGINS_SECURITY_SSL_TRANSPORT_ENABLED.to_owned(),
285284
json!(true),
@@ -720,6 +719,23 @@ mod tests {
720719
);
721720
}
722721

722+
#[test]
723+
pub fn test_super_admin_dn() {
724+
let node_config = node_config(TestConfig::default());
725+
726+
let super_admin_dn = node_config.super_admin_dn();
727+
let parts: Vec<&str> = super_admin_dn.split("=").collect();
728+
729+
assert_eq!(
730+
vec![
731+
"CN",
732+
"update-security-config.0b1e30e6-326e-4c1a-868d-ad6598b49e8b"
733+
],
734+
parts
735+
);
736+
assert!(parts[1].len() <= 64);
737+
}
738+
723739
#[test]
724740
pub fn test_environment_variables() {
725741
let node_config = node_config(TestConfig {

0 commit comments

Comments
 (0)