Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path navigation with XML nodes #1518

Open
BernieWhite opened this issue Apr 27, 2023 · 0 comments
Open

Path navigation with XML nodes #1518

BernieWhite opened this issue Apr 27, 2023 · 0 comments
Labels
bug Something isn't working feature: core Issues that affect the core engine
Milestone

Comments

@BernieWhite
Copy link
Member

Description of the issue

There appears to be some inconsistencies handling some XML nodes/ elements in PowerShell assertions (YAML/ JSON) also need to be tested.

To Reproduce

Steps to reproduce the issue:

<policies><inbound><ip-filter action="allow"><address-range from="51.175.196.187" to="51.175.196.187" /></ip-filter></inbound><backend><base /></backend><outbound><base /></outbound><on-error><base /></on-error></policies>

The following code passes, but should not because the base element is not a child of inbound.

$Assert.HasField($policy, 'inbound.base')

Expected behaviour

PSRule

Module in use and version:

  • Module: PSRule
  • Version: 2.8.1

Additional context

@BernieWhite BernieWhite added bug Something isn't working feature: core Issues that affect the core engine labels Apr 27, 2023
@BernieWhite BernieWhite added this to the v3.0.0 milestone May 30, 2023
@BernieWhite BernieWhite modified the milestones: v3.0.0, v3.1.0 May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature: core Issues that affect the core engine
Projects
None yet
Development

No branches or pull requests

1 participant