Skip to content

'Get-Service can get the 'UserName' of a service' test fails with user not being created #10147

Description

Steps to reproduce

Run CI tests
See #10146

Also Set-Service can change credentials of a service test.

Expected behavior

All tests pass

Actual behavior

Describing Set/New/Remove-Service cmdlet tests
The user name could not be found.

More help is available by typing NET HELPMSG 2221.

New-Service : Service ' (testgetservice)' cannot be created due to the following error: The account name is invalid or does not exist, or the password is invalid for the account name specified.
At D:\a\1\s\test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests.ps1:302 char:24
+             $service = New-Service @startparameters
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : PermissionDenied: (testgetservice:String) [New-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand
 
+++++++++++++++++++++++++++++++++++++
    [-] Get-Service can get the 'UserName' of a service 180ms
      Expected a value, but got $null or empty.
      303:             $service | Should -Not -BeNullOrEmpty
      at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\Microsoft.PowerShell.Management\Set-Service.Tests.ps1: line 303
+++++++

    Context Set-Service test cases on the services with dependent relationship
The user name could not be found.

More help is available by typing NET HELPMSG 2221.

+++

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.18939
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Quality-Testissues in a test or in test infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions