-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix mismatch between user and builtinaccount #387
Fix mismatch between user and builtinaccount #387
Conversation
Codecov Report
@@ Coverage Diff @@
## main #387 +/- ##
===================================
Coverage 90% 90%
===================================
Files 17 17
Lines 1716 1726 +10
===================================
+ Hits 1554 1564 +10
Misses 162 162
|
@PlagueHO This should be good to go now, when you get a chance to check it out! |
Should the MOF schema be updated to match this as well? |
The inputs don't actually change. The code was comparing the wrong properties. |
Hi @nickgw - sorry was tied up on other things. I'll get onto this close to the end of the week. Just need to try and avoid breaking Windows Server 2016 (unfortunately we can't test on it at the moment unless we get something like TK going in Azure). |
Hey @PlagueHO just bumping this (and my related comments in the issue) when you get a chance! |
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @nickgw)
CHANGELOG.md
line 7 at r1 (raw file):
## [Unreleased] ### Fixed
Can you add a blank line above this line?
source/DSCResources/DSC_ScheduledTask/DSC_ScheduledTask.psm1
line 832 at r1 (raw file):
instead? #> $username = Set-DomainNameInAccountName -AccountName SYSTEM -DomainName 'NT AUTHORITY'
Nit: Just for consistency, can you put single quotes around SYSTEM
?
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1784 at r1 (raw file):
} # It 'Should Disregard ExecuteAsCredential and Set User to the BuiltInAccount' {
If a test isn't verifying the correct thing, we should remove it rather than commenting. However, in this case, I think the test should be adjusted to reflect the actual function.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1791 at r1 (raw file):
# } $testParameters.Add('LogonType', 'Password')
Can you also add some additional tests here to verify the changed functionallity?
@PlagueHO Do you mind taking another look at this? I've added another test. |
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.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @PlagueHO)
CHANGELOG.md
line 7 at r1 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Can you add a blank line above this line?
Done.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1784 at r1 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
If a test isn't verifying the correct thing, we should remove it rather than commenting. However, in this case, I think the test should be adjusted to reflect the actual function.
Done.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1791 at r1 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
Can you also add some additional tests here to verify the changed functionallity?
Done.
@PlagueHO do you mind taking another look at this? I'd love to close this off my list. |
Cool! Thanks @nickgw - I'll review tonight. |
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.
Just some minor tweaks and we can merge!
Reviewed 2 of 2 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nickgw)
CHANGELOG.md
line 7 at r1 (raw file):
Previously, nickgw (Nick G) wrote…
Done.
There is an extra f at the beginning of this line.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1774 at r4 (raw file):
Context 'When a scheduled task is created using a Built In Service Account' { #
I think this # can be removed.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1809 at r4 (raw file):
} } #
I think this has can be removed.
…/nickgw/ComputerManagementDsc into ngermany_fixuservsbuiltinaccount
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.
Reviewable status: 1 of 3 files reviewed, 3 unresolved discussions (waiting on @PlagueHO)
CHANGELOG.md
line 7 at r1 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
There is an extra f at the beginning of this line.
Done.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1774 at r4 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
I think this # can be removed.
Done.
tests/Unit/DSC_ScheduledTask.Tests.ps1
line 1809 at r4 (raw file):
Previously, PlagueHO (Daniel Scott-Raynsford) wrote…
I think this has can be removed.
Done.
Code quote:
When a scheduled task is created using a Built In Service Accoun
@PlagueHO I think I hit all your comments! |
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.
Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @nickgw)
Currently
ScheduledTask
conflates the paramBuiltInAccount
and*-ScheduledTask
cmdlet'suser
parameter. This fixes that.Pull Request (PR) description
Currently
ScheduledTask
conflates the paramBuiltInAccount
and*-ScheduledTask
cmdlet'suser
parameter. This fixes that.This Pull Request (PR) fixes the following issues
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
and comment-based help.
This change is