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

Commit 14a5939

Browse files
authored
Merge pull request #12 from devblackops/script-parameters
Add ability to override Pester script parameters and specify version of module to execute
2 parents 1894177 + 73eda4b commit 14a5939

File tree

8 files changed

+285
-59
lines changed

8 files changed

+285
-59
lines changed

Modules/OperationValidation/OperationValidation.Format.ps1xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@
4646
</CustomItem>
4747
</Frame>
4848

49+
<Text>Version: </Text>
50+
<Frame>
51+
<LeftIndent>4</LeftIndent>
52+
<CustomItem>
53+
<ExpressionBinding>
54+
<PropertyName>Version</PropertyName>
55+
</ExpressionBinding>
56+
<NewLine/>
57+
</CustomItem>
58+
</Frame>
59+
4960
<Text>Type: </Text>
5061
<Frame>
5162
<LeftIndent>4</LeftIndent>
Binary file not shown.

Modules/OperationValidation/OperationValidation.psm1

Lines changed: 241 additions & 59 deletions
Large diffs are not rendered by default.
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
param(
2+
[string]$WebsiteUrl = 'https://www.powershellgallery.com',
3+
[string]$StatusCode = 'OK'
4+
)
5+
6+
7+
Describe 'Simple Validation of PSGallery' {
8+
It 'The PowerShell Gallery should be responsive' {
9+
$request = [System.Net.WebRequest]::Create($WebsiteUrl)
10+
$response = $Request.GetResponse()
11+
$response.StatusCode | Should Be $StatusCode
12+
}
13+
14+
it 'Has correct test parameters' {
15+
$WebsiteUrl | Should Be 'https://www.powershellgallery.com'
16+
$StatusCode | Should Be 'OK'
17+
}
18+
}
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Describe 'Simple Validation of PSGallery' {
2+
It 'The PowerShell Gallery should be responsive' {
3+
$request = [System.Net.WebRequest]::Create('https://www.powershellgallery.com')
4+
$response = $Request.GetResponse()
5+
$response.StatusCode | Should be OK
6+
}
7+
}
8+
9+
Describe 'Simple Validation of Microsoft' {
10+
It 'Microsoft should be responsive' {
11+
$request = [System.Net.WebRequest]::Create('https://www.microsoft.com')
12+
$response = $Request.GetResponse()
13+
$response.StatusCode | Should be OK
14+
}
15+
}
Binary file not shown.

0 commit comments

Comments
 (0)