Closed houkms closed 5 years ago
This PR provides supports for customization of property checking in test file. We provide the features of
property_check_includes
property_check_excludes
The customization rules in the basic.yaml or complete.yaml are
prop*
prop
Here is an example. And this results in checking only all the representations with prefix custom_rules.1 in test file.
custom_rules.1
--- !ruby/object:Provider::Azure::Example resource: azurerm_web_application_firewall_policy prerequisites: - !ruby/object:Provider::Azure::ExampleReference product: resourcegroup example: basic properties: name: "<%= get_resource_name('ApplicationGatewayWebApplicationFirewallPolicies', 'wafpolicy') -%>" resource_group_name: ${azurerm_resource_group.<%= resource_id_hint -%>.name} location: ${azurerm_resource_group.<%= resource_id_hint -%>.location} custom_rules: - name: Rule1 priority: 1 rule_type: MatchRule match_conditions: - match_variables: - variable_name: RemoteAddr operator: IPMatch negation_conditon: false match_values: [192.168.1.0/24, 10.0.0.0/24] action: Block - name: Rule2 priority: 2 rule_type: MatchRule match_conditions: - match_variables: - variable_name: RemoteAddr operator: IPMatch negation_conditon: false match_values: [192.168.1.0/24] - match_variables: - variable_name: RequestHeaders selector: UserAgent operator: Contains negation_conditon: false match_values: [Windows] action: Block property_check_excludes: - custom_rules.# - custom_rules.0.*
This PR solves the issue #25.
This PR provides supports for customization of property checking in test file. We provide the features of
property_check_includes
field to specify the properties users want to include from all the properties listed in property filed.property_check_excludes
field to specify the properties users want to exclude.property_check_includes
rather thanproperty_check_excludes
.The customization rules in the basic.yaml or complete.yaml are
prop*
to represent all the sub-properties inside theprop
.Here is an example. And this results in checking only all the representations with prefix
custom_rules.1
in test file.