-
Notifications
You must be signed in to change notification settings - Fork 107
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
[SPFarm] Ensure that flights are registered in SharePoint Subscription #1428
Conversation
The SPSE unit test failed. I think because the Get-SPDscRegistryKey function isn't mocked and therefore doesn't return any value. This is causing the Join-Path to fail. Please create proper mocks for Get-SPDscRegistryKey, Test-Path and Update-SPFlightsConfigFile. |
This last change broke the unit tests for the other versions as well 😉 Looks like something is not going well here. You can run the tests locally, by just running the tests ps1 file. I see that you have implemented an if statement in the code. It is also possible to create multiple mock using ParameterFilters. That way you can mock the same function multiple times, once for each scenario. |
Indeed, it is because I should Mock I already thought about it but I didn't know how to do it, but I also didn't know about |
You can check the used version number like we do here: SharePointDsc/tests/Unit/SharePointDsc/SharePointDsc.SPDistributedCacheService.Tests.ps1 Lines 427 to 428 in fdb9a4a
|
Codecov Report
@@ Coverage Diff @@
## master #1428 +/- ##
======================================
- Coverage 84% 84% -1%
======================================
Files 145 145
Lines 22647 22657 +10
======================================
+ Hits 19076 19084 +8
- Misses 3571 3573 +2
|
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.
LGTM
Pull Request (PR) description
SharePoint Subscription introduced flighting. When creating a farm using PowerShell, one new step is to run cmdlet Update-SPFlightsConfigFile to ensure that all flights in current build are registered in the configuration database.
This Pull Request (PR) fixes the following issues
In SharePoint Subscription, ensure that all flights available in current build are registered in the configuration database
Task list
Entry should say what was changed and how that affects users (if applicable), and
reference the issue being resolved (if applicable).
help.
This change is