Skip to content

Two tests in 'Set-Date.Tests.ps1' consistently fails after #6145 was merged #6227

@daxian-dbw

Description

@daxian-dbw

Two tests in 'Set-Date.Tests.ps1' consistently fails after #6145 was merged

Here is the failure:

  Describing Set-Date for admin
    [-] Set-Date should be able to set the date in an elevated context 166ms
      Expected: the expression not to throw an exception. Message was {Operation not permitted}
          from /home/travis/build/PowerShell/PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1:5 char:22
          +         { Get-Date | Set-Date } | Should Not Throw
          +                      ~~~~~~~~
      5:         { Get-Date | Set-Date } | Should Not Throw
      at Invoke-LegacyAssertion, /home/travis/build/PowerShell/PowerShell/src/powershell-unix/bin/Linux/netcoreapp2.0/linux-x64/publish/Modules/Pester/4.1.1/Functions/Assertions/Should.ps1: line 190
      at <ScriptBlock>, /home/travis/build/PowerShell/PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1: line 5
    [-] Set-Date should be able to set the date with -Date parameter 111ms
      Win32Exception: Operation not permitted
      at <ScriptBlock>, /home/travis/build/PowerShell/PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1: line 11

Here is the failure history:
image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions