diff --git a/Tests/Public/Checkpoint-ZertoVpg.Tests.ps1 b/Tests/Public/Checkpoint-ZertoVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Checkpoint-ZertoVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Connect-ZertoServer.Tests.ps1 b/Tests/Public/Connect-ZertoServer.Tests.ps1 index 30d5784..c55a46f 100644 --- a/Tests/Public/Connect-ZertoServer.Tests.ps1 +++ b/Tests/Public/Connect-ZertoServer.Tests.ps1 @@ -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 = "192.168.1.100" +$zertoServer = "172.16.219.128" $zertoPort = "7669" Describe "Connect-ZertoServer" { diff --git a/Tests/Public/Disconnect-ZertoServer.Tests.ps1 b/Tests/Public/Disconnect-ZertoServer.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Disconnect-ZertoServer.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoAlert.Tests.ps1 b/Tests/Public/Get-ZertoAlert.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoAlert.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoDatastore.Tests.ps1 b/Tests/Public/Get-ZertoDatastore.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoDatastore.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoEvent.Tests.ps1 b/Tests/Public/Get-ZertoEvent.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoEvent.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoLicense.Tests.ps1 b/Tests/Public/Get-ZertoLicense.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoLicense.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoLocalSite.Tests.ps1 b/Tests/Public/Get-ZertoLocalSite.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoLocalSite.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoPeerSite.Tests.ps1 b/Tests/Public/Get-ZertoPeerSite.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoPeerSite.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoProtectedVm.Tests.ps1 b/Tests/Public/Get-ZertoProtectedVm.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoProtectedVm.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoRecoveryReport.Tests.ps1 b/Tests/Public/Get-ZertoRecoveryReport.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoRecoveryReport.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoResourcesReport.Tests.ps1 b/Tests/Public/Get-ZertoResourcesReport.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoResourcesReport.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoServiceProfile.Tests.ps1 b/Tests/Public/Get-ZertoServiceProfile.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoServiceProfile.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoTask.Tests.ps1 b/Tests/Public/Get-ZertoTask.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoTask.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoUnprotectedVm.Test.ps1 b/Tests/Public/Get-ZertoUnprotectedVm.Test.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoUnprotectedVm.Test.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoVirtualizationSite.Tests.ps1 b/Tests/Public/Get-ZertoVirtualizationSite.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoVirtualizationSite.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoVolume.Tests.ps1 b/Tests/Public/Get-ZertoVolume.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoVolume.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoVpg.Tests.ps1 b/Tests/Public/Get-ZertoVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoVpgSetting.Tests.ps1 b/Tests/Public/Get-ZertoVpgSetting.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoVpgSetting.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoVra.Tests.ps1 b/Tests/Public/Get-ZertoVra.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoVra.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoZorg.Tests.ps1 b/Tests/Public/Get-ZertoZorg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoZorg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Get-ZertoZsspSession.Tests.ps1 b/Tests/Public/Get-ZertoZsspSession.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Get-ZertoZsspSession.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Install-ZertoVra.Tests.ps1 b/Tests/Public/Install-ZertoVra.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Install-ZertoVra.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoFailover.Tests.ps1 b/Tests/Public/Invoke-ZertoFailover.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoFailover.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 b/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoFailoverCommit.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoFailoverRollback.Tests.ps1 b/Tests/Public/Invoke-ZertoFailoverRollback.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoFailoverRollback.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoForceSync.Tests.ps1 b/Tests/Public/Invoke-ZertoForceSync.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoForceSync.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoMove.Tests.ps1 b/Tests/Public/Invoke-ZertoMove.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoMove.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoMoveCommit.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 b/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Invoke-ZertoMoveRollback.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Remove-ZertoVpg.Tests.ps1 b/Tests/Public/Remove-ZertoVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Remove-ZertoVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Resume-ZertoVpg.Tests.ps1 b/Tests/Public/Resume-ZertoVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Resume-ZertoVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Start-ZertoCloneVpg.Tests.ps1 b/Tests/Public/Start-ZertoCloneVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Start-ZertoCloneVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Start-ZertoFailoverTest.Tests.ps1 b/Tests/Public/Start-ZertoFailoverTest.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Start-ZertoFailoverTest.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Stop-ZertoCloneVpg.Tests.ps1 b/Tests/Public/Stop-ZertoCloneVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Stop-ZertoCloneVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Stop-ZertoFailoverTest.Tests.ps1 b/Tests/Public/Stop-ZertoFailoverTest.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Stop-ZertoFailoverTest.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Suspend-ZertoVpg.Tests.ps1 b/Tests/Public/Suspend-ZertoVpg.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Suspend-ZertoVpg.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file diff --git a/Tests/Public/Uninstall-ZertoVra.Tests.ps1 b/Tests/Public/Uninstall-ZertoVra.Tests.ps1 new file mode 100644 index 0000000..2d8dbc5 --- /dev/null +++ b/Tests/Public/Uninstall-ZertoVra.Tests.ps1 @@ -0,0 +1,23 @@ +$moduleFileName = "ZertoApiWrapper.psm1" +$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' +$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' +$commandName = $fileName -replace '.ps1', '' +$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 "$commandName" { + it "file should exist" { + "$filePath\$fileName" | should exist + } + it "module should have a function called $commandName" { + get-command $commandName | should be $true + } +} \ No newline at end of file