Skip to content
Merged
Show file tree
Hide file tree
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 @@ -3,14 +3,20 @@
Describe "Split-Path" -Tags "CI" {

It "Should return a string object when invoked" {
$result = Split-Path .
$result | Should -BeOfType String
try {
Push-Location TestDrive:
$result = Split-Path .
$result | Should -BeOfType String

$result = Split-Path . -Leaf
$result | Should -BeOfType String
$result = Split-Path . -Leaf
$result | Should -BeOfType String

$result = Split-Path . -Resolve
$result | Should -BeOfType String
$result = Split-Path . -Resolve
$result | Should -BeOfType String
}
finally {
Pop-Location
}
}

It "Should return the name of the drive when the qualifier switch is used" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
Import-Module HelpersCommon

Describe "Set-Date for admin" -Tag @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$skipTest = (Test-IsVstsLinux) -or ($env:__INCONTAINER -eq 1)
}
# Fails in VSTS Linux with Operation not permitted
It "Set-Date should be able to set the date in an elevated context" -Skip:(Test-IsVstsLinux) {
It "Set-Date should be able to set the date in an elevated context" -Skip:$skipTest {
{ Get-Date | Set-Date } | Should -Not -Throw
}

# Fails in VSTS Linux with Operation not permitted
It "Set-Date should be able to set the date with -Date parameter" -Skip:(Test-IsVstsLinux) {
It "Set-Date should be able to set the date with -Date parameter" -Skip:$skipTest {
$target = Get-Date
$expected = $target
Set-Date -Date $target | Should -Be $expected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,8 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
# dosLength 4,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 12
# dosLength 5,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 21
# dosLength 10,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 75
$pathologicalRatio | Should -BeGreaterThan 10
# in some cases we will be running in a Docker container with modest resources
$pathologicalRatio | Should -BeGreaterThan 5
}
It "Charset Parsing" {
$dosUri = Get-WebListenerUrl -Test 'Dos' -query @{
Expand Down Expand Up @@ -1956,7 +1957,8 @@ Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
# dosLength 2,750 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 13
# dosLength 2,850 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 22
# dosLength 3,000 on my 3.5 GHz 6-Core Intel Xeon E5 macpro produced a ratio of 31
$pathologicalRatio | Should -BeGreaterThan 10
# in some cases we will be running in a Docker container with modest resources
$pathologicalRatio | Should -BeGreaterThan 5
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Describe "Get-ExperimentalFeature Tests" -tags "Feature","RequireAdminOnWindows"

Describe "Default enablement of Experimental Features" -Tags CI {
BeforeAll {
$isPreview = $PSVersionTable.GitCommitId.Contains("preview")
$isPreview = $PSVersionTable.GitCommitId -match "preview|daily"

Function BeEnabled {
[CmdletBinding()]
Expand Down