-
Notifications
You must be signed in to change notification settings - Fork 247
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
Modify Sharepoint policies to only execute when applicable #1076
Conversation
Unit test review 1.3The unit tests for policy 1.3 are missing the following two _Incorrect test scenarios - both of these should produce a false.
|
Improving the functional & unit tests for N/A casesWhen testing N/A scenarios, I recommend setting the policy field to both compliant and non compliant values so that we can ensure the N/A works as expected. Let's take policy 3.1 as an example. Write N/A test scenarios that exercise the following conditions. Since Only people in your organization is configured, both scenarios produce N/A.
|
…in rewriting unit tests
…t set to Anyone; add standard baseline check
…sets, and adjust unit tests
…reused for policies 3.2 / 3.3
…cationCode() fnc to VerificationCodeReAuthExpiration fnc; handle not applicable case
ed59a23
to
b675a95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was able to resolve my errors after meeting with @nanda-katikaneni yesterday. went through each of the scenarios documented in the PR with no issues. @nanda-katikaneni also mentioned he already forwarded long issues associated with the functional tests so no further comments from me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran SharePoint tests - verified the changed behavior of executing policies only when applicable. There is a separate but related functional testing issue #1093 - (that issue is for both main branch and this branch and seems not related to this change).
Approving this PR.
🗣 Description
Several of the Sharepoint policies execute even in cases when they are not applicable. The policies for Sharepoint 1.3, 3,1, 3.2, and 3.3 have been updated to produce N/A messages when warranted. If the configuration settings apply, then the policy executes normally.
Policy 1.3
Policy 1.4
Policy 3.1
Policy 3.2
input.OneDrive_PnP_Flag
== false is checked in the configuration code which can't be pulled from Set-SPOTenant cmdlet.Policy 3.3
💭 Motivation and context
Epic: #1064
closes #1062
closes #952
closes #951
closes #950
closes #892
Output in the reports was not accurately depicting tenant configuration settings.
🧪 Testing
Check that unit tests pass:
Check that functional tests pass for each policy ID:
✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branch
button below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
✅ Post-merge checklist