Skip to content

Commit

Permalink
Mark Set-Service tests with password as Pending (PowerShell#10146)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapatwardhan committed Jul 12, 2019
1 parent df672de commit ea4895c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
$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
net user $endUsername $creds.GetNetworkCredential().Password /add > $null
Expand Down Expand Up @@ -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 }},
Expand Down

0 comments on commit ea4895c

Please sign in to comment.