-
Notifications
You must be signed in to change notification settings - Fork 108
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
SPShellAdmins: Member comparison was case sensitive. #1440
SPShellAdmins: Member comparison was case sensitive. #1440
Conversation
@ykuijs the Build Pipeline has an issue with the GitVersion Task: Calculate ModuleVersion (GitVersion). |
@ChristophHannappel, will have a look! Have had that issue before.....is an issue in the new version of gitversion. Solution was to specifically specify an older version |
@ChristophHannappel Could you please implement the following change: SharePointDsc/azure-pipelines.yml Line 29 in 13408f4
The line should say |
An HQRM check is failing. Will check the cause tomorrow. |
Thank you :) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1440 +/- ##
======================================
Coverage 84% 84%
======================================
Files 145 145
Lines 22809 22809
======================================
+ Hits 19236 19246 +10
+ Misses 3573 3563 -10
|
It was a change in module DscResource.Test to make that test run on just the source files. Prior to the change the HQRM test was run on both built module and source files but apparently due to a bug that test was never run on source files before. 🤔 If you want to keep Lines 93 to 94 in 13408f4
Alternative I recommend changing Write-Information -MessageData 'MyMessage' -InformationAction 'Continue' |
I've added the file to the List, but that did not help. @ykuijs would it be ok if I replaced the |
Hmm strange I thought that would do it. @ChristophHannappel Can you test exclude the name It should filter out the excluded files here: Using the filter: https://github.com/dsccommunity/DscResource.Test/blob/14acda0bc0a6a9698bfb8fd41da42adfe08b09f0/source/Private/WhereSourceFileNotExcluded.ps1#L1 If above doesn't work then there must be a bug in DscResource.Test, need to debug to find it. I submit a bug in that repo. Maybe @dan-hughes have some input? But do suggest replace |
Not true, that change hasn't been released yet. My bad. There must be something else going on in 0.16.3 release. @ChristophHannappel can we test to see if the latest preview will help with this, there are a lot of improvements there. Change: SharePointDsc/RequiredModules.psd1 Line 20 in 13408f4
too: 'DscResource.Test' = @{
Version = 'latest'
Parameters = @{
AllowPrerelease = $true
}
} That will use the preview release 0.17.0-preview0003. |
@ChristophHannappel, not sure what the impact will be if we remove Write-Host. I know we have been using Write-Host to specifically write to the screen instead of in the pipeline so we can use formatting, etc. I see that the tests keep failing. In the last change you didn't specify the file extension. Can you please add that? |
The command |
@ChristophHannappel thanks for testing the changes, it seems it didn't do anything. I won't have time to debubg DscResource.Test, but could try to do it this weekend - it could probably be a problem in the future for others as well. @ykuijs I really suggest to move away from Write-Host for this particular problem, then the code will still be tested correctly and not excluded from all HQRM tests. |
I added this issue dsccommunity/DscResource.Test#142 to track that it is seemingly not possible to exclude a source file from HQRM testing. |
dsccommunity/DscResource.Test#143 waiting to be merged that fixes the HQRM issue you are having. The path in |
Therefore the entry you would require is: All the other entries including the output can be removed as these will not do anything. |
@ChristophHannappel Once the other PR is merged: Can you update the build.yaml with the string suggested by @dan-hughes, so that the correct path will be excluded? |
Sure thing. @dan-hughes: will that also be a preview release? |
Yes. Unless one of the maintainers decides to trigger a full release. |
We can test this PR with the preview and if it works I can release a full release of DscResource.Test. But I wont have time to review @dan-hughes PR until this weekend. To much to do at the day job 😊 |
The
The Preview worked 🥳 Thank you very much. @ykuijs I found another Bug in the SPSite Ressource which i will fix next. So if you can wait with the next Release both fixes could be shipped :) |
@ChristophHannappel Great news! @johlju and @dan-hughes thanks a lot for your help in fixing this issue! |
I'd like to take credit, but the PR was pulled as it wasn't the correct fix. Nice to know what the workaround is though! |
Seems like I have to fix some tests. |
You can just specify the path to the test file in the Script key in It will not help with code coverage but it helps with test runtime. |
If the code coverage is extensive it can be turned of by also passing It should also possible to use |
I believe it is also possible to run the |
@ChristophHannappel Now that all tests have completed successfully, can this PR be merged? |
@ykuijs Yes please. At Everyone: Thank you for helping so quickly with my pipeline issues |
Pull Request (PR) description
The Member comparison of SPShellAdmins was case sensitive. But Active Directory User and Groups are not.
This PR replaced the .Net
.contains
Method with the PowerShell Operator-contains
and extended the unit tests.This Pull Request (PR) fixes the following issues
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