Skip to content

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

Closed

Description

#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.

Activity

  1. added
    WG-Quality-Testissues in a test or in test infrastructure
    Issue-BugIssue has been identified as a bug in the product
    on Sep 10, 2017
  2. iSazonov commented on Sep 10, 2017

    @iSazonov
    Collaborator

    Mark Kraus (@markekraus) Thanks for your report - we skipped [Feature] in last commits 😕

  3. markekraus commented on Sep 10, 2017

    @markekraus
    ContributorAuthor

    Ilya (@iSazonov) There are some other PRs "in the pipe" that look like they affect feature tests but don't have any CI runs with [feature]

    Also, feature test fails on Linux and macOS continue to show "passed" re: #4641 (example). ☹️

  4. iSazonov commented on Sep 10, 2017

    @iSazonov
    Collaborator

    I see that "feature test fails on Linux and macOS continue to show "passed" "
    /cc Steve Lee (@SteveL-MSFT) Travis Plunk (@TravisEz13)

  5. TravisEz13 commented on Sep 11, 2017

    @TravisEz13
    Member

    The code has been changed so that only non-PRs will fail due to Pester test failures. I didn't notice that logic error last time.

  6. markekraus commented on Sep 11, 2017

    @markekraus
    ContributorAuthor

    Travis Plunk (@TravisEz13) Now that #4807 is merged... I predict the nightly will fail for Linux and macOS due to This little nugget. example

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

Metadata

Metadata

Labels

Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-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