Test Updates
This commit is contained in:
@@ -9,7 +9,7 @@ $password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force
|
|||||||
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
|
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
|
||||||
|
|
||||||
# $credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml
|
# $credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml
|
||||||
$zertoServer = "172.16.219.128"
|
$zertoServer = "192.168.1.100"
|
||||||
$zertoPort = "7669"
|
$zertoPort = "7669"
|
||||||
|
|
||||||
Describe "Connect-ZertoServer" {
|
Describe "Connect-ZertoServer" {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
$moduleName = "ZertoApiWrapper"
|
$moduleName = "ZertoApiWrapper"
|
||||||
$moduleFileName = "ZertoApiWrapper.psm1"
|
$moduleFileName = "ZertoApiWrapper.psm1"
|
||||||
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
|
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
|
||||||
$docsPath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests/Public', 'docs'
|
$docsPath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests[\\\/]Public', 'docs'
|
||||||
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
|
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
|
||||||
$modulePath = $filePath -replace "Public", ""
|
$modulePath = $filePath -replace "Public", ""
|
||||||
$userName = "zerto\build"
|
$userName = "zerto\build"
|
||||||
@@ -25,6 +25,17 @@ Describe "File Tests" {
|
|||||||
it "$command is backed by a file with the same name" {
|
it "$command is backed by a file with the same name" {
|
||||||
$path | should exist
|
$path | should exist
|
||||||
}
|
}
|
||||||
|
it "$command file has openbraces on the same line as the statement" {
|
||||||
|
$content = Get-Content -Path $path
|
||||||
|
$openingBracesExist = $content | Where-Object {$_.Trim() -eq '{'}
|
||||||
|
if ($openingBracesExist) {
|
||||||
|
Write-Warning "Found the following opening brances on their own line:"
|
||||||
|
foreach ($openingBrace in $openingBracesExist) {
|
||||||
|
Write-Warning "Opening Brace on it's own line - $openingBrace"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$openingBracesExist | should benullorempty
|
||||||
|
}
|
||||||
it "$command has an external help file" {
|
it "$command has an external help file" {
|
||||||
$externalHelpFile | should exist
|
$externalHelpFile | should exist
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user