Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Set-Service.Tests.ps1 tests Failing builds #4800

Copy link
Copy link
@markekraus

Description

@markekraus
Issue body actions

#4785 Introduced tests which are failing builds.

On Windows:

Description: New-Service with bad parameters will fail for 'badstarttype' where 'StartupType' = 'System'
Name:        Set/New-Service cmdlet tests..New-Service with bad parameters will fail for 'badstarttype' where 'StartupType' = 'System'
message:
Expected string length 66 but was 13. Strings differ at index 0.
Expected: {CouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand}
But was:  {No Exception!}
-----------^
stack-trace:
at line: 65 in C:\projects\powershell\test\tools\Modules\HelpersCommon\HelpersCommon.psm1
65:             $_.FullyQualifiedErrorId | Should Be $FullyQualifiedErrorId | Out-Null

On Linux and macOS:

[-] Error occurred in Describe block 79ms

   The term 'Get-Service' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

   At /home/travis/build/PowerShell/PowerShell/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Service.Tests.ps1:25 char:48

System is a valid System.ServiceProcess.ServiceStartMode so either the test is flawed or there is an issue with New-Service.

The Linux/macOS failures are due to Get-Service being called in the TestCases HashTable literal. That literal gets parsed regardless of the OS skip resulting in calls to Get-Service on OSE's where it is not present.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Quality-Testissues in a test or in test infrastructureissues in a test or in test infrastructure

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.