mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-01 22:42:38 +00:00
section-config: use builder pattern for ObjectSchema
To prepare for a breaking change in proxmox-schema. Since new fields in the schema constitute a breaking change, using the builder methods will let this compile later as well. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
c99a31c66f
commit
3c34ef5573
@ -1034,19 +1034,11 @@ fn test_section_config_with_additional_properties() {
|
||||
),
|
||||
];
|
||||
|
||||
const USER_PROPERTIES: ObjectSchema = ObjectSchema {
|
||||
description: "user properties",
|
||||
properties: &PROPERTIES,
|
||||
additional_properties: false,
|
||||
default_key: None,
|
||||
};
|
||||
const USER_PROPERTIES: ObjectSchema = ObjectSchema::new("user properties", &PROPERTIES);
|
||||
|
||||
const USER_PROPERTIES_WITH_ADDITIONAL: ObjectSchema = ObjectSchema {
|
||||
description: "user properties with additional",
|
||||
properties: &PROPERTIES,
|
||||
additional_properties: true,
|
||||
default_key: None,
|
||||
};
|
||||
const USER_PROPERTIES_WITH_ADDITIONAL: ObjectSchema =
|
||||
ObjectSchema::new("user properties with additional", &PROPERTIES)
|
||||
.additional_properties(true);
|
||||
|
||||
let plugin = SectionConfigPlugin::new(
|
||||
"user".to_string(),
|
||||
@ -1104,12 +1096,7 @@ fn test_section_config_with_unknown_section_types() {
|
||||
),
|
||||
];
|
||||
|
||||
const USER_PROPERTIES: ObjectSchema = ObjectSchema {
|
||||
description: "user properties",
|
||||
properties: &PROPERTIES,
|
||||
additional_properties: false,
|
||||
default_key: None,
|
||||
};
|
||||
const USER_PROPERTIES: ObjectSchema = ObjectSchema::new("user properties", &PROPERTIES);
|
||||
|
||||
let plugin = SectionConfigPlugin::new(
|
||||
"user".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user