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

Commit

Permalink
Merge pull request #12 from devblackops/script-parameters
Browse files Browse the repository at this point in the history
Add ability to override Pester script parameters and specify version of module to execute
  • Loading branch information
JamesWTruher authored Apr 27, 2017
2 parents 1894177 + 73eda4b commit 14a5939
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 59 deletions.
11 changes: 11 additions & 0 deletions Modules/OperationValidation/OperationValidation.Format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@
</CustomItem>
</Frame>

<Text>Version: </Text>
<Frame>
<LeftIndent>4</LeftIndent>
<CustomItem>
<ExpressionBinding>
<PropertyName>Version</PropertyName>
</ExpressionBinding>
<NewLine/>
</CustomItem>
</Frame>

<Text>Type: </Text>
<Frame>
<LeftIndent>4</LeftIndent>
Expand Down
Binary file modified Modules/OperationValidation/OperationValidation.psd1
Binary file not shown.
300 changes: 241 additions & 59 deletions Modules/OperationValidation/OperationValidation.psm1

Large diffs are not rendered by default.

Binary file modified Modules/OperationValidation/Test/OperationValidation.Tests.ps1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
param(
[string]$WebsiteUrl = 'https://www.powershellgallery.com',
[string]$StatusCode = 'OK'
)


Describe 'Simple Validation of PSGallery' {
It 'The PowerShell Gallery should be responsive' {
$request = [System.Net.WebRequest]::Create($WebsiteUrl)
$response = $Request.GetResponse()
$response.StatusCode | Should Be $StatusCode
}

it 'Has correct test parameters' {
$WebsiteUrl | Should Be 'https://www.powershellgallery.com'
$StatusCode | Should Be 'OK'
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Describe 'Simple Validation of PSGallery' {
It 'The PowerShell Gallery should be responsive' {
$request = [System.Net.WebRequest]::Create('https://www.powershellgallery.com')
$response = $Request.GetResponse()
$response.StatusCode | Should be OK
}
}

Describe 'Simple Validation of Microsoft' {
It 'Microsoft should be responsive' {
$request = [System.Net.WebRequest]::Create('https://www.microsoft.com')
$response = $Request.GetResponse()
$response.StatusCode | Should be OK
}
}
Binary file not shown.

0 comments on commit 14a5939

Please sign in to comment.