fix(resources): add overlay to ResourceTypeConfigSchema _VALID_STRATEGIES #3235
@@ -891,3 +891,8 @@ Feature: Consolidated Resource
|
||||
When I load the resource type via from_yaml
|
||||
Then the loaded schema should have parent type "custom-parent"
|
||||
|
||||
|
||||
Scenario: Schema accepts overlay sandbox strategy
|
||||
Given a resource type YAML with sandbox_strategy "overlay"
|
||||
When I load the resource type via from_yaml
|
||||
Then the loaded schema sandbox_strategy should be "overlay"
|
||||
|
||||
@@ -598,3 +598,19 @@ def step_try_load_none_file_path(context):
|
||||
@then('the loaded schema should have parent type "{parent}"')
|
||||
def step_loaded_schema_parent_type(context, parent):
|
||||
assert parent in context.rt_schema.parent_types
|
||||
|
||||
|
||||
@given('a resource type YAML with sandbox_strategy "{strategy}"')
|
||||
def step_yaml_with_sandbox_strategy(context, strategy):
|
||||
context.rt_yaml = f"""
|
||||
name: myorg/test
|
||||
resource_kind: physical
|
||||
sandbox_strategy: {strategy}
|
||||
"""
|
||||
|
||||
|
||||
@then('the loaded schema sandbox_strategy should be "{strategy}"')
|
||||
def step_loaded_schema_sandbox_strategy(context, strategy):
|
||||
assert context.rt_schema.sandbox_strategy == strategy, (
|
||||
f"Expected sandbox_strategy '{strategy}', got '{context.rt_schema.sandbox_strategy}'"
|
||||
)
|
||||
|
||||
@@ -53,6 +53,7 @@ _VALID_STRATEGIES = frozenset(
|
||||
"copy_on_write",
|
||||
"transaction_rollback",
|
||||
"snapshot",
|
||||
"overlay",
|
||||
"none",
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user