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

XD7AccessPolicy - Test fails when no previous policies exist #53

Closed
ktBonefish opened this issue Apr 9, 2022 · 1 comment
Closed

XD7AccessPolicy - Test fails when no previous policies exist #53

ktBonefish opened this issue Apr 9, 2022 · 1 comment

Comments

@ktBonefish
Copy link

if (Compare-Object -ReferenceObject $expected -DifferenceObject $actual) {

When no previous Access Policy exists on the server, the comparison performed on line 188 returns the below error. This causes the test phase of DSC to fail and error out.
Compare-Object : Cannot bind argument to parameter 'DifferenceObject' because it is null.

This is due to the $targetResource created on 177 having null fields in it when it's created on lines 72-83. On line 70 when Get-BrokerAccessPolicyRule returns no results due to none being on the server previously the $targetResource hash table has $null values for various properties and causes the resulting comparison above to fail.

This was referenced Nov 1, 2023
@iainbrighton
Copy link
Contributor

@ktBonefish The change has been published to the PSGallery, but I have no way to confirm whether it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants