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

Commit d2b2191

Browse files
committed
Add support for script parameters
1 parent b09c74a commit d2b2191

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1+
param(
2+
[string]$WebsiteUrl = 'https://www.powershellgallery.com',
3+
[string]$StatusCode = 'OK'
4+
)
5+
6+
17
Describe 'Simple Validation of PSGallery' {
28
It 'The PowerShell Gallery should be responsive' {
3-
$request = [System.Net.WebRequest]::Create('https://www.powershellgallery.com')
9+
$request = [System.Net.WebRequest]::Create($WebsiteUrl)
410
$response = $Request.GetResponse()
5-
$response.StatusCode | Should be OK
11+
$response.StatusCode | Should Be $StatusCode
612
}
7-
}
13+
14+
it 'Has correct test parameters' {
15+
$WebsiteUrl | Should Be 'https://www.powershellgallery.com'
16+
$StatusCode | Should Be 'OK'
17+
}
18+
}

0 commit comments

Comments
 (0)