Skip to content

Merge SharePoint and PnP functional test plans and adjust logic to reflect SharePoint migration to REST API #2078

@tkol2022

Description

@tkol2022

Prerequisites

  • This issue has an informative and human-readable title.

💡 Summary

After #2062 SharePoint now pulls the fields directly from the REST API and the PnP and SharePoint modules are no longer a dependency in ScubaGear. Due to that there are several changes that must occur to adjust the logic in the Sharepoint ExportProvider, Rego and test plans.

Motivation and context

The PowerShell, Rego and test plans must be kept up to date based on major changes to ScubaGear's design. This ensures we have relevant code and a comprehensive set of tests to cover the correct test scenarios.

Implementation notes

  1. The logic in SharePointConfig.Rego needs to be adjusted for policy ruleset MS.SHAREPOINT.1.2v1. Remove references to OneDrive_PnP_Flag and get rid of the second ruleset for the "Shall/Not-Implemented" scenario. That ruleset no longer applies because now that SharePoint uses the REST API we always get the field OneDriveSharingCapability so we only need a single ruleset.
  2. Modify ExportSharepointProvider.psm1. Remove OneDrive_PnP_Flag from the JSON and remove references to the variable $UsedPnp. For the reasons stated in the previous bullet that variable is no longer necessary.
  3. Modify the Rego unit tests and Pester functional tests accordingly.
  4. There should only be a single functional test plan (instead of one for pnp and one for spo). Just call it sharepoint.testplan.yaml.

Acceptance criteria

  • Ensure the actions above are complete.
  • Developer testing is complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue or pull request will add new or improve existing functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions