-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Mark Set-Service tests with password as Pending
#10146
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -163,13 +163,12 @@ Describe "Set/New/Remove-Service cmdlet tests" -Tags "Feature", "RequireAdminOnW | |
| $newServiceCommand.$parameter | Should -Be $value | ||
| } | ||
|
|
||
| It "Set-Service can change credentials of a service" { | ||
| It "Set-Service can change credentials of a service" -Pending { | ||
| try { | ||
| $startUsername = "user1" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adityapatwardhan, your last commit had 1 failures in retry of URL failed with error:
at <ScriptBlock>, /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 111
111: throw "retry of URL failed with error: $($_.Message)"
adityapatwardhan marked this conversation as resolved.
Show resolved
Hide resolved
adityapatwardhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $endUsername = "user2" | ||
| $servicename = "testsetcredential" | ||
| $Password = ([char[]]([char]33..[char]95) + ([char[]]([char]97..[char]126)) + 0..9 | Sort-Object {Get-Random})[0..12] -join '' | ||
| $testPass = (New-Object -TypeName Net.NetworkCredential("", $Password)).SecurePassword | ||
| $testPass = [Net.NetworkCredential]::new("", (New-ComplexPassword)).SecurePassword | ||
| $creds = [pscredential]::new(".\$endUsername", $testPass) | ||
| net user $startUsername $creds.GetNetworkCredential().Password /add > $null | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not redirect this to $null so we can see the output and confirm if this is still a password complexity issue |
||
| net user $endUsername $creds.GetNetworkCredential().Password /add > $null | ||
|
|
@@ -283,7 +282,7 @@ Describe "Set/New/Remove-Service cmdlet tests" -Tags "Feature", "RequireAdminOnW | |
| { Remove-Service -Name "testremoveservice" -ErrorAction 'Stop' } | Should -Throw -ErrorId "InvalidOperationException,Microsoft.PowerShell.Commands.RemoveServiceCommand" | ||
| } | ||
|
|
||
| It "Get-Service can get the '<property>' of a service" -TestCases @( | ||
| It "Get-Service can get the '<property>' of a service" -Pending -TestCases @( | ||
| @{property = "Description"; value = "This is a test description"} | ||
| @{property = "BinaryPathName"; value = "$PSHOME\powershell.exe";}, | ||
| @{property = "UserName"; value = $creds.UserName; parameters = @{ Credential = $creds }}, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.