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

IntuneAppConfigurationPolicy: Fixed tests so that resource reports its correct state #4304

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

ricmestre
Copy link
Contributor

Pull Request (PR) description

This PR fixes the way the tests are done in Test-TargetResource so that the resource reports its correct state, I might have been mistaken on #3542 where I say that the resource could be removed but actually it didn't but it reported that the resource was in correct state. I replaced the algorithm check the CustomSettings with a generic one that is already used in other resources and is known to work.

Additionally during Set it had to find the policy again multiple times because Id was not part of the resource so I added it in order to avoid doing all those retrievals, it first checks for the Id and if it cannot find it then searches by DisplayName as it does today.

This Pull Request (PR) fixes the following issues

@NikCharlebois NikCharlebois merged commit e9c39c7 into microsoft:Dev Feb 14, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

IntuneAppConfigurationPolicy: Test of removal fails
2 participants