Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityapatwardhan, your last commit had 1 failures in PowerShell-CI-static-analysis
Verify Markdown Links.Verify links in /home/vsts/work/1/s/CHANGELOG.md.https://dependabot.com should work

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)"

$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
Copy link
Member

Choose a reason for hiding this comment

The 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
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