Test Updates

This commit is contained in:
Wes Carroll
2019-03-27 18:19:31 -04:00
parent bbcbb4a970
commit 9ff003bbe0
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ $password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
# $credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml
$zertoServer = "172.16.219.128"
$zertoServer = "192.168.1.100"
$zertoPort = "7669"
Describe "Connect-ZertoServer" {
+12 -1
View File
@@ -1,7 +1,7 @@
$moduleName = "ZertoApiWrapper"
$moduleFileName = "ZertoApiWrapper.psm1"
$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.', '.'
$modulePath = $filePath -replace "Public", ""
$userName = "zerto\build"
@@ -25,6 +25,17 @@ Describe "File Tests" {
it "$command is backed by a file with the same name" {
$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" {
$externalHelpFile | should exist
}