From f0e6c7c225408eda9aff7ea56979eff9b1d401d1 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Mon, 25 Feb 2019 14:39:54 -0500 Subject: [PATCH] Create Edit-ZertoVra.Tests.ps1 --- Tests/Public/Edit-ZertoVra.Tests.ps1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Tests/Public/Edit-ZertoVra.Tests.ps1 diff --git a/Tests/Public/Edit-ZertoVra.Tests.ps1 b/Tests/Public/Edit-ZertoVra.Tests.ps1 new file mode 100644 index 0000000..943079d --- /dev/null +++ b/Tests/Public/Edit-ZertoVra.Tests.ps1 @@ -0,0 +1,22 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$modulePath = $filePath -replace "Public", "" +Import-Module $modulePath\$moduleFileName -Force + +$userName = "zerto\build" +$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 = "192.168.1.100" +$zertoPort = "7669" + +Describe "Edit-ZertoVra" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called Edit-ZertoVra" { + get-command Edit-ZertoVra | should be $true + } +}