Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit cf3ab9a

Browse files
Lars Slouborg BengtssonLars Slouborg Bengtsson
authored andcommitted
BUGFIX on simple tests. BasicParsin on invoke-webrequest
Added the -UseBasicParsing parameter in order to be compatible with running tests with a user that haven't had IE configured. Invoke-webrequest can then not parse the DOM as IE is used for this.
1 parent 1334134 commit cf3ab9a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

TestArtifacts/VersionedModule/1.0.0/Diagnostics/Simple/PSGallery.Simple.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ param(
55

66
Describe 'Simple Validation of PSGallery' -Tag 'AAABBBCCC' {
77
It 'The PowerShell Gallery should be responsive' {
8-
$response = Invoke-WebRequest -Uri $WebsiteUrl
8+
$response = Invoke-WebRequest -Uri $WebsiteUrl -UseBasicParsing
99
$response.StatusCode | Should Be $StatusCode
1010
}
1111

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
Describe 'Simple Validation of PSGallery' -Tag 'AAABBBCCC' {
22
It 'The PowerShell Gallery should be responsive' {
3-
$response = Invoke-WebRequest -Uri 'https://www.powershellgallery.com'
3+
$response = Invoke-WebRequest -Uri 'https://www.powershellgallery.com' -UseBasicParsing
44
$response.StatusCode | Should be 200
55
}
66
}
77

88
Describe 'Simple Validation of Microsoft' -Tag 'AAABBBCCC', 'XXXYYYZZZ' {
99
It 'Microsoft should be responsive' {
10-
$response = Invoke-WebRequest -Uri 'https://www.microsoft.com'
10+
$response = Invoke-WebRequest -Uri 'https://www.microsoft.com' -UseBasicParsing
1111
$response.StatusCode | Should be 200
1212
}
1313
}
1414

1515

1616
Describe 'Simple Validation of Github' -Tag 'JJJKKKLLL' {
1717
It 'GitHub should be responsive' {
18-
$response = Invoke-WebRequest -Uri 'https://www.github.com'
18+
$response = Invoke-WebRequest -Uri 'https://www.github.com' -UseBasicParsing
1919
$response.StatusCode | Should be 200
2020
}
2121
}

0 commit comments

Comments
 (0)