429 Commits

Author SHA1 Message Date
justin 97e3c20792 Merge pull request #119 from reggroux/master
Fixing Remove-ZertoVpgVM
2024-01-23 19:56:11 -05:00
Mike M ad8b61e19f Update README.md
Added TODO for ZVMA
2023-03-15 13:48:31 -04:00
justin 14d36ab32b Merge pull request #122 from recklessop/master
Updates to support Install-ZertoVRA function
2022-02-25 21:52:08 -05:00
justin 7e61fbec7e 1.5.4 updates
Doc updates and help file updates to support numofcpu parameter in Install-ZertoVra function
2022-02-25 21:37:48 -05:00
justin 315cdf6db9 Merge remote-tracking branch 'upstream/master' 2022-02-25 19:46:00 -05:00
justin ccc4118d22 Merge pull request #121 from mitchellen/master
added VRA installation parameter for multiple vCPUs
2022-02-25 16:21:14 -05:00
justin 764738b015 Squashed commit of the following:
commit a2d724a54c
Merge: a22d9e3 f06157c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 16 13:14:46 2020 -0500

    Merge pull request #114 from ZertoPublic/wcarroll/where-fix

    Wcarroll/where fix

commit f06157c75e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 16 13:10:02 2020 -0500

    Bump Version for Release

commit d413374c09
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 16 09:43:22 2020 -0500

    CHANGLOG Updates

commit 1513cd4f4b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 16 09:42:48 2020 -0500

    Update Synopsis

commit 1daac508b2
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 16 09:42:23 2020 -0500

    Update SiteId Lookup Method

commit a22d9e3416
Merge: 912bca0 06e81b4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 9 21:57:36 2020 -0500

    Merge pull request #113 from ZertoPublic/wcarroll/issue112

    SiteId Query to VirtualizationSites Fixes #112

commit 06e81b46d6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 9 17:09:53 2020 -0500

    Update CHANGELOG for #112

commit af33715f02
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Dec 9 16:13:50 2020 -0500

    SiteId Query to VirtualizationSites Fixes #112

commit 912bca0f9c
Merge: 50e03b3 4ac9516
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Oct 19 19:10:37 2020 -0400

    Merge pull request #111 from ZertoPublic/export_bug_fix

    Export bug fix

commit 4ac951607b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Oct 19 18:43:13 2020 -0400

    Add required Mock

commit d3d01f892f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Oct 19 18:35:30 2020 -0400

    Bump Version

commit 84b7922156
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Oct 19 18:24:08 2020 -0400

    Update CHANGELOG

commit 0eaf89608b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Oct 19 18:22:10 2020 -0400

    Clean up VPG Settings Identifier

commit 50e03b36f5
Merge: a5a91fe 4531d2d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Sep 8 08:55:07 2020 -0400

    Merge pull request #110 from ZertoPublic/Release

    Release into Master

commit 4531d2d53b
Merge: 9dc9aa9 e6e6be9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Sep 8 08:22:32 2020 -0400

    Merge branch 'release_prep' into Release

commit e6e6be9ede
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Sep 8 08:21:10 2020 -0400

    Bump Version

commit 5c2dd620d8
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Sep 8 08:20:29 2020 -0400

    Update for Release Notes

commit a5a91febcf
Merge: ddee165 bb5dbaa
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Sep 4 10:28:45 2020 -0400

    Merge pull request #109 from jonsouzerto/master

    Fixed issue 108

commit bb5dbaa0d4
Author: jonsouzerto <57370019+jonsouzerto@users.noreply.github.com>
Date:   Thu Sep 3 12:50:49 2020 -0400

    Update CHANGELOG.md

    Added fix information

commit e6b5777e64
Author: jonsouzerto <57370019+jonsouzerto@users.noreply.github.com>
Date:   Thu Sep 3 12:45:35 2020 -0400

    Updated recovery host key

    Attempting to resolve issue 108

commit ddee165575
Merge: 682750f f027963
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Aug 28 13:48:34 2020 -0400

    Merge pull request #107 from gdbarron/invoke-move-updates

    Invoke-ZertoMove parameter, pipeline, and restructuring updates

commit f0279633dd
Author: Brownstein <gbrownstein@deloitte.com>
Date:   Fri Aug 28 13:43:22 2020 -0400

    add missing .IsPresent for switch value

commit 139e52f3e2
Author: Brownstein <gbrownstein@deloitte.com>
Date:   Thu Aug 27 15:28:01 2020 -0400

    add new parameter to test

commit eea6e95988
Author: Brownstein <gbrownstein@deloitte.com>
Date:   Thu Aug 27 15:08:28 2020 -0400

    update test and help files

commit 0630cbb20e
Author: Brownstein <gbrownstein@deloitte.com>
Date:   Fri Aug 21 21:04:15 2020 -0400

    new param sets, pipeline input

commit 682750fc6d
Merge: 23e0b8a 9dc9aa9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 20 13:44:03 2020 -0400

    Merge pull request #106 from ZertoPublic/Release

    Merge pull request #105 from ZertoPublic/master

commit 9dc9aa92d0
Merge: dbde9aa 23e0b8a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 20 13:31:28 2020 -0400

    Merge pull request #105 from ZertoPublic/master

    Release 1.5.0

commit 23e0b8a665
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 20 13:25:37 2020 -0400

    Prepping for next release

commit ae53dcd4d2
Merge: cb528df ced5671
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 20 12:39:21 2020 -0400

    Merge pull request #104 from ZertoPublic/wcarroll/issue103

    Update target host validation

commit ced5671ab2
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 20 12:29:40 2020 -0400

    Update target host validation

commit cb528df3d4
Merge: dbde9aa c91d53e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 09:41:09 2020 -0400

    Merge pull request #102 from ZertoPublic/Add-VMToVpg

    Add-ZertoVpgVm and Remove-ZertoVpgVm

commit c91d53ecad
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 09:34:35 2020 -0400

    Update with changes

commit 8d8cb58558
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 08:47:17 2020 -0400

    Remove-ZertoVpgVm Tests

commit 2dad347544
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 08:41:55 2020 -0400

    Remove-ZertoVpgVm Help

commit 6f798fd96a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 08:22:19 2020 -0400

    Update VM Filter Method

commit 649e7413a7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 07:46:11 2020 -0400

    Fix URL typo

commit af6e81267b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Aug 5 07:45:55 2020 -0400

    Add Online Help URI

commit b6d8083b69
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 22:05:35 2020 -0400

    Remove-ZertoVpgVm update

commit 9d4b4d3533
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 17:42:37 2020 -0400

    Starting Remove-VpgVm

commit 510f0b9ed7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 12:31:37 2020 -0400

    Add-ZertoVpgVm Tests

commit 9561936be7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:46:12 2020 -0400

    Update Help Files

commit 961eafb945
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:44:36 2020 -0400

    Update Event Documentation

commit aa73534d7f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:42:41 2020 -0400

    Create Add-ZertoVpgVm Help File

commit 56bbe59ea7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:23:37 2020 -0400

    Always return the Vpg Settings Identifier

commit 5f786775dc
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:23:20 2020 -0400

    Verbose Output - VM and VPG name

commit 14ef5048e4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 11:22:45 2020 -0400

    Only process unique VM names

commit d7e46bd263
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 10:48:58 2020 -0400

    Check for existence of Vpg

commit c64c82f8bc
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Aug 4 07:53:15 2020 -0400

    Add parameter alias

commit a59feb2d5f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Aug 3 21:21:05 2020 -0400

    Add switch for vpgName

commit d9e1063654
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Aug 3 21:13:38 2020 -0400

    update GitIgnore

commit d9e6c74f27
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jul 31 18:02:00 2020 -0400

    Add parameter aliases

commit df82bc26ca
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jul 31 17:42:28 2020 -0400

    Add function Add-ZertoVpgVm

commit dbde9aa4c2
Merge: 291aae9 7dcb653
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 8 13:14:52 2020 -0400

    Merge pull request #101 from ZertoPublic/master

    Merge Current Master to Release Branch

commit 7dcb6539a5
Merge: 5b4a25b 3621dde
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 8 13:10:34 2020 -0400

    Merge pull request #100 from ZertoPublic/wcarroll/prep_release

    Prep Release Information

commit 3621ddef8d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 8 13:08:49 2020 -0400

    Set Version Numbers

commit 5b4a25b66d
Merge: 0872f1a 5a2c013
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:45:37 2020 -0400

    Merge pull request #98 from ZertoPublic:wcarroll/issue95

    Remove zvmLocalInfo Script Scope Variable

commit 5a2c01341c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:32:32 2020 -0400

    Update Changlog for Issue 95

commit c477d40364
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:30:07 2020 -0400

    Remove Mocks that are not required any longer

commit 494c45b02c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:26:56 2020 -0400

    Remove tests for removed variable

commit 8318229cf4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:26:36 2020 -0400

    Remove Removal of Variable no longer required

commit 7427ffe707
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:26:10 2020 -0400

    Remove operation to set ZvmLocalInfo Variable

commit 713c94461c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jul 6 14:25:43 2020 -0400

    Replace Script Scope LocalSite Info Variable

commit 0872f1a655
Merge: 136d1b2 a072905
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 1 19:11:54 2020 -0400

    Merge pull request #97 from ZertoPublic/wcarroll/issue96

    Fixes Set-ZertoLicense ShouldProcess issue

commit a072905253
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 1 17:34:25 2020 -0400

    Update ChangLog with Issue 96 updates

commit 41fddf5f13
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 1 17:09:38 2020 -0400

    Set-ZertoLicense - Fix ShouldProcess error
    Fixes #96

commit 136d1b2c76
Merge: 93c55bd a25bf3a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jul 1 14:12:15 2020 -0400

    Merge pull request #94 from NScuola/patch-1

    Adding port information for pairing v7.5+

commit a25bf3adfe
Author: NScuola <15016465+NScuola@users.noreply.github.com>
Date:   Wed Jul 1 14:06:30 2020 -0400

    Adding port information for pairing v7.5+

    Adding port information to example for pairing v7.5+.

commit 93c55bdd07
Merge: 6f1e582 5627992
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 23 13:13:40 2020 -0400

    Merge pull request #93 from ZertoPublic/issue_90

    Make New-ZertoVpg -RecoverySite parameter case-insensitive

commit 5627992a04
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 23 12:54:03 2020 -0400

    Update CHANGELOG

commit 7fc7edff86
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 23 12:51:33 2020 -0400

    Update PeerSite Lookup Method

commit 6f1e582ceb
Merge: 6903ccc 0f1b430
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 23 12:40:07 2020 -0400

    Merge pull request #92 from ZertoPublic/issue_89

    Set New-ZertoVpg Default Parameter Set

commit 0f1b4302bb
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 22 17:18:55 2020 -0400

    Update CHANGELOG with latest updates

commit ea8d6f096d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 22 17:18:40 2020 -0400

    Update Parameter with Proper Names

commit ddae22fb9f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 22 17:18:16 2020 -0400

    Specify defaultParameterSetName

commit 6903ccc99b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 22 17:03:32 2020 -0400

    Update CHANGELOG

commit 7ce6369ad7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jun 12 12:39:38 2020 -0400

    Add tests for switches

commit 2d453ef608
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 16:34:04 2020 -0400

    Put params in correct order

commit 363b6e727c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 16:16:38 2020 -0400

    Update Param Order Syntax in Help File

commit f4c1cf630a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 15:53:53 2020 -0400

    Moved Credential to Second Position

commit 348fcbd28c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 14:19:20 2020 -0400

    Update Help for AutoReconnect switch

commit 3000a2b013
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 8 12:50:29 2020 -0400

    Initial auto reconnect

commit 52609bf64a
Merge: c3ad8dd e021a7b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 18 13:26:50 2020 -0400

    Merge pull request #88 from ZertoPublic/wcarroll-patch-1

    Added Time Example

commit e021a7bab0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 18 13:20:10 2020 -0400

    Added Time Example

    Struggled to find a time example. Added one for future use.

commit c3ad8dd415
Merge: 932262e f81a22c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 11:35:16 2020 -0400

    Merge pull request #87 from ZertoPublic/Refactor-Build

    Refactor build

commit f81a22ca80
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 11 09:24:02 2020 -0400

    Update Artifact Publish task to latest

commit de1a85cecd
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 19:30:50 2020 -0400

    Add ReleaseNotes.md File Creation

commit d3acba3967
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 15:54:59 2020 -0400

    Remove Unused Publish Task

commit 512d5bbd74
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 15:52:59 2020 -0400

    Update Publish Location

commit 9ad9cb7f1e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 12:20:00 2020 -0400

    Update Build Path for Artifact Utilization

commit a55b0cd467
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:58:32 2020 -0400

    Remove SourceFileTests publish

commit aab22cf266
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:53:01 2020 -0400

    Add Branch to Auto-Build

commit 906d35186f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:43:32 2020 -0400

    Update Required Module Versions

commit c7c3428dd5
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:43:03 2020 -0400

    Update release task to use full build process

commit e90d2a23cc
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:42:41 2020 -0400

    Update tests to only show failed

commit 925ecaf224
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:42:17 2020 -0400

    Update default build operation

commit 32403ec3e3
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Jun 10 09:41:37 2020 -0400

    Update build script with params

commit 73540faeb9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 9 22:33:48 2020 -0400

    Update Build Paths

commit 932262e33a
Merge: 7befc7d 1e84f5a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 9 21:27:49 2020 -0400

    Merge pull request #85 from ZertoPublic/wcarroll-patch-2

    Add Username Example

commit 1e84f5aea0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 9 15:21:11 2020 -0400

    Add Username Example

    added example with username filter

commit 7befc7d21e
Merge: 291aae9 cdad0c5
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jun 5 12:57:07 2020 -0400

    Merge pull request #84 from ZertoPublic/wcarroll-patch-1

    Correct example numbering issue

commit cdad0c5e79
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jun 5 09:43:48 2020 -0400

    Correct example numbering issue

commit 291aae9dcd
Merge: 6046103 f8f0d98
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:26:23 2020 -0400

    Merge pull request #83 from ZertoPublic/ReleasePrep

    Release prep

commit f8f0d980d0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:22:12 2020 -0400

    Update Unreleased to Release Number

commit b72099559c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:21:56 2020 -0400

    Bump Version

commit 6046103da0
Merge: de505de cccd45b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:18:15 2020 -0400

    Merge pull request #82 from ZertoPublic/Fix-ZertoStartClone

    Fix zerto start clone

commit cccd45b7fd
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:07:31 2020 -0400

    Update ChangeLog

commit 77b7e1c376
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:05:15 2020 -0400

    Fix Body Creation Method

commit 8f735bee62
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 17 11:04:41 2020 -0400

    Correct body creation method

commit de505debf9
Merge: d4b4d1b bc570e9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 13 10:38:31 2020 -0400

    Merge pull request #81 from ZertoPublic/Invoke-ZertoMoveCommit-Fix

    Fix Invoke-ZertoMoveCommit

commit bc570e9005
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 20:52:55 2020 -0400

    Update Changlog with MoveCommit Changes

commit 804a60be77
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 16:05:54 2020 -0400

    Update for explicit switches

commit 1e678214b1
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 16:05:32 2020 -0400

    Update for explicit reverse and keep params

commit ba0b12e83c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 16:04:27 2020 -0400

    Add accepted values

commit b33b07b524
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 12:19:13 2020 -0400

    Set Explicit Reverse\Keep Options

commit d4b4d1b4d7
Merge: 2887f6d fbe3f4d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 11:04:59 2020 -0400

    Merge pull request #80 from ZertoPublic:Get-ZertoEvent-Fix

    Get zerto event fix

commit fbe3f4d031
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat May 9 10:36:37 2020 -0400

    Add Get-ZertoEvent Fix

commit 26cfb832a4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu May 7 20:49:16 2020 -0400

    Update CHANGELOG.md

commit 865ca1dd39
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu May 7 20:21:39 2020 -0400

    Update Logic to Convert VpgName to VpgIdentifier

commit 2887f6d450
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu May 7 13:54:14 2020 -0400

    Update README.md

    Fix link to updated WIKI page

commit 5613b97eef
Merge: ba2bed6 3a2e8f4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 13:00:52 2020 -0400

    Merge pull request #79 from ZertoPublic/PrepRelease

    Release Update

commit 3a2e8f4ee7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 12:45:09 2020 -0400

    Bump Version

commit 380ac5c841
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 12:44:58 2020 -0400

    Move Recent Updates to ChangeLog

commit c2a0ac9fa0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 12:44:32 2020 -0400

    Update CHANGELOG for Release

commit ba2bed6b53
Merge: 8b213ed 5ec0ddc
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 09:56:01 2020 -0400

    Merge pull request #78 from ZertoPublic/Update-Function-Tests

    Update function tests

commit 5ec0ddce62
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 08:24:28 2020 -0400

    Add general Changes to Changelog

commit 83f00e00ee
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed May 6 08:17:26 2020 -0400

    Update the Version Pattern

commit 63a1ab928e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 22:13:54 2020 -0400

    Update builtfiletests to ensure module is built

commit e6ead11891
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 21:59:14 2020 -0400

    Update mandatory parameter declaration

commit aecd4fd1d5
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 21:25:54 2020 -0400

    Updated CHANGELOG with formatting information

commit 8dcee4068a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 16:30:49 2020 -0400

    Update PSSA Rules for New PSSA Version

commit b0d68ea224
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 16:29:56 2020 -0400

    Updete to use process block for pipeline

commit 22b0da87b9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 14:35:29 2020 -0400

    Update to latest versions of modules

commit fc3c08637b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 14:32:13 2020 -0400

    Module Release Notes point to GitHub

commit 4894084292
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 14:27:27 2020 -0400

    Remove RELEASENOTES for CHANGELOG

commit 781368398c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 14:26:41 2020 -0400

    Update release notes to point to CHANGELOG

commit 4271afd5b4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 14:11:49 2020 -0400

    Move historical Release Notes to ChangeLog

commit 6c2b029014
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 5 13:47:19 2020 -0400

    Update Parameter Name to work with filter

commit e47458b2df
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 30 11:53:55 2020 -0400

    Update ReleaseNotes to maintain history

commit d38f206824
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 30 11:11:29 2020 -0400

    Update ZVM Headers

commit ed6024fe63
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 14 16:24:45 2020 -0400

    Add Tests for Password Update

    # Conflicts:
    #	Tests/Public/Edit-ZertoVra.Tests.ps1

commit 8b213ede25
Merge: 8578c77 6620246
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 20 17:00:00 2020 -0400

    Merge pull request #77 from ZertoPublic/Pester5Prep

    Pester 5 prep

commit 6620246e4c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 20 16:35:02 2020 -0400

    Update Method to Grab Path

    https://jakubjares.com/2020/04/11/pester5-importing-ps-files/

commit 71610ce9fe
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 14 16:03:15 2020 -0400

    Pin Pester v4

commit fb45693fb1
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Apr 11 22:35:23 2020 -0400

    Pester 5 Prep

commit 8578c775dd
Merge: 9fafe4b b186c56
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 20 16:19:54 2020 -0400

    Merge pull request #76 from ZertoPublic/Refactor-Copy-ZertoVpg

    Refactor Copy-ZertoVpg and Add Tests

commit b186c561e6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 20 16:14:41 2020 -0400

    Start of Next Releasenotes

commit ae6a80b48d
Merge: c1b7c49 9fafe4b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 20 15:50:13 2020 -0400

    Merge branch 'master' into Refactor-Copy-ZertoVpg

commit 9fafe4b58b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Apr 17 08:50:27 2020 -0400

    Make PowerShell Gallery Badge Clickable

commit c1b7c490ff
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 14 09:26:56 2020 -0400

    Create Function Tests

commit 589a3b7d6e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 14 09:25:16 2020 -0400

    Create Mock Data for Tests

commit 9913c96d65
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 14 09:26:22 2020 -0400

    Refactor Function

commit fe4d8cf4dd
Merge: e374442 e35939e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Apr 10 08:14:00 2020 -0400

    Merge pull request #75 from ZertoPublic/ReleasePrep

    April Release

commit e35939e592
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 14:37:38 2020 -0400

    Bump Version

commit c422e26903
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 14:37:27 2020 -0400

    Update Readme for release

commit e37444249e
Merge: 85e60ad 616cdcf
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 13:27:35 2020 -0400

    Merge pull request #74 from ZertoPublic/VirtulizationSiteRepos

    Add functionality for ZVM 8.0

commit 616cdcf7a2
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 13:22:57 2020 -0400

    Update Tests for WindowPS

commit e7658fcfec
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 13:22:42 2020 -0400

    Update the version of Pester to latest version

commit a306391a14
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 12:55:41 2020 -0400

    Fix Filename Case

commit 83e9551692
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 12:48:33 2020 -0400

    Add tests for function

commit 7fbc550390
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 12:48:04 2020 -0400

    Add Mocks for Tests

commit e3cba682c7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 9 10:37:36 2020 -0400

    DRY Refactor

commit 96b3e65be2
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Apr 8 15:26:10 2020 -0400

    Update RELEASENOTES.md

commit d15111a883
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Apr 8 15:19:46 2020 -0400

    Add new LTR API Endpoint

    Added new LTR endpoint and help messages to indicate that it will only work with Version 8.0 and above. Also updated help message for backup settings indicating that backup settings only work with 7.5 and below.

commit 90434b56a2
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 17:35:55 2020 -0400

    Updated for new Repositories endpoint

commit 85e60adac1
Merge: d55bc3e 0d6bc39
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:44:00 2020 -0400

    Merge pull request #73 from ZertoPublic/UpdateServiceAccountPassword

    Create function to Update service account password

commit 0d6bc39c86
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:30:42 2020 -0400

    Add an additional example

commit ad2073f404
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:27:22 2020 -0400

    Fixed submitted body formatting

commit e12bf9d85e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:18:37 2020 -0400

    Fix script level variable

commit a5f3ad4de0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:05:34 2020 -0400

    Update RELEASENOTES.md

commit 77fb3c8f67
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:05:31 2020 -0400

    Fix helpmessage typo

commit b2e5fe7b5c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 10:04:55 2020 -0400

    Update Set-ZertoUserCredential.md

commit f34f21bb85
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Apr 7 07:49:13 2020 -0400

    Create Set-ZertoUserCredential.md

commit 536a62f792
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 6 17:15:57 2020 -0400

    Create Set-ZertoUserCredential.Tests.ps1

commit df83277c06
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Apr 6 17:15:52 2020 -0400

    Create Set-ZertoUserCredential.ps1

commit d55bc3e4b3
Merge: 64fa03e 7488e79
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Apr 4 10:42:56 2020 -0400

    Merge branch 'UpdateVraWithPassword'

commit 7488e7999f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Apr 4 10:36:51 2020 -0400

    Updated Release notes with current changes

commit dcba2b04a9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Apr 4 10:30:46 2020 -0400

    Added Edit Password Information

commit bd94bfe5db
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Apr 4 10:26:56 2020 -0400

    Update Help Files

commit fb722661a7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Apr 3 16:51:09 2020 -0400

    Update Edit-ZertoVra.Tests.ps1

commit 6121940563
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Apr 3 10:35:44 2020 -0400

    Added ability to updated Host Password

commit 64fa03e4ea
Merge: c94f04d 8685444
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 19:57:38 2020 -0400

    Merge pull request #71 from ZertoPublic/ZA-Planner

    Updates for Zerto Analytics

commit 86854442ef
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:56:57 2020 -0400

    Update Online Link to Help

commit bc46a512cd
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:55:04 2020 -0400

    Update RELEASENOTES.md

commit 0a84246d8e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:44:16 2020 -0400

    Add parameter validation

commit f299aecb9b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:44:00 2020 -0400

    Add parameter validation

commit 646476e74e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:43:50 2020 -0400

    Remove unused parameter

commit 285a82f280
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:43:39 2020 -0400

    Fix Parameter Test

commit fbe9fb2af8
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:43:28 2020 -0400

    Fix Parameter Test

commit 1af70b8c80
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:38:35 2020 -0400

    Create Tests

commit 0ef71c25bb
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:16:14 2020 -0400

    Update Get-ZAPlannerZcasReport.md

commit 78e1cdb981
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:16:11 2020 -0400

    Update Get-ZAPlannerWanReport.md

commit 1a66d4e64b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 17:09:25 2020 -0400

    Update Get-ZAPlannerStatsReport.md

commit 2fef1dbc42
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 16:46:59 2020 -0400

    Create Get-ZAProtectedVmReport.md

commit b00ededc7f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 16:44:08 2020 -0400

    Create Get-ZAProtectedVm.md

commit 8e5ced9b87
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 15:12:52 2020 -0400

    Create Get-ZAProtectedVmReport.ps1

commit 69fb384c89
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 15:12:43 2020 -0400

    Create Get-ZAProtectedVm.ps1

commit a8b9ec3a00
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 15:12:04 2020 -0400

    Update Help File Formatting

commit 355be7c1e5
Merge: 3e980dc c94f04d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 12:30:58 2020 -0400

    Merge branch 'master' into ZA-Planner

commit c94f04de77
Merge: d39777c f4807f9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 12:29:36 2020 -0400

    Merge pull request #69 from ZertoPublic/MultiClusterSingleDatastore

    Updates to Install-ZertoVra

commit f4807f94fb
Merge: 83879a5 d39777c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 12:25:25 2020 -0400

    Merge branch 'master' into MultiClusterSingleDatastore

commit d39777cbb0
Merge: 71352ca 8b43856
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 12:22:14 2020 -0400

    Merge pull request #70 from ZertoPublic/AzurePipelinesUpdates

    Update build agents.

commit 8b43856558
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 12:17:55 2020 -0400

    Update build agents.

commit 83879a51e7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 11:54:48 2020 -0400

    Update RELEASENOTES.md

commit 2d1fb8e4db
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 10:51:05 2020 -0400

    Update Install-ZertoVra.md

commit e774cd861d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 10:48:19 2020 -0400

    Update Copy-ZertoVpg.md

commit a660aa29b3
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 10:48:02 2020 -0400

    Update Common Parameters formatting

commit 82458712f0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 10:46:40 2020 -0400

    Update tests for new functionality

commit bae9eb9b99
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Apr 2 10:27:20 2020 -0400

    Update function to enable password installation

commit 2ea7092b91
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Apr 1 17:14:21 2020 -0400

    Update logic to only allow install to attached devices

commit de08f0eece
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 19 17:08:08 2020 -0400

    Ensure the right DSId is mapped to the target host.

commit 3e980dc195
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 19 16:25:28 2020 -0400

    Add Online Help URI

commit eccc5f27f3
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 19 09:21:05 2020 -0400

    Update Get-ZAPlannerNetworkPerformanceReport.md

commit e516a24e38
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 19 09:19:48 2020 -0400

    Update Get-ZAPlannerJournalSizeReport.md

commit 07f92583f8
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Mar 18 13:57:12 2020 -0400

    Update Single Site URL

commit c2f554dca1
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Mar 18 13:54:58 2020 -0400

    Update Get-ZAPlannerSite.md

commit 8bd865d83d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 22:45:51 2020 -0400

    Create Template Help Files

commit 02e50d9cd6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 17:33:36 2020 -0400

    Create Get-ZAPlannerZcasReport.ps1

commit 7fc0a5f579
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 17:33:31 2020 -0400

    Create Get-ZAPlannerWanReport.ps1

commit ce5a64c683
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 17:33:27 2020 -0400

    Create Get-ZAPlannerNetworkPerformanceReport.ps1

commit 1317a6c039
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 17:33:24 2020 -0400

    Create Get-ZAPlannerJournalSizeReport.ps1

commit 169e628c7b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 14:57:19 2020 -0400

    Remove Debugging Output

commit d35d9d7cf4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 14:40:22 2020 -0400

    Create Get-ZAPlannerStatsReport.ps1

commit a891a4914d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Mar 8 14:39:34 2020 -0400

    Create Get-ZAPlannerSite.ps1

commit 71352cae7b
Merge: fad3ca0 b0edd90
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 17:22:53 2020 -0500

    Merge pull request #68 from ZertoPublic/IZRR-to-public

    Move RestRequest functions into Public

commit b0edd9026f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 14:08:12 2020 -0500

    Update RELEASENOTES.md

commit 7cde687d70
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 13:42:58 2020 -0500

    Create Documentation for Newly Public Functions

commit 569d9e264c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 13:42:39 2020 -0500

    Update ZertoRestRequest and associated Tests

commit 40331c26f9
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 13:42:20 2020 -0500

    Update ZARestRequest and associated tests.

commit 526093afc6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 13:31:59 2020 -0500

    Fix the Tests extension

commit dc4dd1ad05
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 10:40:21 2020 -0500

    Move IZRR function to public

commit 779ee1415e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 10:38:41 2020 -0500

    Move IZRR to public

commit 13592df6aa
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 10:33:12 2020 -0500

    Move ZARestRequest to Public Function

commit fad3ca0e27
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 10:01:17 2020 -0500

    Update RELEASENOTES.md

commit 52782aa1e5
Merge: cc9e53a bc02e79
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Mar 6 09:11:10 2020 -0500

    Merge pull request #67 from ZertoPublic/Refactor-GetVpg

    Refactor Get-ZertoVpg

commit bc02e796d6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 5 21:43:52 2020 -0500

    Refactor for DRY

commit 4c32bbe057
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Mar 5 21:43:32 2020 -0500

    Update to PwSh Version 7

commit cc9e53ac44
Merge: ecab250 37165e1
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 10:30:12 2020 -0500

    Merge branch 'fix-typos'

commit 37165e18a7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 10:00:45 2020 -0500

    Typo Correction Update

commit 772848beef
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 09:53:55 2020 -0500

    Updated help file to reflect typo correction

commit 18185612bb
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 09:51:23 2020 -0500

    Fixed recovery switch typo

commit ecab2500c7
Merge: 1e80bb0 fde7f67
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 09:46:34 2020 -0500

    Merge pull request #65 from ZertoPublic/checkpoint-refactor

    Checkpoint refactor

commit fde7f67e45
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Mar 2 09:41:09 2020 -0500

    Update RELEASENOTES.md

commit e19f9b34f5
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Feb 28 08:15:53 2020 -0500

    Update function to allow pipeline operations

commit a36a7cb37a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Feb 28 08:15:15 2020 -0500

    Cleanup documentation

commit 1e80bb06fb
Merge: 02f1c89 4c98b75
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 11:01:27 2019 -0500

    Merge pull request #63 from ZertoPublic/ExportNicUpdate

    Update Export and Import VpgNicSetting functions

commit 4c98b75134
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 10:48:07 2019 -0500

    Update RELEASENOTES.md

commit a7efc7c717
Merge: 8015531 02f1c89
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 10:37:44 2019 -0500

    Merge branch 'master' into ExportNicUpdate

commit 02f1c89d86
Merge: 579ba7a 5b9243a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 10:35:35 2019 -0500

    Merge pull request #62 from ZertoPublic/RecoveryReport

    Remove -VpgIdentifier Parameter from Get-ZertoRecoveryReport function

commit 5b9243a02f
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 10:16:27 2019 -0500

    Updated releasenotes with changes

commit 1962dda15c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 22 10:07:17 2019 -0500

    Remove vpgIdentifier Parameter

    vpgIdentifier Parameter as added as a parameter by mistake. The API does not accecpt this as a filter.

commit 801553178e
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Dec 20 22:56:20 2019 -0500

    Update Online Help Link

commit 6c92dff447
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Dec 20 22:56:04 2019 -0500

    Update Description with new logic

commit 003396998c
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Dec 20 21:09:12 2019 -0500

    Eliminate Blank Output

commit 05783a1f37
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Dec 19 18:49:13 2019 -0500

    Update Import Logic

commit 270470f858
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Dec 18 13:06:11 2019 -0500

    Update Nic Object Logic

commit 579ba7a063
Merge: abadc86 2cb3516
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 1 17:15:24 2019 -0500

    Merge pull request #59 from ZertoPublic/PrepRelease

    Prep release

commit 2cb35165a9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Dec 1 17:09:57 2019 -0500

    Update README

commit 82cf4cb732
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Dec 1 17:05:53 2019 -0500

    Bump Version for Release

commit 9d21eb6409
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Dec 1 17:05:40 2019 -0500

    Format Release Notes

commit abadc86ae8
Merge: 7cad7ea f094263
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun Dec 1 17:01:53 2019 -0500

    Merge pull request #58 from ZertoPublic/FoT-Fix

    Fixes Failover Test function

commit f094263882
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 28 10:55:59 2019 -0500

    Update RELEASENOTES.md

commit c47614727a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 28 10:41:26 2019 -0500

    Fix Verbose Typo

commit 7cad7eaf75
Merge: 5b8a89e d6862f7
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Nov 8 08:32:13 2019 -0500

    Merge pull request #56 from ZertoPublic/CopyVpgBugFix

    Fix Bug when Adding Additional VMs

commit d6862f75d1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 22:35:40 2019 -0500

    Fix Bug when Adding Additional VMs

commit 5b8a89e1a3
Merge: 5c76c4c d6562de
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Nov 7 21:45:27 2019 -0500

    Merge pull request #55 from ZertoPublic/CloneVPG

    Implement Clone VPG Function

commit d6562de9bf
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 21:37:03 2019 -0500

    Update for Copy-ZertoVpg

commit cdae203993
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 17:44:06 2019 -0500

    Fix Documentation Formatting

commit 213b6029e4
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 17:43:40 2019 -0500

    Create Documentation

commit 11ab03be0a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 17:43:29 2019 -0500

    Create Tests

commit 5f978d7b1a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Nov 7 17:43:18 2019 -0500

    Fix AddVM Logic

commit 5c76c4c58c
Merge: 8a1593c 8b3a3b3
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Nov 4 16:20:49 2019 -0500

    Merge pull request #53 from ZertoPublic/wcarroll-patch-1

    Update Connect-ZertoServer.md

commit 8b3a3b3b0b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Nov 4 16:20:31 2019 -0500

    Update Connect-ZertoServer.md

commit 63d56cf862
Merge: 10785df 5984bc9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Oct 25 14:10:09 2019 -0400

    Merge branch 'CloneVPG' of https://github.com/wcarroll/ZertoApiWrapper into CloneVPG

commit 10785df8a9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Oct 12 22:26:13 2019 -0400

    Create Copy-ZertoVpg Function

commit 8a1593ceba
Merge: 528bc66 1ca3d67
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Oct 25 14:03:26 2019 -0400

    Merge pull request #52 from ZertoPublic/EvacuateHost

    Implement Evacuate VRA Function

commit 1ca3d6704b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Oct 25 13:49:59 2019 -0400

    Update Release Notes for Evacuate Function

commit b4a7df970c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 24 13:51:26 2019 -0400

    Correct VraIdentifier Property

commit 3d8acf03f6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 24 13:50:52 2019 -0400

    Update Tests to include set counts

commit 07de073bf1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 24 07:25:38 2019 -0400

    Create Invoke-ZertoEvacuateVra.Tests.ps1

commit 7641d28307
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Oct 23 10:00:42 2019 -0400

    Add parameter validation

commit 30422d0421
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Oct 23 09:52:09 2019 -0400

    Create Invoke-ZertoEvacuateVra.md

commit 4a0885f731
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Oct 22 13:35:49 2019 -0400

    Fix Help Message Typo

commit 28d66806a5
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Oct 22 13:31:10 2019 -0400

    Add ExternalHelp Def

commit 42b923cef5
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Oct 22 13:26:10 2019 -0400

    Create EvacuateVra Function

commit 5984bc93c9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Oct 12 22:26:13 2019 -0400

    Create Copy-ZertoVpg Function

commit 528bc66bcd
Merge: 9d34086 e706470
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Oct 8 12:45:15 2019 -0400

    Merge pull request #49 from ZertoPublic/New-Token

    Add Function to Obtain a Pairing Token

commit e706470395
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Oct 8 12:37:11 2019 -0400

    Add `New-ZertoPairingToken` to Release notes.

commit 29a79bbb92
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Oct 8 12:31:34 2019 -0400

    Correct extension case.

commit f907acd14a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Oct 7 11:23:24 2019 -0400

    Create New-ZertoPairingToken.md

commit 90a17045af
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Oct 7 11:23:19 2019 -0400

    Create PairingToken.Json

commit e1ba8412ff
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Oct 7 11:23:13 2019 -0400

    Create New-ZertoPairingToken.Tests.ps1

commit 0a90d51735
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Oct 7 11:23:10 2019 -0400

    Create New-ZertoPairingToken.ps1

commit 9d34086e40
Merge: 6cc2e8d 842c7ce
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Oct 4 17:01:37 2019 -0400

    Merge pull request #48 from ZertoPublic/75Update

    Update to add token parameter to Add-ZertoPeerSite

commit 842c7ceeec
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 3 16:54:56 2019 -0400

    Added release notes for this update.

commit d78fc28b1c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 3 14:33:17 2019 -0400

    Add ShouldProcess support to help file.

commit 28fb42d56a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 3 14:33:01 2019 -0400

    Update documentation for token parameter and example.

commit 0657607f3a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 3 14:32:36 2019 -0400

    Update Tests to New format and add token parameter tests

commit 32f6a6eebc
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Oct 3 14:32:05 2019 -0400

    Update function to use new token parameter

commit 6cc2e8d61d
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Wed Sep 4 15:45:17 2019 -0400

    Correct Example Number Typo

commit b9598e7e0b
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Aug 1 14:11:59 2019 -0400

    Add Aug Release in recent updates.

commit a9ea273d55
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Aug 1 11:51:04 2019 -0400

    Bump Version for Release

commit f5c81a0766
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Aug 1 11:50:46 2019 -0400

    Update RELEASENOTES.md

commit 3a8e742aad
Merge: a4e3961 7b07fb0
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jul 30 10:22:36 2019 -0400

    Merge pull request #44 from ZertoPublic/NewVpgBugFix

    Update method to add VMs to Object

commit 7b07fb0fd7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 29 08:50:25 2019 -0400

    Update method to add VMs to Object

commit a4e3961bd7
Merge: 46951b7 551eac5
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jul 26 11:13:41 2019 -0400

    Merge pull request #42 from ZertoPublic/UpdateTests

    Update Testing Methods

commit 551eac5d5a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 26 11:06:07 2019 -0400

    Update release notes for testing changes

commit 916fbb6c4c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 13:13:38 2019 -0400

    Add Parameter Validation Tests

commit 5c2e16d5c6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 13:13:24 2019 -0400

    Add Parameter Validation

commit 8b0def7c50
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 12:59:23 2019 -0400

    Update Parameter Tests

commit 73884ef022
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 12:57:01 2019 -0400

    Update Parameter Tests

commit fd1619351e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 12:51:13 2019 -0400

    Update Parameter Tests

commit 4e7d30ef33
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 12:30:30 2019 -0400

    Add NullOrEmpty validation test

commit 2769489939
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 23 12:27:11 2019 -0400

    Create Parameter Tests

commit baf6aa50ee
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 21:55:28 2019 -0400

    Add Parameter Tests

commit c96836c000
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 21:46:31 2019 -0400

    Add Parameter Tests

commit 51a1e0fb03
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 21:27:14 2019 -0400

    Add Parameter Tests

commit c6b37c24a6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 21:22:24 2019 -0400

    Add Parameter Tests

commit 1d6c2289e8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 21:20:45 2019 -0400

    Add Parameter Tests

commit ad6b154d85
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 20:52:34 2019 -0400

    Add Parameter Tests

commit 28fabd592c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 20:09:03 2019 -0400

    Add Parameter Tests

commit e751202010
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 20:03:52 2019 -0400

    Add Parameter Tests

commit b5a637fe60
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 19:59:02 2019 -0400

    Add Parameter Tests

commit b294f3e6ad
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 19:54:39 2019 -0400

    Add Parameter Tests

commit 1be09bd734
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 19:52:54 2019 -0400

    Add Parameter Tests

commit e07b99613e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 22 17:08:17 2019 -0400

    Add Parameter Tests

commit 6a924067c9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:57:25 2019 -0400

    Add Parameter Tests

commit d2eddea4bc
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:51:01 2019 -0400

    Add Parameter Tests

commit 5e12656a4a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:44:35 2019 -0400

    Add Parameter Tests

commit 96803e1ad5
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:42:12 2019 -0400

    Add Parameter Tests

commit 79542e8f7f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:41:05 2019 -0400

    Add Parameter Tests

commit c8da651200
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:37:32 2019 -0400

    Add Parameter Tests

commit c578ec428e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:35:26 2019 -0400

    Add Parameter Tests

commit 6bc6f902fd
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:33:19 2019 -0400

    Add Parameter Tests

commit fc3a2a0193
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:31:53 2019 -0400

    Add Parameter Tests

commit aaa505c790
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:30:22 2019 -0400

    Add Parameter Tests

commit 7fe361dba7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:26:24 2019 -0400

    Add Parameter Tests

commit 356572a1f8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:24:07 2019 -0400

    Add Parameter Tests

commit 878622d3e2
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:20:31 2019 -0400

    Add Parameter Tests

commit c83462d03c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 20:08:54 2019 -0400

    Add Parameter Tests

commit ba1e1c309e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 19:48:04 2019 -0400

    Add Parameter Tests

commit 21bc81b0ec
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 18:24:34 2019 -0400

    Add Parameter Tests

commit 8267474d8a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 18:24:16 2019 -0400

    Update Mandatory Setting for DatastoreId

commit fee7cd9723
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 18:16:25 2019 -0400

    Add Parameter Validation Tests

commit efea494475
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 12:23:27 2019 -0400

    Update Parameter Counts

commit 9be00e68b1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 12:17:33 2019 -0400

    Update to new test format

commit 928d6ef4a1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 12:09:15 2019 -0400

    Update tests to new format

commit e1720dd4f7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 11:56:03 2019 -0400

    Update test description

commit 202c865fe8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 11:54:28 2019 -0400

    Update tests to new format

commit 6df14f7a8d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 11:49:08 2019 -0400

    Parameter Count Test

commit 5213614299
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 11:36:46 2019 -0400

    Add Parameter count test

commit a39f2638d1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 21 11:36:30 2019 -0400

    Update to new test format

commit 37016076fd
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:56:23 2019 -0400

    Update to the new format

commit c05a527982
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:14:58 2019 -0400

    Update tests to new format

commit ff54a92f92
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:10:06 2019 -0400

    Fix function call var

commit b82912605e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:07:02 2019 -0400

    Update tests to new format

commit 3e3a433843
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:03:06 2019 -0400

    Update tests to new format

commit 047e701f55
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 20:01:02 2019 -0400

    Update tests to new format

commit 6b1486b74d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 19:58:48 2019 -0400

    Update Tests to new format

commit 213329801a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 19:42:48 2019 -0400

    Update Tests to New Format

commit 55fb683dc3
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 19:18:46 2019 -0400

    Update Tests to TestCases

commit 075a78436d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 18:35:13 2019 -0400

    Add Mock Data Files

commit a6d81aca44
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 13:49:37 2019 -0400

    Refactor Tests

commit 9f2a6c42cd
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 13:49:03 2019 -0400

    Change error to Throw

commit a78f827804
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 13:48:25 2019 -0400

    Add Dhcp VRA Mock

commit a526045662
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 13:01:32 2019 -0400

    Update Map Function Call

commit 6a6b073ada
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 13:00:28 2019 -0400

    Redirect Invoke Output to Null

commit b11c497ead
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 12:59:12 2019 -0400

    Update Exclude Rules

commit 344e7836f9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 12:57:27 2019 -0400

    Update .gitignore

commit 1e64d9d7f3
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 12:57:21 2019 -0400

    Renamed Function

commit 9ab97f2786
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 11:39:05 2019 -0400

    Update Test Template for both source and built tests

commit 997ab90035
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jul 20 11:37:22 2019 -0400

    Add Mock File for Single VRA Information

commit 86ac714c22
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 19 14:23:16 2019 -0400

    Use TestCases

commit 0c4643a76e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 19 14:22:56 2019 -0400

    Change ThrowError to Throw

commit 1cfc07260f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 19 14:22:39 2019 -0400

    Remove unused BeforAll Block

commit 82dbe7ae48
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 19 13:47:53 2019 -0400

    Update Invoke-ZARestRequest.Tests.ps1

commit 670fbdbba8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri Jul 19 11:54:11 2019 -0400

    Change ThrowError to Throw

commit 2e6a37bd5f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jul 18 21:25:20 2019 -0400

    Update Invoke-ZertoRestRequest.Tests.ps1

commit 1c17ca3e96
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jul 18 21:25:18 2019 -0400

    Update Invoke-ZertoRestRequest.ps1

commit 6b05af2db4
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 16 14:52:22 2019 -0400

    Update Invoke-ZARestRequest.Tests.ps1

commit 40326da05f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 16 14:16:06 2019 -0400

    Update to ThrowErrors when required vars missing

commit db91acb770
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 16 14:11:01 2019 -0400

    remove global variables when complete

commit 562d1210e6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 15 15:31:44 2019 -0400

    Update Tests for Mutlirun

commit d7ee3eab12
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 15 15:30:54 2019 -0400

    Updating Formatting

commit 19b645bccc
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 15 11:48:47 2019 -0400

    Exclude Common Parameters in Filter String

commit e6c5effe7c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 15 11:48:13 2019 -0400

    Specify InputObject Type

commit 235434fe20
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 14 20:36:32 2019 -0400

    Update function to global variable

commit dd144d3c47
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 14 20:35:47 2019 -0400

    Update to use New-Map helper function

commit 4fee466cc8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 14 20:34:53 2019 -0400

    Add Mocks for New-Map

commit f1afbe6748
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jul 14 20:34:26 2019 -0400

    Create private helper function New-Map

commit 5eae4857cf
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jul 11 18:14:32 2019 -0400

    Updating tests for multiuse

commit e930f996d6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jul 11 18:05:53 2019 -0400

    Add mock files for testing

commit 9a010244b4
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jul 11 07:55:47 2019 -0400

    Update to paths

commit 7339366f7d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jul 10 21:19:48 2019 -0400

    Update Build Pipeline for Additional Tests

commit 7f5fb6c1ac
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jul 10 21:10:13 2019 -0400

    Update Build Process Versions and Steps

commit 46951b76ba
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Fri Jul 26 08:33:41 2019 -0400

    Add missing formatting variable to the Get-ZAVpg function (#41)

    * Add missing formatting variable

    * Update ReleaseNotes

commit 06b6bb09d7
Merge: b2c3548 ddb639a
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jul 9 14:34:40 2019 -0400

    Merge pull request #39 from ZertoPublic/NicExportImport

    Bulk NIC Information Export and Import

commit ddb639ad6b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 9 13:29:31 2019 -0400

    Update RELEASENOTES.md

commit 4d7d1391ff
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 9 13:12:22 2019 -0400

    Create function and required supporting docs

    Import-ZertoVmNicSetting

commit cb991b3d0c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 9 12:38:02 2019 -0400

    Correct On-line Help Link URI

commit 80c82b99e0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jul 9 11:48:21 2019 -0400

    Update to use Export-CSV

commit 90cf88b5cb
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 8 13:38:48 2019 -0400

    Update ZertoApiWrapper.build.ps1

commit ef1584032e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 8 13:22:18 2019 -0400

    Create function and required associated docs

    Export-ZertoVmNicSetting

commit 1fd92008ac
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 8 12:55:31 2019 -0400

    Update Remove-ZertoVpgSettingsIdentifier.md

commit 0a2e6974f0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jul 8 11:59:50 2019 -0400

    Create Function and related files

    Remove-ZertoVpgSettingsIdentifier

commit b2c3548d01
Merge: 148b33c 0b1f2c4
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue Jun 25 15:32:27 2019 -0400

    Merge pull request #37 from ZertoPublic/ZATokenCheck

    Add a Token Check to the Invoke-ZARestRequest Private Function

commit 0b1f2c4d1b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jun 25 14:02:07 2019 -0400

    Update psd1 to export all functions

    This will not happen in built releases, but just for in-house testing scenarios.

commit b7d4664d6b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jun 25 14:00:40 2019 -0400

    Correct Last Action Variable Name

commit 44ed5767ea
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Tue Jun 25 08:30:54 2019 -0400

    Update Expired Token Error Message

commit 83649fb72a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 24 12:47:50 2019 -0400

    Add information to release notes.

commit 9d579a5785
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 24 12:42:23 2019 -0400

    Update VSCode settings

commit ad8f06c6e1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 24 12:42:10 2019 -0400

    Add Logic for token tests

commit 148b33c1e3
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 19 17:03:23 2019 -0400

    Add Issue and PR Templates

commit a8025f4be1
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 17 09:18:04 2019 -0400

    Fix Install CodeBlock

commit 9c16c2c6e2
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 17 09:14:10 2019 -0400

    Fix CodeBlock Formatting

commit f91d16f11a
Merge: 5f5d449 e94c2b6
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon Jun 17 09:11:11 2019 -0400

    Merge pull request #34 from ZertoPublic/ZertoAnalytics

    Implements Zerto Analytics Functionality.

commit e94c2b66e1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 17 09:07:45 2019 -0400

    Ignore Plural Nouns In PSSA

commit c08df4c1a0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 17 08:58:23 2019 -0400

    Update for Release

commit 82df93143b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 17:54:53 2019 -0400

    Cleaning InvokeBuild Script

commit 59a0112f2c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 17:54:36 2019 -0400

    Update RELEASENOTES.md

commit c70e0a6701
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 17:54:32 2019 -0400

    Update README.md

commit 598b9027a6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 11:38:36 2019 -0400

    Add Interval Parameter

commit 8edfb97b1f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 10:07:13 2019 -0400

    Create function and related docs

    Get-ZANetworkVpgAveragePerformance

commit 1ad528c114
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:54:33 2019 -0400

    Create function and associated docs

    Get-ZANetwrokVpgAverageIOPS

commit a0cc4214ca
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:54:07 2019 -0400

    Add parameter validation

commit 2ed0169a00
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:40:00 2019 -0400

    Create function and associated docs.

    Get-ZANetworkVpgSummary

commit b0763e965e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:39:36 2019 -0400

    Create Function and Required Docs

    Get-ZANetworkVpgStat

commit 5447d1b443
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:06:52 2019 -0400

    Create Function and associated docs

    Get-ZANetworkSiteAverageIOPS

commit ee4419687a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 09:06:29 2019 -0400

    Fix Spelling Error

commit dce6d688b7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 08:53:48 2019 -0400

    Create function and required docs

    Get-ZANetworkSiteAveragePerformance

commit aaed38ee35
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 08:53:29 2019 -0400

    Fix filename typo

commit d3dbc71a64
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 07:58:57 2019 -0400

    Create function and associated docs

    Get-ZANetworkSiteStat

commit ff809b733f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 10 07:58:33 2019 -0400

    Correct spelling errors and Add Examples

commit 9a2e1c63ad
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:18:36 2019 -0400

    Create Function and Required Docs

    Get-ZANetworkSiteSummary

commit fb7fd5abb8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:18:09 2019 -0400

    Update Parameter Information

commit e33b45a274
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:06:24 2019 -0400

    Correct mis-named variable

commit d31b4ce995
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:05:47 2019 -0400

    Update Mis-named variable

commit c6a53688ec
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:04:57 2019 -0400

    Correct Parameter Variable Name

commit 1da569fa6a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:03:31 2019 -0400

    Correct Parameter in Help File

commit 58e948dfbc
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:03:02 2019 -0400

    Update Help Parameters

commit 27c44056a5
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 16:02:16 2019 -0400

    Create Function and Associated Docs

    Get-ZASitePair

commit 7a80131e95
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:31:09 2019 -0400

    Create Function and required docs

    Get-ZAJournalSiteHistorySummary

commit 8b6f4999b2
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:27:02 2019 -0400

    Create Function and Required Docs

    Get-ZAJournalSiteSizeStat

commit a74bc14e30
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:26:28 2019 -0400

    Function Rename

commit 108cb12439
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:26:14 2019 -0400

    Function Rename

commit d2b559ec83
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:25:36 2019 -0400

    Function Rename

commit 5bd2d83cc8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 15:07:40 2019 -0400

    Create function and associated docs

    Get-ZAJournalHistorySiteStat

commit eb528e3432
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 14:58:04 2019 -0400

    Create Function and Required Docs

    Get-ZAJournalAverageSize

commit aeeaf73da0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 14:57:38 2019 -0400

    Correct Parameter Error

commit 1110fcc56a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 14:51:38 2019 -0400

    Create Function and required docs

    Get-JournalAverageSize

commit ca2620d9b5
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 14:51:16 2019 -0400

    Create function and required docs

    Get-ZAJournalAverageSiteHistory

commit d46869353b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 14:50:54 2019 -0400

    Create Function and Required Docs

    Get-ZAJournalAverageHistory

commit 0fda0c1e78
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:49:45 2019 -0400

    Create Function and Docs

    Get-ZAJournalStatusProportion

commit 0226fdd432
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:49:09 2019 -0400

    Fix Function Name Typos in Docs

commit b934e28657
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:41:55 2019 -0400

    Create Get-ZAJournalHistoryStat and Docs

commit ced0066244
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:41:42 2019 -0400

    Create Get-ZAJournalBreach and Docs

commit 6ab9a2dae6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:32:50 2019 -0400

    Create Get-ZAJournalStorage Stat and Docs

commit bb6de17e7c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:25:07 2019 -0400

    Create Get-ZAJournalSummary and Docs

commit 89bfe61a1b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:18:11 2019 -0400

    Add Parameter Validation

commit 72cbe0eb29
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:02:25 2019 -0400

    Create Get-ZARPOAverage and Required Docs

commit 80bad68238
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 12:02:06 2019 -0400

    Update Related Links description

commit e80fab4eac
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 11:52:21 2019 -0400

    Fix Function Name Typo

commit f3d07003b4
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 11:17:07 2019 -0400

    Create Get-ZARPOAccountAverage and Docs

commit 675c43b35e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 10:12:00 2019 -0400

    Create Get-ZARPOStatusProportion and Docs

commit b22345dc63
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 10:02:50 2019 -0400

    Create Get-ZARPOBreach and required docs.

commit 1c9a5bb6cb
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 09:59:05 2019 -0400

    Fix Get-ZARPOStat issues with tests and docs

commit 9262f1b42d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 09:50:35 2019 -0400

    Create Get-ZARPOStat and required docs

commit f7fff2248e
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun Jun 9 08:56:04 2019 -0400

    Create Get-ZARPOSummary and Docs

commit 358d680c72
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jun 8 16:11:04 2019 -0400

    Remove AlertAggregation

    Remove AlertAggregation, Will add aggregation into Alert down the road.

commit f0fb1d4fc6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jun 8 16:09:10 2019 -0400

    Add required External Help Line

commit 35b03a963f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jun 8 16:08:57 2019 -0400

    Update Help File

commit c83eb2d8a7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sat Jun 8 16:08:25 2019 -0400

    Create Get-ZAVolume and required files

commit a475eee47a
Merge: 1008c2c 1f03feb
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 17:55:01 2019 -0400

    Resolving Merge Conflicts

commit 1f03feb1c6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 14:29:22 2019 -0400

    Create Get-ZADatastore function & supporting docs

commit c88d175fd0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 13:59:41 2019 -0400

    Correct Help Message Typo

commit 0e148bdb1b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 13:59:13 2019 -0400

    Create Get-ZATask files and content

commit 4fc6c9ebcd
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 13:36:04 2019 -0400

    Create Get-ZAEvent Files

commit 7ec6d846c0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 12:30:01 2019 -0400

    Create External Help File for Get-ZAzOrg Function

commit f2d2e00f12
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 12:28:07 2019 -0400

    Create Get-ZAVpg External Help File

commit 2c891795b2
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:57:05 2019 -0400

    Add Online Parameter URL

commit 9799feaeea
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:50:09 2019 -0400

    Formatting Update

commit cddd25ded1
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:49:49 2019 -0400

    Formatting Update

commit ebc86c5e71
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:48:49 2019 -0400

    Update Function to set variable to mandatory

commit a3fd87f933
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:46:49 2019 -0400

    Create Get-ZASiteTopology Markdown Help File

commit 6d66a1c35b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:44:04 2019 -0400

    Create Get-ZASite Markdown help file

commit 8b09b702d6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:42:01 2019 -0400

    Create Get-ZAMonitoring Markdown Help file

commit 0fbc6d2242
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:35:41 2019 -0400

    Create Get-ZALicense Markdown Help File

commit f0f45a383f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:34:27 2019 -0400

    Create Get-ZAAlert Markdown Help File

commit d8084b2fb3
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:31:55 2019 -0400

    Formatting Update

commit 5990d57285
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:31:44 2019 -0400

    Fix variable Typo

commit 8581c037d7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:20:29 2019 -0400

    Add task to update the Markdown help files with new commands.

commit ba4f0fc82a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Thu Jun 6 11:20:01 2019 -0400

    Create Connect-ZertoAnalytics.md

commit 70261242db
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 15:55:28 2019 -0400

    Update Invoke-ZertoFailoverCommit.md

commit bc9e485346
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 15:41:31 2019 -0400

    Update Invoke-ZertoFailoverCommit.md

    Add SupportShouldProcess

commit 8d5111a24a
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:20:13 2019 -0400

    Create Get-ZAzOrg Function and Tests

commit 87857303a0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:19:34 2019 -0400

    Create Get-ZAVpg Function and Tests

commit 97aa9f1ba8
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:18:57 2019 -0400

    Create Get-ZASiteTopology Function and Tests

commit 5018404641
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:18:16 2019 -0400

    Create Get-ZASite Function and Tests

commit e43e911c7b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:17:41 2019 -0400

    Create Get-ZAAlertAggregation Function and Tests

commit 15435c9261
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:16:43 2019 -0400

    Create Get-ZAAlert Function and Tests

commit 848daf3c49
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:13:31 2019 -0400

    Create ZAMonitoring Function and Tests

commit b424605735
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:12:36 2019 -0400

    Create Get-ZALicense.Tests.ps1

commit 5f24cc8c73
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:08:45 2019 -0400

    Make into an advanced function.

commit c78ad3e696
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:08:06 2019 -0400

    Create Connect-ZertoAnalytics.Tests.ps1

commit ab39ba70a2
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:07:58 2019 -0400

    Create Invoke-ZARestRequest.Tests.ps1

commit 934f026644
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:07:37 2019 -0400

    Add External Help File

commit 183bbc7d13
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:33 2019 -0400

    Create Get-ZALicense.ps1

commit 6a32ed6e14
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:20 2019 -0400

    Create Connect-ZertoAnalytics.ps1

commit 79fe7de886
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:15 2019 -0400

    Create Invoke-ZARestRequest.ps1

commit 5f5d4497be
Merge: 1c630ed 8365083
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 6 10:51:24 2019 -0400

    Merge pull request #33 from ZertoPublic/add-code-of-conduct-1

    Create CODE_OF_CONDUCT.md

commit 8365083814
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Thu Jun 6 10:32:00 2019 -0400

    Create CODE_OF_CONDUCT.md

commit 1008c2c670
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 15:41:31 2019 -0400

    Update Invoke-ZertoFailoverCommit.md

    Add SupportShouldProcess

commit fd2d175def
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:20:13 2019 -0400

    Create Get-ZAzOrg Function and Tests

commit 1b331105b9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:19:34 2019 -0400

    Create Get-ZAVpg Function and Tests

commit 0f35782f66
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:18:57 2019 -0400

    Create Get-ZASiteTopology Function and Tests

commit bcc5c49b71
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:18:16 2019 -0400

    Create Get-ZASite Function and Tests

commit ee7770e1e9
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:17:41 2019 -0400

    Create Get-ZAAlertAggregation Function and Tests

commit 58a3500ddd
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:16:43 2019 -0400

    Create Get-ZAAlert Function and Tests

commit 50354f10cf
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:13:31 2019 -0400

    Create ZAMonitoring Function and Tests

commit 04b8b9837b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:12:36 2019 -0400

    Create Get-ZALicense.Tests.ps1

commit ce5a37ceb6
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:08:45 2019 -0400

    Make into an advanced function.

commit 947fbe6468
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:08:06 2019 -0400

    Create Connect-ZertoAnalytics.Tests.ps1

commit 1ef5d63cf7
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:07:58 2019 -0400

    Create Invoke-ZARestRequest.Tests.ps1

commit 14424c6b51
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Wed Jun 5 14:07:37 2019 -0400

    Add External Help File

commit b22481e3b0
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:33 2019 -0400

    Create Get-ZALicense.ps1

commit a1a4a78820
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:20 2019 -0400

    Create Connect-ZertoAnalytics.ps1

commit ca5d357d2f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Mon Jun 3 07:11:15 2019 -0400

    Create Invoke-ZARestRequest.ps1

commit 1c630edc8e
Merge: 23ad240 5713fcd
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sat Jun 1 22:51:50 2019 -0400

    Merge pull request #32 from ZertoPublic/PowerShellBackPort

    PowerShell back port

commit 5713fcd02c
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 17:03:26 2019 -0400

    Getting Ready for Release to PSGallery

commit b18da2e79b
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 17:03:10 2019 -0400

    Refelect 5.1 Update

commit 6b73f0bcce
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 10:32:12 2019 -0400

    Update GitHub URLs to Reflect ZertoPublic Project

commit 8763be768d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 10:01:50 2019 -0400

    Update AzPipelines to run PowerShell 5.1 Tests

commit fa043df02f
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 09:39:54 2019 -0400

    Request Logic to support Windows PowerShell

    Added logic needed to support Windows PowerShell including a Certificate Bypass. May move this into a function later to cllean the module a bit.

commit 51064c5d64
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Fri May 31 09:38:48 2019 -0400

    Update Minimum PowerShellVersion to 5.1.0

commit 23ad240a52
Merge: dae010c 2761276
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Tue May 21 09:35:27 2019 -0500

    Merge pull request #31 from ZertoPublic/MoreTests

    Update Get-ZertoLocalSite.Tests.ps1

commit dae010c262
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Mon May 20 08:46:32 2019 -0500

    Update README.md

    Update Build Status to New Project Location

commit 27612761b4
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 17:52:32 2019 -0500

    Update Get-ZertoLocalSite.Tests.ps1

commit 8533cb98bd
Merge: f2ab959 28c3511
Author: Wes Carroll <wcarroll@users.noreply.github.com>
Date:   Sun May 19 17:33:03 2019 -0500

    Merge pull request #30 from wcarroll/Hackathon

    Hackathon

commit 28c35115eb
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 17:01:36 2019 -0500

    Update Get-ZertoDatastore.Tests.ps1

commit 2465305ddf
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 16:52:44 2019 -0500

    Update Get-ZertoAlert.Tests.ps1

commit 4de751bc3d
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 16:52:36 2019 -0500

    Typo Fix

commit 98aedca373
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 16:24:39 2019 -0500

    Update Parameter Tests

commit f2ab959b93
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 15:35:15 2019 -0500

    Add Parameter Tests

commit 17275b1191
Author: Wes Carroll <wcarroll@oceanbeachlife.com>
Date:   Sun May 19 15:34:55 2019 -0500

    Move Move Logic to Process Block
2022-02-25 09:17:43 -05:00
Mitchell Enfinger 4b1506f962 forgot to include the test changes 2022-02-16 14:23:38 -05:00
Mitchell Enfinger 55b6614a69 added lines for multiple CPUs 2022-02-16 13:51:46 -05:00
Robert Groux f9291ed933 Fixing Remove-ZertoVpgVM 2021-08-06 16:25:59 -05:00
Wes Carroll a2d724a54c Merge pull request #114 from ZertoPublic/wcarroll/where-fix
Wcarroll/where fix
2020-12-16 13:14:46 -05:00
Wes Carroll f06157c75e Bump Version for Release 2020-12-16 13:10:02 -05:00
Wes Carroll d413374c09 CHANGLOG Updates 2020-12-16 09:43:22 -05:00
Wes Carroll 1513cd4f4b Update Synopsis 2020-12-16 09:42:48 -05:00
Wes Carroll 1daac508b2 Update SiteId Lookup Method 2020-12-16 09:42:23 -05:00
Wes Carroll a22d9e3416 Merge pull request #113 from ZertoPublic/wcarroll/issue112
SiteId Query to VirtualizationSites Fixes #112
2020-12-09 21:57:36 -05:00
Wes Carroll 06e81b46d6 Update CHANGELOG for #112 2020-12-09 17:09:53 -05:00
Wes Carroll af33715f02 SiteId Query to VirtualizationSites Fixes #112 2020-12-09 16:13:50 -05:00
Wes Carroll 912bca0f9c Merge pull request #111 from ZertoPublic/export_bug_fix
Export bug fix
2020-10-19 19:10:37 -04:00
Wes Carroll 4ac951607b Add required Mock 2020-10-19 18:43:13 -04:00
Wes Carroll d3d01f892f Bump Version 2020-10-19 18:35:30 -04:00
Wes Carroll 84b7922156 Update CHANGELOG 2020-10-19 18:24:08 -04:00
Wes Carroll 0eaf89608b Clean up VPG Settings Identifier 2020-10-19 18:22:10 -04:00
Wes Carroll 50e03b36f5 Merge pull request #110 from ZertoPublic/Release
Release into Master
2020-09-08 08:55:07 -04:00
Wes Carroll 4531d2d53b Merge branch 'release_prep' into Release 2020-09-08 08:22:32 -04:00
Wes Carroll e6e6be9ede Bump Version 2020-09-08 08:21:10 -04:00
Wes Carroll 5c2dd620d8 Update for Release Notes 2020-09-08 08:20:29 -04:00
Wes Carroll a5a91febcf Merge pull request #109 from jonsouzerto/master
Fixed issue 108
2020-09-04 10:28:45 -04:00
jonsouzerto bb5dbaa0d4 Update CHANGELOG.md
Added fix information
2020-09-03 12:50:49 -04:00
jonsouzerto e6b5777e64 Updated recovery host key
Attempting to resolve issue 108
2020-09-03 12:45:35 -04:00
Wes Carroll ddee165575 Merge pull request #107 from gdbarron/invoke-move-updates
Invoke-ZertoMove parameter, pipeline, and restructuring updates
2020-08-28 13:48:34 -04:00
Brownstein f0279633dd add missing .IsPresent for switch value 2020-08-28 13:43:22 -04:00
Brownstein 139e52f3e2 add new parameter to test 2020-08-27 15:28:01 -04:00
Brownstein eea6e95988 update test and help files 2020-08-27 15:08:28 -04:00
Brownstein 0630cbb20e new param sets, pipeline input 2020-08-21 21:04:15 -04:00
Wes Carroll 682750fc6d Merge pull request #106 from ZertoPublic/Release
Merge pull request #105 from ZertoPublic/master
2020-08-20 13:44:03 -04:00
Wes Carroll 9dc9aa92d0 Merge pull request #105 from ZertoPublic/master
Release 1.5.0
2020-08-20 13:31:28 -04:00
Wes Carroll 23e0b8a665 Prepping for next release 2020-08-20 13:25:37 -04:00
Wes Carroll ae53dcd4d2 Merge pull request #104 from ZertoPublic/wcarroll/issue103
Update target host validation
2020-08-20 12:39:21 -04:00
Wes Carroll ced5671ab2 Update target host validation 2020-08-20 12:29:40 -04:00
Wes Carroll cb528df3d4 Merge pull request #102 from ZertoPublic/Add-VMToVpg
Add-ZertoVpgVm and Remove-ZertoVpgVm
2020-08-05 09:41:09 -04:00
Wes Carroll c91d53ecad Update with changes 2020-08-05 09:34:35 -04:00
Wes Carroll 8d8cb58558 Remove-ZertoVpgVm Tests 2020-08-05 08:47:17 -04:00
Wes Carroll 2dad347544 Remove-ZertoVpgVm Help 2020-08-05 08:41:55 -04:00
Wes Carroll 6f798fd96a Update VM Filter Method 2020-08-05 08:22:19 -04:00
Wes Carroll 649e7413a7 Fix URL typo 2020-08-05 07:46:11 -04:00
Wes Carroll af6e81267b Add Online Help URI 2020-08-05 07:45:55 -04:00
Wes Carroll b6d8083b69 Remove-ZertoVpgVm update 2020-08-04 22:05:35 -04:00
Wes Carroll 9d4b4d3533 Starting Remove-VpgVm 2020-08-04 17:42:37 -04:00
Wes Carroll 510f0b9ed7 Add-ZertoVpgVm Tests 2020-08-04 12:31:37 -04:00
Wes Carroll 9561936be7 Update Help Files 2020-08-04 11:46:12 -04:00
Wes Carroll 961eafb945 Update Event Documentation 2020-08-04 11:44:36 -04:00
Wes Carroll aa73534d7f Create Add-ZertoVpgVm Help File 2020-08-04 11:42:41 -04:00
Wes Carroll 56bbe59ea7 Always return the Vpg Settings Identifier 2020-08-04 11:23:37 -04:00
Wes Carroll 5f786775dc Verbose Output - VM and VPG name 2020-08-04 11:23:20 -04:00
Wes Carroll 14ef5048e4 Only process unique VM names 2020-08-04 11:22:45 -04:00
Wes Carroll d7e46bd263 Check for existence of Vpg 2020-08-04 10:48:58 -04:00
Wes Carroll c64c82f8bc Add parameter alias 2020-08-04 07:53:15 -04:00
Wes Carroll a59feb2d5f Add switch for vpgName 2020-08-03 21:21:05 -04:00
Wes Carroll d9e1063654 update GitIgnore 2020-08-03 21:13:38 -04:00
Wes Carroll d9e6c74f27 Add parameter aliases 2020-07-31 18:02:00 -04:00
Wes Carroll df82bc26ca Add function Add-ZertoVpgVm 2020-07-31 17:42:28 -04:00
Wes Carroll dbde9aa4c2 Merge pull request #101 from ZertoPublic/master
Merge Current Master to Release Branch
2020-07-08 13:14:52 -04:00
Wes Carroll 7dcb6539a5 Merge pull request #100 from ZertoPublic/wcarroll/prep_release
Prep Release Information
2020-07-08 13:10:34 -04:00
Wes Carroll 3621ddef8d Set Version Numbers 2020-07-08 13:08:49 -04:00
Wes Carroll 5b4a25b66d Merge pull request #98 from ZertoPublic:wcarroll/issue95
Remove zvmLocalInfo Script Scope Variable
2020-07-06 14:45:37 -04:00
Wes Carroll 5a2c01341c Update Changlog for Issue 95 2020-07-06 14:32:32 -04:00
Wes Carroll c477d40364 Remove Mocks that are not required any longer 2020-07-06 14:30:07 -04:00
Wes Carroll 494c45b02c Remove tests for removed variable 2020-07-06 14:26:56 -04:00
Wes Carroll 8318229cf4 Remove Removal of Variable no longer required 2020-07-06 14:26:36 -04:00
Wes Carroll 7427ffe707 Remove operation to set ZvmLocalInfo Variable 2020-07-06 14:26:10 -04:00
Wes Carroll 713c94461c Replace Script Scope LocalSite Info Variable 2020-07-06 14:25:43 -04:00
Wes Carroll 0872f1a655 Merge pull request #97 from ZertoPublic/wcarroll/issue96
Fixes Set-ZertoLicense ShouldProcess issue
2020-07-01 19:11:54 -04:00
Wes Carroll a072905253 Update ChangLog with Issue 96 updates 2020-07-01 17:34:25 -04:00
Wes Carroll 41fddf5f13 Set-ZertoLicense - Fix ShouldProcess error
Fixes #96
2020-07-01 17:09:38 -04:00
Wes Carroll 136d1b2c76 Merge pull request #94 from NScuola/patch-1
Adding port information for pairing v7.5+
2020-07-01 14:12:15 -04:00
NScuola a25bf3adfe Adding port information for pairing v7.5+
Adding port information to example for pairing v7.5+.
2020-07-01 14:06:30 -04:00
Wes Carroll 93c55bdd07 Merge pull request #93 from ZertoPublic/issue_90
Make New-ZertoVpg -RecoverySite parameter case-insensitive
2020-06-23 13:13:40 -04:00
Wes Carroll 5627992a04 Update CHANGELOG 2020-06-23 12:54:03 -04:00
Wes Carroll 7fc7edff86 Update PeerSite Lookup Method 2020-06-23 12:51:33 -04:00
Wes Carroll 6f1e582ceb Merge pull request #92 from ZertoPublic/issue_89
Set New-ZertoVpg Default Parameter Set
2020-06-23 12:40:07 -04:00
Wes Carroll 0f1b4302bb Update CHANGELOG with latest updates 2020-06-22 17:18:55 -04:00
Wes Carroll ea8d6f096d Update Parameter with Proper Names 2020-06-22 17:18:40 -04:00
Wes Carroll ddae22fb9f Specify defaultParameterSetName 2020-06-22 17:18:16 -04:00
Wes Carroll 6903ccc99b Update CHANGELOG 2020-06-22 17:03:32 -04:00
Wes Carroll 7ce6369ad7 Add tests for switches 2020-06-22 16:48:32 -04:00
Wes Carroll 2d453ef608 Put params in correct order 2020-06-22 16:48:31 -04:00
Wes Carroll 363b6e727c Update Param Order Syntax in Help File 2020-06-22 16:48:31 -04:00
Wes Carroll f4c1cf630a Moved Credential to Second Position 2020-06-22 16:48:31 -04:00
Wes Carroll 348fcbd28c Update Help for AutoReconnect switch 2020-06-22 16:48:31 -04:00
Wes Carroll 3000a2b013 Initial auto reconnect 2020-06-22 16:48:31 -04:00
Wes Carroll 52609bf64a Merge pull request #88 from ZertoPublic/wcarroll-patch-1
Added Time Example
2020-06-18 13:26:50 -04:00
Wes Carroll e021a7bab0 Added Time Example
Struggled to find a time example. Added one for future use.
2020-06-18 13:20:10 -04:00
Wes Carroll c3ad8dd415 Merge pull request #87 from ZertoPublic/Refactor-Build
Refactor build
2020-06-11 11:35:16 -04:00
Wes Carroll f81a22ca80 Update Artifact Publish task to latest 2020-06-11 09:24:02 -04:00
Wes Carroll de1a85cecd Add ReleaseNotes.md File Creation 2020-06-10 19:30:50 -04:00
Wes Carroll d3acba3967 Remove Unused Publish Task 2020-06-10 15:54:59 -04:00
Wes Carroll 512d5bbd74 Update Publish Location 2020-06-10 15:52:59 -04:00
Wes Carroll 9ad9cb7f1e Update Build Path for Artifact Utilization 2020-06-10 12:20:44 -04:00
Wes Carroll a55b0cd467 Remove SourceFileTests publish 2020-06-10 09:58:32 -04:00
Wes Carroll aab22cf266 Add Branch to Auto-Build 2020-06-10 09:53:01 -04:00
Wes Carroll 906d35186f Update Required Module Versions 2020-06-10 09:44:27 -04:00
Wes Carroll c7c3428dd5 Update release task to use full build process 2020-06-10 09:44:21 -04:00
Wes Carroll e90d2a23cc Update tests to only show failed 2020-06-10 09:44:16 -04:00
Wes Carroll 925ecaf224 Update default build operation 2020-06-10 09:44:11 -04:00
Wes Carroll 32403ec3e3 Update build script with params 2020-06-10 09:44:04 -04:00
Wes Carroll 73540faeb9 Update Build Paths 2020-06-09 22:34:22 -04:00
Wes Carroll 932262e33a Merge pull request #85 from ZertoPublic/wcarroll-patch-2
Add Username Example
2020-06-09 21:27:49 -04:00
Wes Carroll 1e84f5aea0 Add Username Example
added example with username filter
2020-06-09 15:21:11 -04:00
Wes Carroll 7befc7d21e Merge pull request #84 from ZertoPublic/wcarroll-patch-1
Correct example numbering issue
2020-06-05 12:57:07 -04:00
Wes Carroll cdad0c5e79 Correct example numbering issue 2020-06-05 09:43:48 -04:00
Wes Carroll 291aae9dcd Merge pull request #83 from ZertoPublic/ReleasePrep
Release prep
2020-05-17 11:26:23 -04:00
Wes Carroll f8f0d980d0 Update Unreleased to Release Number 2020-05-17 11:22:12 -04:00
Wes Carroll b72099559c Bump Version 2020-05-17 11:21:56 -04:00
Wes Carroll 6046103da0 Merge pull request #82 from ZertoPublic/Fix-ZertoStartClone
Fix zerto start clone
2020-05-17 11:18:15 -04:00
Wes Carroll cccd45b7fd Update ChangeLog 2020-05-17 11:07:31 -04:00
Wes Carroll 77b7e1c376 Fix Body Creation Method 2020-05-17 11:05:15 -04:00
Wes Carroll 8f735bee62 Correct body creation method 2020-05-17 11:04:41 -04:00
Wes Carroll de505debf9 Merge pull request #81 from ZertoPublic/Invoke-ZertoMoveCommit-Fix
Fix Invoke-ZertoMoveCommit
2020-05-13 10:38:31 -04:00
Wes Carroll bc570e9005 Update Changlog with MoveCommit Changes 2020-05-09 20:52:55 -04:00
Wes Carroll 804a60be77 Update for explicit switches 2020-05-09 20:10:13 -04:00
Wes Carroll 1e678214b1 Update for explicit reverse and keep params 2020-05-09 20:10:13 -04:00
Wes Carroll ba0b12e83c Add accepted values 2020-05-09 20:10:13 -04:00
Wes Carroll b33b07b524 Set Explicit Reverse\Keep Options 2020-05-09 20:10:13 -04:00
Wes Carroll d4b4d1b4d7 Merge pull request #80 from ZertoPublic:Get-ZertoEvent-Fix
Get zerto event fix
2020-05-09 11:04:59 -04:00
Wes Carroll fbe3f4d031 Add Get-ZertoEvent Fix 2020-05-09 10:36:37 -04:00
Wes Carroll 26cfb832a4 Update CHANGELOG.md 2020-05-07 20:49:16 -04:00
Wes Carroll 865ca1dd39 Update Logic to Convert VpgName to VpgIdentifier 2020-05-07 20:21:39 -04:00
Wes Carroll 2887f6d450 Update README.md
Fix link to updated WIKI page
2020-05-07 13:54:14 -04:00
Wes Carroll 5613b97eef Merge pull request #79 from ZertoPublic/PrepRelease
Release Update
2020-05-06 13:00:52 -04:00
Wes Carroll 3a2e8f4ee7 Bump Version 2020-05-06 12:45:09 -04:00
Wes Carroll 380ac5c841 Move Recent Updates to ChangeLog 2020-05-06 12:44:58 -04:00
Wes Carroll c2a0ac9fa0 Update CHANGELOG for Release 2020-05-06 12:44:32 -04:00
Wes Carroll ba2bed6b53 Merge pull request #78 from ZertoPublic/Update-Function-Tests
Update function tests
2020-05-06 09:56:01 -04:00
Wes Carroll 5ec0ddce62 Add general Changes to Changelog 2020-05-06 08:24:28 -04:00
Wes Carroll 83f00e00ee Update the Version Pattern 2020-05-06 08:17:26 -04:00
Wes Carroll 63a1ab928e Update builtfiletests to ensure module is built 2020-05-05 22:13:54 -04:00
Wes Carroll e6ead11891 Update mandatory parameter declaration 2020-05-05 21:59:14 -04:00
Wes Carroll aecd4fd1d5 Updated CHANGELOG with formatting information 2020-05-05 21:25:54 -04:00
Wes Carroll 8dcee4068a Update PSSA Rules for New PSSA Version 2020-05-05 16:30:49 -04:00
Wes Carroll b0d68ea224 Updete to use process block for pipeline 2020-05-05 16:29:56 -04:00
Wes Carroll 22b0da87b9 Update to latest versions of modules 2020-05-05 14:35:29 -04:00
Wes Carroll fc3c08637b Module Release Notes point to GitHub 2020-05-05 14:32:13 -04:00
Wes Carroll 4894084292 Remove RELEASENOTES for CHANGELOG 2020-05-05 14:27:27 -04:00
Wes Carroll 781368398c Update release notes to point to CHANGELOG 2020-05-05 14:26:41 -04:00
Wes Carroll 4271afd5b4 Move historical Release Notes to ChangeLog 2020-05-05 14:11:49 -04:00
Wes Carroll 6c2b029014 Update Parameter Name to work with filter 2020-05-05 13:47:19 -04:00
Wes Carroll e47458b2df Update ReleaseNotes to maintain history 2020-04-30 11:53:55 -04:00
Wes Carroll d38f206824 Update ZVM Headers 2020-04-30 11:11:29 -04:00
Wes Carroll ed6024fe63 Add Tests for Password Update
# Conflicts:
#	Tests/Public/Edit-ZertoVra.Tests.ps1
2020-04-20 17:21:52 -04:00
Wes Carroll 8b213ede25 Merge pull request #77 from ZertoPublic/Pester5Prep
Pester 5 prep
2020-04-20 17:00:00 -04:00
Wes Carroll 6620246e4c Update Method to Grab Path
https://jakubjares.com/2020/04/11/pester5-importing-ps-files/
2020-04-20 16:35:02 -04:00
Wes Carroll 71610ce9fe Pin Pester v4 2020-04-20 16:28:19 -04:00
Wes Carroll fb45693fb1 Pester 5 Prep 2020-04-20 16:28:03 -04:00
Wes Carroll 8578c775dd Merge pull request #76 from ZertoPublic/Refactor-Copy-ZertoVpg
Refactor Copy-ZertoVpg and Add Tests
2020-04-20 16:19:54 -04:00
Wes Carroll b186c561e6 Start of Next Releasenotes 2020-04-20 16:14:41 -04:00
Wes Carroll ae6a80b48d Merge branch 'master' into Refactor-Copy-ZertoVpg 2020-04-20 15:50:13 -04:00
Wes Carroll 9fafe4b58b Make PowerShell Gallery Badge Clickable 2020-04-20 15:34:07 -04:00
Wes Carroll c1b7c490ff Create Function Tests 2020-04-20 15:33:17 -04:00
Wes Carroll 589a3b7d6e Create Mock Data for Tests 2020-04-20 15:33:12 -04:00
Wes Carroll 9913c96d65 Refactor Function 2020-04-20 15:33:05 -04:00
Wes Carroll fe4d8cf4dd Merge pull request #75 from ZertoPublic/ReleasePrep
April Release
2020-04-10 08:14:00 -04:00
Wes Carroll e35939e592 Bump Version 2020-04-09 14:37:38 -04:00
Wes Carroll c422e26903 Update Readme for release 2020-04-09 14:37:27 -04:00
Wes Carroll e37444249e Merge pull request #74 from ZertoPublic/VirtulizationSiteRepos
Add functionality for ZVM 8.0
2020-04-09 13:27:35 -04:00
Wes Carroll 616cdcf7a2 Update Tests for WindowPS 2020-04-09 13:22:57 -04:00
Wes Carroll e7658fcfec Update the version of Pester to latest version 2020-04-09 13:22:42 -04:00
Wes Carroll a306391a14 Fix Filename Case 2020-04-09 12:55:41 -04:00
Wes Carroll 83e9551692 Add tests for function 2020-04-09 12:48:33 -04:00
Wes Carroll 7fbc550390 Add Mocks for Tests 2020-04-09 12:48:04 -04:00
Wes Carroll e3cba682c7 DRY Refactor 2020-04-09 10:37:36 -04:00
Wes Carroll 96b3e65be2 Update RELEASENOTES.md 2020-04-08 15:26:10 -04:00
Wes Carroll d15111a883 Add new LTR API Endpoint
Added new LTR endpoint and help messages to indicate that it will only work with Version 8.0 and above. Also updated help message for backup settings indicating that backup settings only work with 7.5 and below.
2020-04-08 15:19:46 -04:00
Wes Carroll 90434b56a2 Updated for new Repositories endpoint 2020-04-07 17:35:55 -04:00
Wes Carroll 85e60adac1 Merge pull request #73 from ZertoPublic/UpdateServiceAccountPassword
Create function to Update service account password
2020-04-07 10:44:00 -04:00
Wes Carroll 0d6bc39c86 Add an additional example 2020-04-07 10:30:42 -04:00
Wes Carroll ad2073f404 Fixed submitted body formatting 2020-04-07 10:27:22 -04:00
Wes Carroll e12bf9d85e Fix script level variable 2020-04-07 10:18:37 -04:00
Wes Carroll a5f3ad4de0 Update RELEASENOTES.md 2020-04-07 10:05:34 -04:00
Wes Carroll 77fb3c8f67 Fix helpmessage typo 2020-04-07 10:05:31 -04:00
Wes Carroll b2e5fe7b5c Update Set-ZertoUserCredential.md 2020-04-07 10:04:55 -04:00
Wes Carroll f34f21bb85 Create Set-ZertoUserCredential.md 2020-04-07 07:49:13 -04:00
Wes Carroll 536a62f792 Create Set-ZertoUserCredential.Tests.ps1 2020-04-06 17:15:57 -04:00
Wes Carroll df83277c06 Create Set-ZertoUserCredential.ps1 2020-04-06 17:15:52 -04:00
Wes Carroll d55bc3e4b3 Merge branch 'UpdateVraWithPassword' 2020-04-04 10:42:56 -04:00
Wes Carroll 7488e7999f Updated Release notes with current changes 2020-04-04 10:36:51 -04:00
Wes Carroll dcba2b04a9 Added Edit Password Information 2020-04-04 10:30:46 -04:00
Wes Carroll bd94bfe5db Update Help Files 2020-04-04 10:26:56 -04:00
Wes Carroll fb722661a7 Update Edit-ZertoVra.Tests.ps1 2020-04-03 16:51:09 -04:00
Wes Carroll 6121940563 Added ability to updated Host Password 2020-04-03 10:35:44 -04:00
Wes Carroll 64fa03e4ea Merge pull request #71 from ZertoPublic/ZA-Planner
Updates for Zerto Analytics
2020-04-02 19:57:38 -04:00
Wes Carroll 86854442ef Update Online Link to Help 2020-04-02 17:56:57 -04:00
Wes Carroll bc46a512cd Update RELEASENOTES.md 2020-04-02 17:55:04 -04:00
Wes Carroll 0a84246d8e Add parameter validation 2020-04-02 17:44:16 -04:00
Wes Carroll f299aecb9b Add parameter validation 2020-04-02 17:44:00 -04:00
Wes Carroll 646476e74e Remove unused parameter 2020-04-02 17:43:50 -04:00
Wes Carroll 285a82f280 Fix Parameter Test 2020-04-02 17:43:39 -04:00
Wes Carroll fbe9fb2af8 Fix Parameter Test 2020-04-02 17:43:28 -04:00
Wes Carroll 1af70b8c80 Create Tests 2020-04-02 17:38:35 -04:00
Wes Carroll 0ef71c25bb Update Get-ZAPlannerZcasReport.md 2020-04-02 17:16:14 -04:00
Wes Carroll 78e1cdb981 Update Get-ZAPlannerWanReport.md 2020-04-02 17:16:11 -04:00
Wes Carroll 1a66d4e64b Update Get-ZAPlannerStatsReport.md 2020-04-02 17:09:25 -04:00
Wes Carroll 2fef1dbc42 Create Get-ZAProtectedVmReport.md 2020-04-02 16:46:59 -04:00
Wes Carroll b00ededc7f Create Get-ZAProtectedVm.md 2020-04-02 16:44:08 -04:00
Wes Carroll 8e5ced9b87 Create Get-ZAProtectedVmReport.ps1 2020-04-02 15:12:52 -04:00
Wes Carroll 69fb384c89 Create Get-ZAProtectedVm.ps1 2020-04-02 15:12:43 -04:00
Wes Carroll a8b9ec3a00 Update Help File Formatting 2020-04-02 15:12:04 -04:00
Wes Carroll 355be7c1e5 Merge branch 'master' into ZA-Planner 2020-04-02 12:30:58 -04:00
Wes Carroll c94f04de77 Merge pull request #69 from ZertoPublic/MultiClusterSingleDatastore
Updates to Install-ZertoVra
2020-04-02 12:29:36 -04:00
Wes Carroll f4807f94fb Merge branch 'master' into MultiClusterSingleDatastore 2020-04-02 12:25:25 -04:00
Wes Carroll d39777cbb0 Merge pull request #70 from ZertoPublic/AzurePipelinesUpdates
Update build agents.
2020-04-02 12:22:14 -04:00
Wes Carroll 8b43856558 Update build agents. 2020-04-02 12:17:55 -04:00
Wes Carroll 83879a51e7 Update RELEASENOTES.md 2020-04-02 11:54:48 -04:00
Wes Carroll 2d1fb8e4db Update Install-ZertoVra.md 2020-04-02 10:51:05 -04:00
Wes Carroll e774cd861d Update Copy-ZertoVpg.md 2020-04-02 10:48:19 -04:00
Wes Carroll a660aa29b3 Update Common Parameters formatting 2020-04-02 10:48:02 -04:00
Wes Carroll 82458712f0 Update tests for new functionality 2020-04-02 10:46:40 -04:00
Wes Carroll bae9eb9b99 Update function to enable password installation 2020-04-02 10:27:20 -04:00
Wes Carroll 2ea7092b91 Update logic to only allow install to attached devices 2020-04-01 17:14:21 -04:00
Wes Carroll de08f0eece Ensure the right DSId is mapped to the target host. 2020-03-19 17:08:08 -04:00
Wes Carroll 3e980dc195 Add Online Help URI 2020-03-19 16:25:28 -04:00
Wes Carroll eccc5f27f3 Update Get-ZAPlannerNetworkPerformanceReport.md 2020-03-19 09:21:05 -04:00
Wes Carroll e516a24e38 Update Get-ZAPlannerJournalSizeReport.md 2020-03-19 09:19:48 -04:00
Wes Carroll 07f92583f8 Update Single Site URL 2020-03-18 13:57:12 -04:00
Wes Carroll c2f554dca1 Update Get-ZAPlannerSite.md 2020-03-18 13:54:58 -04:00
Wes Carroll 8bd865d83d Create Template Help Files 2020-03-08 22:45:51 -04:00
Wes Carroll 02e50d9cd6 Create Get-ZAPlannerZcasReport.ps1 2020-03-08 17:33:36 -04:00
Wes Carroll 7fc0a5f579 Create Get-ZAPlannerWanReport.ps1 2020-03-08 17:33:31 -04:00
Wes Carroll ce5a64c683 Create Get-ZAPlannerNetworkPerformanceReport.ps1 2020-03-08 17:33:27 -04:00
Wes Carroll 1317a6c039 Create Get-ZAPlannerJournalSizeReport.ps1 2020-03-08 17:33:24 -04:00
Wes Carroll 169e628c7b Remove Debugging Output 2020-03-08 14:57:19 -04:00
Wes Carroll d35d9d7cf4 Create Get-ZAPlannerStatsReport.ps1 2020-03-08 14:40:22 -04:00
Wes Carroll a891a4914d Create Get-ZAPlannerSite.ps1 2020-03-08 14:39:34 -04:00
Wes Carroll 71352cae7b Merge pull request #68 from ZertoPublic/IZRR-to-public
Move RestRequest functions into Public
2020-03-06 17:22:53 -05:00
Wes Carroll b0edd9026f Update RELEASENOTES.md 2020-03-06 14:08:12 -05:00
Wes Carroll 7cde687d70 Create Documentation for Newly Public Functions 2020-03-06 13:42:58 -05:00
Wes Carroll 569d9e264c Update ZertoRestRequest and associated Tests 2020-03-06 13:42:39 -05:00
Wes Carroll 40331c26f9 Update ZARestRequest and associated tests. 2020-03-06 13:42:20 -05:00
Wes Carroll 526093afc6 Fix the Tests extension 2020-03-06 13:31:59 -05:00
Wes Carroll dc4dd1ad05 Move IZRR function to public 2020-03-06 10:40:21 -05:00
Wes Carroll 779ee1415e Move IZRR to public 2020-03-06 10:38:41 -05:00
Wes Carroll 13592df6aa Move ZARestRequest to Public Function 2020-03-06 10:33:12 -05:00
Wes Carroll fad3ca0e27 Update RELEASENOTES.md 2020-03-06 10:01:17 -05:00
Wes Carroll 52782aa1e5 Merge pull request #67 from ZertoPublic/Refactor-GetVpg
Refactor Get-ZertoVpg
2020-03-06 09:11:10 -05:00
Wes Carroll bc02e796d6 Refactor for DRY 2020-03-05 21:43:52 -05:00
Wes Carroll 4c32bbe057 Update to PwSh Version 7 2020-03-05 21:43:32 -05:00
Wes Carroll cc9e53ac44 Merge branch 'fix-typos' 2020-03-02 10:30:12 -05:00
Wes Carroll 37165e18a7 Typo Correction Update 2020-03-02 10:00:45 -05:00
Wes Carroll 772848beef Updated help file to reflect typo correction 2020-03-02 09:53:55 -05:00
Wes Carroll 18185612bb Fixed recovery switch typo 2020-03-02 09:51:23 -05:00
Wes Carroll ecab2500c7 Merge pull request #65 from ZertoPublic/checkpoint-refactor
Checkpoint refactor
2020-03-02 09:46:34 -05:00
Wes Carroll fde7f67e45 Update RELEASENOTES.md 2020-03-02 09:41:09 -05:00
Wes Carroll e19f9b34f5 Update function to allow pipeline operations 2020-02-28 08:15:53 -05:00
Wes Carroll a36a7cb37a Cleanup documentation 2020-02-28 08:15:15 -05:00
Wes Carroll 1e80bb06fb Merge pull request #63 from ZertoPublic/ExportNicUpdate
Update Export and Import VpgNicSetting functions
2019-12-22 11:01:27 -05:00
Wes Carroll 4c98b75134 Update RELEASENOTES.md 2019-12-22 10:48:07 -05:00
Wes Carroll a7efc7c717 Merge branch 'master' into ExportNicUpdate 2019-12-22 10:37:44 -05:00
Wes Carroll 02f1c89d86 Merge pull request #62 from ZertoPublic/RecoveryReport
Remove -VpgIdentifier Parameter from Get-ZertoRecoveryReport function
2019-12-22 10:35:35 -05:00
Wes Carroll 5b9243a02f Updated releasenotes with changes 2019-12-22 10:16:27 -05:00
Wes Carroll 1962dda15c Remove vpgIdentifier Parameter
vpgIdentifier Parameter as added as a parameter by mistake. The API does not accecpt this as a filter.
2019-12-22 10:07:17 -05:00
Wes Carroll 801553178e Update Online Help Link 2019-12-20 22:56:20 -05:00
Wes Carroll 6c92dff447 Update Description with new logic 2019-12-20 22:56:04 -05:00
Wes Carroll 003396998c Eliminate Blank Output 2019-12-20 21:09:12 -05:00
Wes Carroll 05783a1f37 Update Import Logic 2019-12-19 18:49:13 -05:00
Wes Carroll 270470f858 Update Nic Object Logic 2019-12-18 13:06:11 -05:00
Wes Carroll 579ba7a063 Merge pull request #59 from ZertoPublic/PrepRelease
Prep release
2019-12-01 17:15:24 -05:00
Wes Carroll 2cb35165a9 Update README 2019-12-01 17:09:57 -05:00
Wes Carroll 82cf4cb732 Bump Version for Release 2019-12-01 17:05:53 -05:00
Wes Carroll 9d21eb6409 Format Release Notes 2019-12-01 17:05:40 -05:00
Wes Carroll abadc86ae8 Merge pull request #58 from ZertoPublic/FoT-Fix
Fixes Failover Test function
2019-12-01 17:01:53 -05:00
Wes Carroll f094263882 Update RELEASENOTES.md 2019-11-28 10:55:59 -05:00
Wes Carroll c47614727a Fix Verbose Typo 2019-11-28 10:41:26 -05:00
Wes Carroll 7cad7eaf75 Merge pull request #56 from ZertoPublic/CopyVpgBugFix
Fix Bug when Adding Additional VMs
2019-11-08 08:32:13 -05:00
Wes Carroll d6862f75d1 Fix Bug when Adding Additional VMs 2019-11-07 22:35:40 -05:00
Wes Carroll 5b8a89e1a3 Merge pull request #55 from ZertoPublic/CloneVPG
Implement Clone VPG Function
2019-11-07 21:45:27 -05:00
Wes Carroll d6562de9bf Update for Copy-ZertoVpg 2019-11-07 21:37:03 -05:00
Wes Carroll cdae203993 Fix Documentation Formatting 2019-11-07 17:44:06 -05:00
Wes Carroll 213b6029e4 Create Documentation 2019-11-07 17:43:40 -05:00
Wes Carroll 11ab03be0a Create Tests 2019-11-07 17:43:29 -05:00
Wes Carroll 5f978d7b1a Fix AddVM Logic 2019-11-07 17:43:18 -05:00
Wes Carroll 5c76c4c58c Merge pull request #53 from ZertoPublic/wcarroll-patch-1
Update Connect-ZertoServer.md
2019-11-04 16:20:49 -05:00
Wes Carroll 8b3a3b3b0b Update Connect-ZertoServer.md 2019-11-04 16:20:31 -05:00
Wes Carroll 63d56cf862 Merge branch 'CloneVPG' of https://github.com/wcarroll/ZertoApiWrapper into CloneVPG 2019-10-25 14:10:09 -04:00
Wes Carroll 10785df8a9 Create Copy-ZertoVpg Function 2019-10-25 14:09:00 -04:00
Wes Carroll 8a1593ceba Merge pull request #52 from ZertoPublic/EvacuateHost
Implement Evacuate VRA Function
2019-10-25 14:03:26 -04:00
Wes Carroll 1ca3d6704b Update Release Notes for Evacuate Function 2019-10-25 13:49:59 -04:00
Wes Carroll b4a7df970c Correct VraIdentifier Property 2019-10-24 13:51:26 -04:00
Wes Carroll 3d8acf03f6 Update Tests to include set counts 2019-10-24 13:50:52 -04:00
Wes Carroll 07de073bf1 Create Invoke-ZertoEvacuateVra.Tests.ps1 2019-10-24 07:25:38 -04:00
Wes Carroll 7641d28307 Add parameter validation 2019-10-23 10:00:42 -04:00
Wes Carroll 30422d0421 Create Invoke-ZertoEvacuateVra.md 2019-10-23 09:52:09 -04:00
Wes Carroll 4a0885f731 Fix Help Message Typo 2019-10-22 13:35:49 -04:00
Wes Carroll 28d66806a5 Add ExternalHelp Def 2019-10-22 13:31:10 -04:00
Wes Carroll 42b923cef5 Create EvacuateVra Function 2019-10-22 13:26:10 -04:00
Wes Carroll 5984bc93c9 Create Copy-ZertoVpg Function 2019-10-12 22:26:13 -04:00
Wes Carroll 528bc66bcd Merge pull request #49 from ZertoPublic/New-Token
Add Function to Obtain a Pairing Token
2019-10-08 12:45:15 -04:00
Wes Carroll e706470395 Add New-ZertoPairingToken to Release notes. 2019-10-08 12:37:11 -04:00
Wes Carroll 29a79bbb92 Correct extension case. 2019-10-08 12:31:34 -04:00
Wes Carroll f907acd14a Create New-ZertoPairingToken.md 2019-10-07 11:23:24 -04:00
Wes Carroll 90a17045af Create PairingToken.Json 2019-10-07 11:23:19 -04:00
Wes Carroll e1ba8412ff Create New-ZertoPairingToken.Tests.ps1 2019-10-07 11:23:13 -04:00
Wes Carroll 0a90d51735 Create New-ZertoPairingToken.ps1 2019-10-07 11:23:10 -04:00
Wes Carroll 9d34086e40 Merge pull request #48 from ZertoPublic/75Update
Update to add token parameter to Add-ZertoPeerSite
2019-10-04 17:01:37 -04:00
Wes Carroll 842c7ceeec Added release notes for this update. 2019-10-03 16:54:56 -04:00
Wes Carroll d78fc28b1c Add ShouldProcess support to help file. 2019-10-03 14:33:17 -04:00
Wes Carroll 28fb42d56a Update documentation for token parameter and example. 2019-10-03 14:33:01 -04:00
Wes Carroll 0657607f3a Update Tests to New format and add token parameter tests 2019-10-03 14:32:36 -04:00
Wes Carroll 32f6a6eebc Update function to use new token parameter 2019-10-03 14:32:05 -04:00
Wes Carroll 6cc2e8d61d Correct Example Number Typo 2019-09-04 15:45:17 -04:00
Wes Carroll b9598e7e0b Add Aug Release in recent updates. 2019-08-01 14:11:59 -04:00
Wes Carroll a9ea273d55 Bump Version for Release 2019-08-01 11:51:04 -04:00
Wes Carroll f5c81a0766 Update RELEASENOTES.md 2019-08-01 11:50:46 -04:00
Wes Carroll 3a8e742aad Merge pull request #44 from ZertoPublic/NewVpgBugFix
Update method to add VMs to Object
2019-07-30 10:22:36 -04:00
Wes Carroll 7b07fb0fd7 Update method to add VMs to Object 2019-07-29 08:50:25 -04:00
Wes Carroll a4e3961bd7 Merge pull request #42 from ZertoPublic/UpdateTests
Update Testing Methods
2019-07-26 11:13:41 -04:00
Wes Carroll 551eac5d5a Update release notes for testing changes 2019-07-26 11:06:07 -04:00
Wes Carroll 916fbb6c4c Add Parameter Validation Tests 2019-07-26 08:36:00 -04:00
Wes Carroll 5c2e16d5c6 Add Parameter Validation 2019-07-26 08:36:00 -04:00
Wes Carroll 8b0def7c50 Update Parameter Tests 2019-07-26 08:36:00 -04:00
Wes Carroll 73884ef022 Update Parameter Tests 2019-07-26 08:36:00 -04:00
Wes Carroll fd1619351e Update Parameter Tests 2019-07-26 08:36:00 -04:00
Wes Carroll 4e7d30ef33 Add NullOrEmpty validation test 2019-07-26 08:35:59 -04:00
Wes Carroll 2769489939 Create Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll baf6aa50ee Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll c96836c000 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll 51a1e0fb03 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll c6b37c24a6 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll 1d6c2289e8 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll ad6b154d85 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll 28fabd592c Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll e751202010 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll b5a637fe60 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll b294f3e6ad Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll 1be09bd734 Add Parameter Tests 2019-07-26 08:35:59 -04:00
Wes Carroll e07b99613e Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll 6a924067c9 Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll d2eddea4bc Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll 5e12656a4a Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll 96803e1ad5 Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll 79542e8f7f Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll c8da651200 Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll c578ec428e Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll 6bc6f902fd Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll fc3a2a0193 Add Parameter Tests 2019-07-26 08:35:58 -04:00
Wes Carroll aaa505c790 Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll 7fe361dba7 Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll 356572a1f8 Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll 878622d3e2 Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll c83462d03c Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll ba1e1c309e Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll 21bc81b0ec Add Parameter Tests 2019-07-26 08:35:57 -04:00
Wes Carroll 8267474d8a Update Mandatory Setting for DatastoreId 2019-07-26 08:35:57 -04:00
Wes Carroll fee7cd9723 Add Parameter Validation Tests 2019-07-26 08:35:57 -04:00
Wes Carroll efea494475 Update Parameter Counts 2019-07-26 08:35:56 -04:00
Wes Carroll 9be00e68b1 Update to new test format 2019-07-26 08:35:56 -04:00
Wes Carroll 928d6ef4a1 Update tests to new format 2019-07-26 08:35:56 -04:00
Wes Carroll e1720dd4f7 Update test description 2019-07-26 08:35:56 -04:00
Wes Carroll 202c865fe8 Update tests to new format 2019-07-26 08:35:56 -04:00
Wes Carroll 6df14f7a8d Parameter Count Test 2019-07-26 08:35:56 -04:00
Wes Carroll 5213614299 Add Parameter count test 2019-07-26 08:35:56 -04:00
Wes Carroll a39f2638d1 Update to new test format 2019-07-26 08:35:56 -04:00
Wes Carroll 37016076fd Update to the new format 2019-07-26 08:35:56 -04:00
Wes Carroll c05a527982 Update tests to new format 2019-07-26 08:35:56 -04:00
Wes Carroll ff54a92f92 Fix function call var 2019-07-26 08:35:55 -04:00
Wes Carroll b82912605e Update tests to new format 2019-07-26 08:35:55 -04:00
Wes Carroll 3e3a433843 Update tests to new format 2019-07-26 08:35:55 -04:00
Wes Carroll 047e701f55 Update tests to new format 2019-07-26 08:35:55 -04:00
Wes Carroll 6b1486b74d Update Tests to new format 2019-07-26 08:35:55 -04:00
Wes Carroll 213329801a Update Tests to New Format 2019-07-26 08:35:55 -04:00
Wes Carroll 55fb683dc3 Update Tests to TestCases 2019-07-26 08:35:55 -04:00
Wes Carroll 075a78436d Add Mock Data Files 2019-07-26 08:35:54 -04:00
Wes Carroll a6d81aca44 Refactor Tests 2019-07-26 08:35:54 -04:00
Wes Carroll 9f2a6c42cd Change error to Throw 2019-07-26 08:35:54 -04:00
Wes Carroll a78f827804 Add Dhcp VRA Mock 2019-07-26 08:35:54 -04:00
Wes Carroll a526045662 Update Map Function Call 2019-07-26 08:35:54 -04:00
Wes Carroll 6a6b073ada Redirect Invoke Output to Null 2019-07-26 08:35:54 -04:00
Wes Carroll b11c497ead Update Exclude Rules 2019-07-26 08:35:54 -04:00
Wes Carroll 344e7836f9 Update .gitignore 2019-07-26 08:35:54 -04:00
Wes Carroll 1e64d9d7f3 Renamed Function 2019-07-26 08:35:54 -04:00
Wes Carroll 9ab97f2786 Update Test Template for both source and built tests 2019-07-26 08:35:53 -04:00
Wes Carroll 997ab90035 Add Mock File for Single VRA Information 2019-07-26 08:35:53 -04:00
Wes Carroll 86ac714c22 Use TestCases 2019-07-26 08:35:53 -04:00
Wes Carroll 0c4643a76e Change ThrowError to Throw 2019-07-26 08:35:53 -04:00
Wes Carroll 1cfc07260f Remove unused BeforAll Block 2019-07-26 08:35:53 -04:00
Wes Carroll 82dbe7ae48 Update Invoke-ZARestRequest.Tests.ps1 2019-07-26 08:35:53 -04:00
Wes Carroll 670fbdbba8 Change ThrowError to Throw 2019-07-26 08:35:53 -04:00
Wes Carroll 2e6a37bd5f Update Invoke-ZertoRestRequest.Tests.ps1 2019-07-26 08:35:53 -04:00
Wes Carroll 1c17ca3e96 Update Invoke-ZertoRestRequest.ps1 2019-07-26 08:35:53 -04:00
Wes Carroll 6b05af2db4 Update Invoke-ZARestRequest.Tests.ps1 2019-07-26 08:35:53 -04:00
Wes Carroll 40326da05f Update to ThrowErrors when required vars missing 2019-07-26 08:35:53 -04:00
Wes Carroll db91acb770 remove global variables when complete 2019-07-26 08:35:53 -04:00
Wes Carroll 562d1210e6 Update Tests for Mutlirun 2019-07-26 08:35:53 -04:00
Wes Carroll d7ee3eab12 Updating Formatting 2019-07-26 08:35:52 -04:00
Wes Carroll 19b645bccc Exclude Common Parameters in Filter String 2019-07-26 08:35:52 -04:00
Wes Carroll e6c5effe7c Specify InputObject Type 2019-07-26 08:35:52 -04:00
Wes Carroll 235434fe20 Update function to global variable 2019-07-26 08:35:52 -04:00
Wes Carroll dd144d3c47 Update to use New-Map helper function 2019-07-26 08:35:52 -04:00
Wes Carroll 4fee466cc8 Add Mocks for New-Map 2019-07-26 08:35:52 -04:00
Wes Carroll f1afbe6748 Create private helper function New-Map 2019-07-26 08:35:52 -04:00
Wes Carroll 5eae4857cf Updating tests for multiuse 2019-07-26 08:35:52 -04:00
Wes Carroll e930f996d6 Add mock files for testing 2019-07-26 08:35:52 -04:00
Wes Carroll 9a010244b4 Update to paths 2019-07-26 08:35:52 -04:00
Wes Carroll 7339366f7d Update Build Pipeline for Additional Tests 2019-07-26 08:35:52 -04:00
Wes Carroll 7f5fb6c1ac Update Build Process Versions and Steps 2019-07-26 08:35:52 -04:00
Wes Carroll 46951b76ba Add missing formatting variable to the Get-ZAVpg function (#41)
* Add missing formatting variable

* Update ReleaseNotes
2019-07-26 08:33:41 -04:00
Wes Carroll 06b6bb09d7 Merge pull request #39 from ZertoPublic/NicExportImport
Bulk NIC Information Export and Import
2019-07-09 14:34:40 -04:00
Wes Carroll ddb639ad6b Update RELEASENOTES.md 2019-07-09 13:29:31 -04:00
Wes Carroll 4d7d1391ff Create function and required supporting docs
Import-ZertoVmNicSetting
2019-07-09 13:12:22 -04:00
Wes Carroll cb991b3d0c Correct On-line Help Link URI 2019-07-09 12:38:02 -04:00
Wes Carroll 80c82b99e0 Update to use Export-CSV 2019-07-09 11:48:21 -04:00
Wes Carroll 90cf88b5cb Update ZertoApiWrapper.build.ps1 2019-07-08 13:38:48 -04:00
Wes Carroll ef1584032e Create function and required associated docs
Export-ZertoVmNicSetting
2019-07-08 13:22:18 -04:00
Wes Carroll 1fd92008ac Update Remove-ZertoVpgSettingsIdentifier.md 2019-07-08 12:55:31 -04:00
Wes Carroll 0a2e6974f0 Create Function and related files
Remove-ZertoVpgSettingsIdentifier
2019-07-08 11:59:50 -04:00
Wes Carroll b2c3548d01 Merge pull request #37 from ZertoPublic/ZATokenCheck
Add a Token Check to the Invoke-ZARestRequest Private Function
2019-06-25 15:32:27 -04:00
Wes Carroll 0b1f2c4d1b Update psd1 to export all functions
This will not happen in built releases, but just for in-house testing scenarios.
2019-06-25 14:02:07 -04:00
Wes Carroll b7d4664d6b Correct Last Action Variable Name 2019-06-25 14:00:40 -04:00
Wes Carroll 44ed5767ea Update Expired Token Error Message 2019-06-25 08:30:54 -04:00
Wes Carroll 83649fb72a Add information to release notes. 2019-06-24 12:47:50 -04:00
Wes Carroll 9d579a5785 Update VSCode settings 2019-06-24 12:42:23 -04:00
Wes Carroll ad8f06c6e1 Add Logic for token tests 2019-06-24 12:42:10 -04:00
Wes Carroll 148b33c1e3 Add Issue and PR Templates 2019-06-19 17:03:23 -04:00
Wes Carroll a8025f4be1 Fix Install CodeBlock 2019-06-17 09:18:04 -04:00
Wes Carroll 9c16c2c6e2 Fix CodeBlock Formatting 2019-06-17 09:14:10 -04:00
justin 7e58672bc2 Merge pull request #2 from wcarroll/master
update fork from origin
2019-05-02 15:45:54 -04:00
justin 34f2f937aa Merge branch 'master' of https://github.com/recklessop/ZertoApiWrapper 2019-03-19 08:07:14 -04:00
justin f59d0bece4 Merge remote-tracking branch 'upstream/master' 2019-03-19 08:06:55 -04:00
justin 13ee62de6c Merge remote-tracking branch 'upstream/master' 2019-03-17 09:34:33 -04:00
justin 8fd820ff38 Merge pull request #1 from wcarroll/master
updating from wcarroll
2019-03-12 21:29:19 -04:00
295 changed files with 14622 additions and 7223 deletions
+62
View File
@@ -0,0 +1,62 @@
# How to contribute
Contributions to ZertoApiWrapper are highly encouraged and desired.
Below are some guidelines that will help make the process as smooth as possible.
## Getting Started
- Make sure you have a [GitHub account](https://github.com/signup/free)
- Submit a new issue, assuming one does not already exist.
- Clearly describe the issue including steps to reproduce when it is a bug.
- Make sure you fill in the earliest version that you know has the issue.
- Fork the repository on GitHub
## Suggesting Enhancements
I want to know what you think is missing from ZertoApiWrapper and how it can be made better.
- When submitting an issue for an enhancement, please be as clear as possible about why you think the enhancement is needed and what the benefit of it would be.
## Making Changes
- From your fork of the repository, create a topic branch where work on your change will take place.
- To quickly create a topic branch based on master; `git checkout -b my_contribution master`.
Please avoid working directly on the `master` branch.
- Make commits of logical units.
- Check for unnecessary whitespace with `git diff --check` before committing.
- Please follow the prevailing code conventions in the repository.
Differences in style make the code harder to understand for everyone.
- Make sure your commit messages are in the proper format.
```
Add more cowbell to Get-Something.ps1
The functionality of Get-Something would be greatly improved if there was a little
more 'pizzazz' added to it. I propose a cowbell. Adding more cowbell has been
shown in studies to both increase one's mojo, and cement one's status
as a rock legend.
```
- Make sure you have added all the necessary Pester tests for your changes.
- Run _all_ Pester tests in the module to assure nothing else was accidentally broken.
## Documentation
I am infallible and as such my documenation needs no corectoin.
In the highly unlikely event that that is _not_ the case, commits to update or add documentation are highly apprecaited.
## Submitting Changes
- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to the main repository.
- Once the pull request has been reviewed and accepted, it will be merged with the master branch.
- Celebrate
## Additional Resources
- [General GitHub documentation](https://help.github.com/)
- [GitHub forking documentation](https://guides.github.com/activities/forking/)
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
- [GitHub Flow guide](https://guides.github.com/introduction/flow/)
- [GitHub's guide to contributing to open source projects](https://guides.github.com/activities/contributing-to-open-source/)
+31
View File
@@ -0,0 +1,31 @@
<!--- Provide a general summary of the issue in the Title above -->
## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Module version used:
* Operating System and PowerShell version:
* Zerto Virtual Manager Version:
+37
View File
@@ -0,0 +1,37 @@
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
+4 -2
View File
@@ -1,7 +1,9 @@
*.zip
temp/*
Tests/Public/TestResults.xml
Tests/TestResults.xml
BuiltTestResults.xml
SourceTestResults.xml
publish/*
CodeCoverage.xml
scratch
.DS_Store
+6 -1
View File
@@ -1,4 +1,9 @@
{
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.windows": "c:/Program Files/PowerShell/6/pwsh.exe"
"files.insertFinalNewline": true,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"powershell.codeFormatting.preset": "OTBS",
"terminal.integrated.shell.windows": "c:/Program Files/PowerShell/7/pwsh.exe",
"powershell.codeFormatting.addWhitespaceAroundPipe": true
}
+167
View File
@@ -0,0 +1,167 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project is transitioning to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.5.4]
### Zerto Virtual Manager
#### Updated
* Updated `Install-ZertoVra` function [help documentation](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Install-ZertoVra.md) to allow for configuring the number of vCPUs during deployment. Special thanks to @mitchellen for the fix.
## [1.5.3]
### Zerto Virtual Manager
#### Fixed
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/112) where `New-ZertoVpg` would fail when specifying the local site as the target site.
* Updated the method where a Site Identifer is obtained during the `New-ZertoVpg` execution that would occasionally fail on some versions of PowerShell.
#### Updated
* Updated `New-ZertoVpg` function [help documentation](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/New-ZertoVpg.md) to more clearly specify the return value and the requirement to pass it into the `Save-ZertoVpgSetting` function to commit the VPG.
## [1.5.2]
### Zerto Virtual Manager
#### Fixed
* Fixed an issue when attempting to export more than 100 VPGs with the `Export-ZertoVpg` function that would cause an error.
## [1.5.1]
### Zerto Virtual Manager
#### Fixed
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/108) with `New-ZertoVpg` where when specifying a single host as a recovery target, the host identifier was not properly assigned. - Thanks @jonsouzerto!
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/86) with `Invoke-ZertoMoveVpg` where parameters should have been mandatory in certain workflows. - Thanks @gdbarron!
## [1.5.0]
### Zerto Virtual Manager
#### New
* Added `Add-ZertoVpgVm` function to the module. Read the [help file](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Add-ZertoVpgVm.md) for more information.
* Added `Remove-ZertoVpgVm` function to the module. Read the [help file](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Remove-ZertoVpgVm.md) for more information.
#### Fixed
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/103) with `Add-ZertoPeerSite` where there was an incorrect settings validator on the `-targetHost` parameter where it would not accept a hostname.
## [1.4.3]
### Zerto Virtual Manager
#### Updated
* Updated `Connect-ZertoServer` with a `-AutoReconnect` switch to allow the auto reconnection of a session that has timed-out.
* Updated `New-ZertoVpg` to have a Default Parameter Set of `recoveryHostDatastore` should no parameters be passed when calling the function.
* Updated `New-ZertoVpg -recoverySite` parameter to be case-insensitive
#### Fixed
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/96) with `Set-ZertoLicense` so that ShouldProcess functions properly.
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/95) when attempting to connect to an unlicensed site.
## [1.4.2]
### Zerto Virtual Manager
#### Fixed
* Updated `Get-ZertoEvent` to translate a vpg name parameter to a vpgIdentifier per the API documentation
* Updated `Invoke-ZertoMoveCommit` to ensure that when one of the parameter switches is defined, all required parameters are sent to avoid conflicts with parameters passed with the `Invoke-ZertoMove` command.
* Updated `Start-ZertoCloneVpg` to fix an issue where an error would be thrown if an operation specified a subset of VMs to be cloned.
## [1.4.1]
### General
* Removed RELEASENOTES and converted to a CHANGELOG format.
* Updated the build process to follow Semantic Versioning.
* Updated the build process to use the latest Pester Version (4.10.1)
* Updated the build process to use the latest PS Script Analyzer Version (1.19.0)
* Updated the Tests Files to use a more modern method of grabbing the PSScriptPath
### Zerto Virtual Manager
* Refactored `Copy-ZertoVpg` functionality to leverage identifier and name maps and eliminate `where-object` searches.
* Updated `Get-ZertoEvent` parameter to fall in line with the filter parameter name in the API documentation. Moved the old parameter name to an alias to ensure that existing functionality continues to work.
## [1.4.0.20200410]
### Zerto Virtual Manager
* Addressed a reported [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/60) in the `Get-ZertoRecoveryReport` function where the `-VpgIdentifier` parameter was not working. This parameter is not accepted by the API as a valid filter and is ignored. This parameter has been removed from the function.
* Addressed a reported [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/61) where the `Export-ZertoVpgNicSetting` function would not properly execute when run against a VM with no NICs attached.
* In reviewing the `Export-ZertoVpgNicSetting`, a review of the `Import-ZertoVpgNicSetting` was completed and it was determined to update the import logic based on various test cases. Along with this, it is now possible to reset the NIC settings to the default state with the `Import-ZertoVpgNicSetting` command. Please review the [Import-ZertoVpgNicSetting help](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Import-ZertoVmNicSetting.md) to review the updated options and import logic.
* Refactored the `Checkpoint-ZertoVpg` command to allow pipeline input (ByValue and ByProperty) for the VpgName parameter.
* Corrected a parameter typo in the `Get-ZertoVpgSetting` function. The misspelt parameter was added as an alias to ensure any existing scripts using the parameter continue to function.
* Refactored the `Get-ZertoVpg` command to remove repetitive commands and variables that are no longer required.
* Moved `Invoke-ZertoRestRequest` and `Invoke-ZARestRequest` to be public functions. As there become more and more scenarios where there are not prebuilt functions to accomplish complex specialized tasks, it became apparent that these functions could be leveraged to make the experience and workflow easier.
* Updated the `Install-ZertoVra` logic to ensure that the target datastore is available on the target host. There isn't currently any method to validate the target network, but if that becomes available in a later version of the API, the function will be updated.
* Updated the `Install-ZertoVra` function to allow for installation of the VRA using the host password method. Please review the [Install-ZertoVra](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Install-ZertoVra.md) documentation for syntax and examples.
* Updated the `Edit-ZertoVra` function to allow for modification of the associated ESX host password if the need arises. Please review the [Edit-ZertoVra](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Edit-ZertoVra.md) documentation for syntax and examples.
* Added a new function, `Set-ZertoUserCredential`, to allow the updating of the username and password used to connect the Zerto Virtual Manager to the paired hypervisor. Please see the [Set-ZertoUserCredential](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Set-ZertoUserCredential.md) help for additional information.
* With the release of [Zerto 8.0](https://www.zerto.com/zerto-8-0-general-availability/) some additional API endpoints have become available.
* Updated `Get-ZertoVirtualizationSite` to add the `-repository` parameter to enable returning information for LTR repositories.
* Updated `Get-ZertoVpgSetting` to add the `-ltr` parameter to enable returning information for current LTR settings for the selected VPG.
### Zerto Analytics
* Added several functions for the newly added [Zerto Analytics](https://analytics.zerto.com) Planner.
* `Get-ZAPlannerSite` Help can be found here: [Get-ZAPlannerSite](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerSite.md)
* `Get-ZAPlannerStatsReport` Help can be found here: [Get-ZAPlannerStatsReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerStatsReport.md)
* `Get-ZAPlannerJournalSizeReport` Help can be found here: [Get-ZAPlannerJournalSizeReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerJournalSizeReport.md)
* `Get-ZAPlannerNetworkPerformanceReport` Help can be found here: [Get-ZAPlannerNetworkPerformanceReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerNetworkPerformanceReport.md)
* `Get-ZAPlannerWanReport` Help can be found here: [Get-ZAPlannerWanReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerWanReport.md)
* `Get-ZAPlannerZcasReport` Help can be found here: [Get-ZAPlannerZcasReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAPlannerZcasReport.md)
* Created `Get-ZAProtectedVm` and `Get-ZAProtectedVmReport` functions to leverage the newly released Zerto Analytics APIs for this data. Help files can be found here: [Get-ZAProtectedVm](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVm.md) and [Get-ZAProtectedVmReport](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Get-ZAProtectedVmReport.md)
## [1.3.0.20191201]
### Zerto Virtual Manager
* [Zerto version 7.5 has been released.](https://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Release%20Notes.pdf) As part of this release Zerto has added API functionality that requires the following updates.
* A token is now required to pair two sites together. The need is discussed in [Issue 46](https://github.com/ZertoPublic/ZertoApiWrapper/issues/46). To implement this change a `-token` parameter has been added to the `Add-ZertoPeerSite` function.
* A new function has been added; `New-ZertoPairingToken`. This function will allow users to generate a pairing authentication token from the target ZVM to be used in the pairing process. [Issue 47](https://github.com/ZertoPublic/ZertoApiWrapper/issues/47) covers additional details.
* A new function has been added; `Invoke-ZertoEvacuateVra`. This function will allow users to evacuate a target VRA by specifying a Host Name, VRA Name, or VRA Identifier. All VMs currently replicating to the specified location will be migrated to different targets. [Issue 51](https://github.com/ZertoPublic/ZertoApiWrapper/issues/51)
* A function has been added; `Copy-ZertoVpg`. This function will allow users to copy the settings of a single VPG and add new VMs to it. There is currently no customization beyond specifying the VMs to be placed in the newly created VPG. Should additional edits \ updates be required, they should be done post creation. [Issue 54](https://github.com/ZertoPublic/ZertoApiWrapper/issues/54)
* Fixed [issue 57](https://github.com/ZertoPublic/ZertoApiWrapper/issues/57) where a `Start-ZertoFailoverTest` would throw an error complaining about validating the body parameter. This has been fixed and tested against Zerto Virtual Manager 7.5 Update 1 with Windows PowerShell 5.1 and PowerShell Core 6.2.
## [1.2.0.20190801]
### Zerto Virtual Manager
* Added two functions to aid in bulk updating of NIC information for protected VMs. ([Issue 38](https://github.com/ZertoPublic/ZertoApiWrapper/issues/38))
* [Export-ZertoVmNicSetting](https://github.com/ZertoPublic/ZertoApiWrapper/blob/Master/docs/Export-ZertoVmNicSettings.md)
* [Import-ZertoVmNicSetting](https://github.com/ZertoPublic/ZertoApiWrapper/blob/Master/docs/Import-ZertoVmNicSettings.md)
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/43) where a VPG being created with a single VM member would not be parsed by the API correctly using PowerShell 5.1
### Zerto Analytics
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/36) where the Zerto Analytics Rest Request function was not checking for the token before attempting a connection.
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/40) where the `Get-ZAVpg` method would return a 404 error when a `-vpgIdentifier` parameter was specified.
### General Updates
* Updated the way that tests are invoked and parsed to ensure that both source and built module files are tested. This will ensure that what is being shipped passes all tests along with testing of the source files.
* Added additional parameter validation tests to several of the functions. On-going effort to complete stand alone unit testing of each function.
## [Initial Release]
### Zerto Virtual Manager
* Updated `Invoke-ZertoRestRequest` to work in Powershell 5.1 as well as Powershell core
### Zerto Analytics
* Implemented Zerto Analytics Functionality. Please see [Getting Started with Zerto Analytics](https://github.com/ZertoPublic/ZertoApiWrapper/wiki/Getting-Started-with-Zerto-Analytics)
+8 -8
View File
@@ -4,8 +4,8 @@ PowerShell wrapper for Zerto Virtual Manager API
## Current Build Status
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0e31e5cdad534271ac688a82cc3ca17d)](https://app.codacy.com/app/wcarroll/ZertoApiWrapper?utm_source=github.com&utm_medium=referral&utm_content=wcarroll/ZertoApiWrapper&utm_campaign=Badge_Grade_Settings)
[![Build Status](https://dev.azure.com/ZertoPublic/ZertoApiWrapper/_apis/build/status/ZertoPublic.ZertoApiWrapper?branchName=master)](https://dev.azure.com/ZertoPublic/ZertoApiWrapper/_build/latest?definitionId=1&branchName=master)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/ZertoApiWrapper?label=PowerShell%20Gallery%20Downloads)](https://www.powershellgallery.com/packages/ZertoApiWrapper)
## Legal Disclaimer
@@ -20,23 +20,23 @@ This code is still under development! Please use carefully and if you encounter
## Installing the Module
This module can be installed directly from the [PowerShell Gallery](https://www.powershellgallery.com/packages/ZertoApiWrapper) with the following command.
`PS> Install-Module -name ZertoApiWrapper
```PowerShell
PS> Install-Module -name ZertoApiWrapper
```
## Getting Started
* [Getting Started with Zerto Virtual Manager and the ZertoApiWrapper](https://github.com/ZertoPublic/ZertoApiWrapper/wiki/Getting-Stated-with-Zerto-Virtual-Manager)
* [Getting Started with Zerto Virtual Manager and the ZertoApiWrapper](https://github.com/ZertoPublic/ZertoApiWrapper/wiki/Getting-Started-with-Zerto-Virtual-Manager)
* [Getting Started with Zerto Analytics and the ZertoApiWrapper](https://github.com/ZertoPublic/ZertoApiWrapper/wiki/Getting-Started-with-Zerto-Analytics)
## Recent Updates
* June 16th, 2019: Added functionality for Zerto Analytics.
* May 31st, 2019: Implement logic to allow use of this module in both Windows PowerShell 5.1 and PowerShell Core.
* March 15th, 2019: Implement Export and Import Functionality. Please See [Export-ZertoVpg Help](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Export-ZertoVpg.md) and [Import-ZertoVpg Help](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Import-ZertoVpg.md) for assistance. No current pre-seed support.
* March 11th, 2019: Create basic VPG completed. Please see [New-ZertoVpg Help](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/New-ZertoVpg.md)
All recent updates can now be tracked via the [Change Log](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/CHANGELOG.md).
## TODO
* Complete Help Markdown Files
* Support ZVM appliance (different connection flow)
* JFLR Functionality
* Create VPG (Per-VM modification and Backup Settings)
* Edit VPG
-11
View File
@@ -1,11 +0,0 @@
## Initial Release
### Zerto Virtual Manager
* Updated `Invoke-ZertoRestRequest` to work in Powershell 5.1 as well as Powershell core
### Zerto Analytics
* Implemented Zerto Analytics Functionality. Please see [Getting Started with Zerto Analytics](https://github.com/ZertoPublic/ZertoApiWrapper/wiki/Getting-Started-with-Zerto-Analytics)
+70
View File
@@ -0,0 +1,70 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
InModuleScope -ModuleName ZertoApiWrapper {
Context "$global:function::Parameter Unit Tests" {
It "have a mandatory parameter for the Input Object" {
Get-Command $global:function | Should -HaveParameter InputObject -Mandatory -Type PSCustomObject
}
It "Input Object should not accecpt a Null or Empty value" {
$myObj = [PSCustomObject]@{ }
{ Get-Map -InputObject $myObj -Key "Key" -Value "Value" } | Should Throw
{ Get-Map -InputObject $null -Key "Key" -Value "Value" } | Should Throw
{ Get-Map -InputObject "" -Key "Key" -Value "Value" } | Should Throw
}
It "have a mandatory string parameter for the Map Key" {
Get-Command $global:function | Should -HaveParameter Key -Mandatory -Type String
}
It "The Map variable should not accecpt a Null or Empty value" {
$myObj = [PSCustomObject]@{one = 1; two = 2 }
{ Get-Map -InputObject $myObj -Key "" -Value "Value" } | Should Throw
{ Get-Map -InputObject $null -Key $null -Value "Value" } | Should Throw
{ Get-Map -InputObject $myObj -Key 1 -Value "Value" } | Should Throw
}
It "The Value variable should not accecpt a Null or Empty value" {
$myObj = [PSCustomObject]@{one = 1; two = 2 }
{ Get-Map -InputObject $myObj -Key "Key" -Value "" } | Should Throw
{ Get-Map -InputObject $myObj -Key "Key" -Value $null } | Should Throw
{ Get-Map -InputObject $myObj -Key "Key" -Value 1 } | Should Throw
}
It "have a mandatory string parameter for the Map Value" {
Get-Command $global:function | Should -HaveParameter Value -Mandatory -Type String
}
It "should have an Output type of Hashtable" {
(Get-Command $global:function).OutputType.Name | Should -Match "Hashtable"
}
}
Context "$global:function::Function Tests" {
$myObj = Get-Content "$global:here/Mocks/ProtectedVMs.json" | ConvertFrom-Json
BeforeEach {
$MyMap = Get-Map -InputObject $MyObj -Key "vmIdentifier" -Value "vmName"
}
It "Returned object should be a hashtable" {
$myMap | Should -BeOfType Hashtable
}
It "should return a hashtable with 3 entries" {
$myMap.count | Should -Be 3
}
It "should be properly mapped" {
$myMap["vmid.12"] | Should -Be "ExchangeMailbox"
$myMap["vmid.13"] | Should -Be "ExchangeApplication"
$myMap["vmid.14"] | Should -Be "ExchangeWeb"
}
}
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+68 -24
View File
@@ -1,30 +1,74 @@
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
$file = Get-ChildItem "$filePath\$fileName"
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
. $file.FullName
$singleBoolItemTest = @{"BoolItem" = $True}
$oneItemTest = @{"OneItem" = "Test"}
$twoItemTest = @{"OneItem" = "Test"; "SecondItem" = "Yours"}
$boolItemTest = @{"OneItem" = "Test"; "BoolItem" = $true}
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Describe $file.BaseName -Tag Unit {
it "file should exist" {
$file.Fullname | should exist
}
InModuleScope -ModuleName ZertoApiWrapper {
Context "$global:function::Parameter Unit Tests" {
It "has a mandatory hashtable parameter for the filterTable" {
Get-Command $global:function | Should -HaveParameter filterTable -Mandatory -Type Hashtable
}
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file.Fullname -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
It "FilterTable should not accecpt a Null or Empty parameter" {
{ Get-ZertoApiFilter -filtertable (@{ }) } | Should Throw
{ Get-ZertoApiFilter -filtertable "" } | Should Throw
{ Get-ZertoApiFilter -filtertable $null } | Should Throw
}
it "converts bool to text" {
Get-ZertoApiFilter -filtertable $singleBoolItemTest | should -Be "?BoolItem=True"
It "should have an Output type of String" {
(Get-Command $global:function).OutputType.Name | Should -Match "String"
}
}
Context "$global:function::Function Unit Tests" {
BeforeAll {
$singleBoolItemTest = @{"BoolItem" = $True }
$oneItemTest = @{ OneItem = "Test" }
$twoItemTest = @{
OneItem = "Test"
SecondItem = "Yours"
}
$commonParamTest = @{
Debug = $True
ErrorAction = "Stop"
ErrorVariable = "ErrVar"
InformationAction = "Continue"
InformationVariable = "InfoVar"
OutVariable = "OutVar"
OutBuffer = "OutBuff"
PipelineVariable = "PipeVar"
Verbose = $false
WarningAction = "SilentlyContinue"
WarningVariable = "WarnVar"
WhatIf = $True
Confirm = $false
OneItem = "Test"
}
}
It "converts bool to text" {
Get-ZertoApiFilter -filtertable $singleBoolItemTest | Should -Be "?BoolItem=True"
}
It "one item test" {
Get-ZertoApiFilter -filtertable $oneItemTest | Should -Be "?OneItem=Test"
}
It "should ignore CommonParameters" {
Get-ZertoApiFilter -filtertable $commonParamTest | Should -Be "?OneItem=Test"
}
It "should process a filter table with more than one item" {
$returnString = Get-ZertoApiFilter -filtertable $twoItemTest
$returnString | Should -match "^\?"
$returnString | Should -match "&"
$returnString | Should -match "OneItem=Test"
$returnString | Should -match "SecondItem=Yours"
}
}
}
it "one item test" {
Get-ZertoApiFilter -filtertable $oneItemTest | should be "?OneItem=Test"
}
#TODO:: Figure out multi-item tests
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
@@ -1,17 +0,0 @@
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
$file = Get-ChildItem "$filePath\$fileName"
. $file.FullName
Describe $file.BaseName -Tag Unit {
it "file should exist" {
$file.FullName | should exist
}
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file.FullName -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
@@ -1,17 +0,0 @@
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
$file = Get-ChildItem "$filePath\$fileName"
. $file.FullName
Describe $file.BaseName -Tag Unit {
it "file should exist" {
$file.FullName | should exist
}
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file.FullName -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
+15
View File
@@ -0,0 +1,15 @@
[
{
"VMname": "ExchangeMailbox",
"VMIdentifier": "vmid.12"
},
{
"VMName": "ExchangeApplication",
"VmIdentifier": "vmid.13"
},
{
"VMName": "ExchangeWeb",
"VmIdentifier": "vmid.14"
}
]
+69 -51
View File
@@ -1,76 +1,94 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -Leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
It "Is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
Context "$($file.BaseName)::Parameter Unit Tests" {
Context "$global:function::Parameter Unit Tests" {
it "Has a mandatory string parameter for the target host" {
Get-Command $file.BaseName | Should -HaveParameter TargetHost -Mandatory -Type String
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
it "Will not take a non-ip address as a 'TargetHost'" {
{Add-ZertoPeerSite -targetHost 'MyZVMHost' -targetPort '9081'} | should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.266' -targetPort '9081'} | should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1' -targetPort '9081'} | should -Throw
{Add-ZertoPeerSite -targetHost $null -targetPort '9081'} | should -Throw
$ParameterTestCases = @(
@{ParameterName = 'targetHost'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'targetPort'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'token'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
it "Has a non-mandatory string parameter for the target port with default value of 9081" {
Get-Command $file.BaseName | Should -HaveParameter TargetPort -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter TargetPort -Type Int32
Get-Command $file.BaseName | Should -HaveParameter TargetPort -DefaultValue 9081
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
it "Will not take a non-int as a port" {
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort 'string'} | should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort $true} | should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort $null} | should -Throw
It "targetPort Parameter should have a default value of 9081" {
Get-Command $global:function | Should -HaveParameter targetPort -DefaultValue 9081
}
It "Will fail if the specified port is outside of the range 1024 - 65535" {
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort 1023} | Should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort 65536} | Should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort 0} | Should -Throw
{Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort -1} | Should -Throw
It "targetPort Parameter should have a Min value of 1024" {
(Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1024
}
it "Supports 'SupportsShouldProcess'" {
Get-Command $file.BaseName | Should -HaveParameter WhatIf
Get-Command $file.BaseName | Should -HaveParameter Confirm
$file | Should -FileContentMatch 'SupportsShouldProcess'
$file | Should -FileContentMatch '\$PSCmdlet\.ShouldProcess\(.+\)'
It "targetPort Parameter should have a Max value of 65535" {
(Get-Command $global:function).Parameters['targetPort'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 65535
}
It "Supports 'SupportsShouldProcess'" {
Get-Command $global:function | Should -HaveParameter WhatIf
Get-Command $global:function | Should -HaveParameter Confirm
$script:ScriptBlock | Should -Match 'SupportsShouldProcess'
$script:ScriptBlock | Should -Match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "$($file.BaseName)::Function Unit Tests" {
Mock -ModuleName ZertoApiWrapper Invoke-ZertoRestRequest {
return "9a49f42e-2bbd-4bf8-b571-77908a2e5e98.928a122b-1763-4664-ad37-cc00bb883f2f"
Context "Add-ZertoPeerSite::Functional Unit Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
return (Get-Content "$global:here\Mocks\TaskId.txt")
}
it "Returns a string value" {
It "Returns a string value when no Token Passed" {
$results = Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort '9081'
$results | should -Not -BeNullOrEmpty
$results | should -BeOfType "String"
$results | Should -BeExactly "9a49f42e-2bbd-4bf8-b571-77908a2e5e98.928a122b-1763-4664-ad37-cc00bb883f2f"
$results | Should -Not -BeNullOrEmpty
$results | Should -BeOfType "String"
$results | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest
It "Returns a string value when a Token is passed" {
$results = Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort '9081' -token "NotARealTokenString"
$results | Should -Not -BeNullOrEmpty
$results | Should -BeOfType "String"
$results | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
It "Does not return a taskId if '-whatif' is used" {
$results = Add-ZertoPeerSite -targetHost '192.168.1.100' -targetPort '9081' -WhatIf
$results | Should -BeNullOrEmpty
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -Exactly 2
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+53
View File
@@ -0,0 +1,53 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -Leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'vpgSettingsIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'Vm'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'VpgName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Supports 'SupportsShouldProcess'" {
Get-Command $global:function | Should -HaveParameter WhatIf
Get-Command $global:function | Should -HaveParameter Confirm
$script:ScriptBlock | Should -Match 'SupportsShouldProcess'
$script:ScriptBlock | Should -Match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "Add-ZertoPeerSite::Functional Unit Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -42
View File
@@ -1,66 +1,63 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
return "3b687246-ac63-40da-9a59-b99863769eb0.928a122b-1763-4664-ad37-cc00bb883f2f"
return (Get-Content "$global:here\Mocks\TaskId.txt")
}
Mock -ModuleName ZertoApiWrapper -CommandName get-zertovpg {
return @{vpgIdentifier = "dddf2fa8-79e2-4e4f-a83b-f66676afea64"}
Mock -ModuleName ZertoApiWrapper -CommandName get-zertovpg -ParameterFilter { $VpgName -eq "MyVpg" } {
return (Get-Content "$global:here\Mocks\VPGInfo.json" -Raw | ConvertFrom-Json)
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "Has a parameter for the VpgName that is Mandatory" {
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory -Type String
Context "$($global:function)::Parameter Unit Tests" {
It "Has a parameter for the VpgName that is Mandatory" {
Get-Command $global:function | Should -HaveParameter vpgName -Mandatory -Type 'String[]'
}
it "Has a parameter for the CheckpointName that is Mandatory" {
Get-Command $file.BaseName | Should -HaveParameter CheckpointName -Mandatory -Type String
It "Has a parameter for the CheckpointName that is Mandatory" {
Get-Command $global:function | Should -HaveParameter CheckpointName -Mandatory -Type String
}
it "Throws and error when an empty or null checkpointName is specified" {
{Checkpoint-ZertoVpg -vpgName "MyVpg" -checkpointName ""} | Should -Throw
{Checkpoint-ZertoVpg -vpgName "MyVpg" -checkpointName $null} | Should -Throw
It "Throws and error when an empty or null checkpointName is specified" {
{ Checkpoint-ZertoVpg -vpgName "MyVpg" -checkpointName "" } | Should -Throw
{ Checkpoint-ZertoVpg -vpgName "MyVpg" -checkpointName $null } | Should -Throw
}
it "Throws an error when an empty or null vpgName is specified" {
{Checkpoint-ZertoVpg -vpgName "" -checkpointName "MyCheckPoint"} | Should -Throw
{Checkpoint-ZertoVpg -vpgName $null -checkpointName "MyCheckPoint"} | Should -Throw
It "Throws an error when an empty or null vpgName is specified" {
{ Checkpoint-ZertoVpg -vpgName "" -checkpointName "MyCheckPoint" } | Should -Throw
{ Checkpoint-ZertoVpg -vpgName $null -checkpointName "MyCheckPoint" } | Should -Throw
}
it "Does not support 'SupportsShouldProcess'" {
Get-Command $file.BaseName | Should -Not -HaveParameter WhatIf
Get-Command $file.BaseName | Should -Not -HaveParameter Confirm
$file | Should -Not -FileContentMatch 'SupportsShouldProcess'
$file | Should -Not -FileContentMatch '\$PSCmdlet\.ShouldProcess\(.+\)'
It "Does not support 'SupportsShouldProcess'" {
Get-Command $global:function | Should -Not -HaveParameter WhatIf
Get-Command $global:function | Should -Not -HaveParameter Confirm
$script:ScriptBlock | Should -not -match 'SupportsShouldProcess'
$script:ScriptBlock | Should -not -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "$($file.BaseName)::Function Unit Tests" {
Context "$($global:function)::Function Unit Tests" {
it "should return a not null or empty string" {
It "should return a not null or empty string" {
$results = Checkpoint-ZertoVpg -vpgName "MyVpg" -checkpointName "My Checkpoint Name"
$results | should -not -BeNullOrEmpty
$results | should -BeOfType "String"
$results | should -BeExactly "3b687246-ac63-40da-9a59-b99863769eb0.928a122b-1763-4664-ad37-cc00bb883f2f"
$results | Should -not -BeNullOrEmpty
$results | Should -BeOfType "String"
$results | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
It "does not return anything when a invalid VPG is defined" {
$results = Checkpoint-ZertoVpg -vpgName "DoesNotExist" -checkpointName "My Checkpoint Name"
$results | Should -Be "Cannot find VPG named DoesNotExist. Please check the name and try again."
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpg
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -Exactly 2
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpg -Exactly 1
}
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+69 -16
View File
@@ -1,19 +1,72 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
}
Context "$($global:function)::Parameter Unit Tests" {
It "Has a parameter for the Required Credentials that is Mandatory" {
Get-Command $global:function | Should -HaveParameter credential -Mandatory -Type PSCredential
}
}
Context "$($global:function)::Function Unit Tests" {
InModuleScope -ModuleName ZertoApiWrapper {
Mock -CommandName Invoke-ZARestRequest {
return (Get-Content "$global:here\Mocks\ZAToken.json"-Raw | ConvertFrom-Json)
}
$password = 'NotARealPassword' | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object pscredential('NotARealUser', $password)
$results = Connect-ZertoAnalytics -credential $cred
It "Creates a Script Level Hashtable Variable for the ZertoAnalytics Headers" {
$script:zaHeaders | Should -BeOfType Hashtable
}
It "the ZertoAnalytics Headers variable contains 2 items" {
$script:zaHeaders.keys | Should -HaveCount 2
}
It "the ZertoAnalytics Headers variable has an 'Accept' key" {
$script:zaHeaders.keys | Should -Contain 'Accept'
}
It "thh ZertoAnalytics headers variable 'Accept' key should be JSON" {
$script:zaHeaders['Accept'] | Should -match 'application/json'
}
It "the ZertoAnalytics Headers variable has an 'Authorization' key" {
$script:zaHeaders.keys | Should -Contain 'Authorization'
}
It "the ZertoAnalytics Headers variable 'Authorization' key should start with 'Bearer'" {
$script:zaHeaders['Authorization'] | Should -Match '^Bearer '
}
It "Creates a Script Level Variable for the LastActionTime" {
$script:zaLastActionTime | Should -BeOfType Long
}
It "LastActionTime Variable should be in the past" {
$script:zaLastActionTime | Should -BeLessThan (Get-Date).Ticks
}
It "Returns Header Information" {
$results | Should -not -BeNullOrEmpty
$results['Authorization'] | Should -MatchExactly 'Bearer N074r34l70k3n'
$results['Accept'] | Should -Match 'application/json'
}
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZARestRequest -Exactly 1
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+78 -139
View File
@@ -1,203 +1,142 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$userName = "zerto\build"
$password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
$Server = "192.168.1.100"
$zertoPort = "7669"
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -Leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag Unit {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
Context "$($file.BaseName)::Parameter Unit Tests" {
Context "$($global:function)::Parameter Unit Tests" {
it "server vairable has a mandatory String parameter" {
Get-Command $file.BaseName | Should -HaveParameter zertoserver -Mandatory -Type String
It "server vairable has a mandatory String parameter" {
Get-Command $global:function | Should -HaveParameter zertoserver -Mandatory -Type String
}
it "server variable does not accecpt an empty or null input" {
{Connect-ZertoServer -zertoServer $null -credential $credential} | Should -Throw
{Connect-ZertoServer -zertoServer "" -credential $credential} | Should -Throw
It "server variable does not accecpt an empty or null input" {
{ Connect-ZertoServer -zertoServer $null -credential $credential } | Should -Throw
{ Connect-ZertoServer -zertoServer "" -credential $credential } | Should -Throw
}
it "port variable has a non-mandatory String parameter" {
Get-Command $file.BaseName | Should -HaveParameter zertoPort -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter zertoPort -Type String
Get-Command $file.BaseName | Should -HaveParameter zertoPort -DefaultValue "9669"
It "port variable has a non-mandatory String parameter" {
Get-Command $global:function | Should -HaveParameter zertoPort -Not -Mandatory
Get-Command $global:function | Should -HaveParameter zertoPort -Type String
Get-Command $global:function | Should -HaveParameter zertoPort -DefaultValue "9669"
}
it "port variable does not accecpt an empty or null input" {
{Connect-ZertoServer -zertoServer "192.168.1.100" -zertoPort "" -credential $credential} | Should -Throw
{Connect-ZertoServer -zertoServer "192.168.1.100" -zertoPort $null -credential $credential} | Should -Throw
It "port variable does not accecpt an empty or null input" {
{ Connect-ZertoServer -zertoServer "192.168.1.100" -zertoPort "" -credential $credential } | Should -Throw
{ Connect-ZertoServer -zertoServer "192.168.1.100" -zertoPort $null -credential $credential } | Should -Throw
}
it "port variable should fall between 1024 and 65535" {
{Connect-ZertoServer -zertoServer $Server -zertoPort 1023 -credential $credential} | Should -Throw
{Connect-ZertoServer -zertoServer $Server -zertoPort 65536 -credential $credential} | Should -Throw
{Connect-ZertoServer -zertoServer $Server -zertoPort 0 -credential $credential} | Should -Throw
{Connect-ZertoServer -zertoServer $Server -zertoPort -1 -credential $credential} | Should -Throw
It "port variable should fall between 1024 and 65535" {
{ Connect-ZertoServer -zertoServer $Server -zertoPort 1023 -credential $credential } | Should -Throw
{ Connect-ZertoServer -zertoServer $Server -zertoPort 65536 -credential $credential } | Should -Throw
{ Connect-ZertoServer -zertoServer $Server -zertoPort 0 -credential $credential } | Should -Throw
{ Connect-ZertoServer -zertoServer $Server -zertoPort -1 -credential $credential } | Should -Throw
}
it "has a mandatory PSCredential parameter for the credential vairable" {
Get-Command $file.BaseName | Should -HaveParameter credential -Mandatory -Type PSCredential
It "has a mandatory PSCredential parameter for the credential vairable" {
Get-Command $global:function | Should -HaveParameter credential -Mandatory -Type PSCredential
}
it "should require a PSCredentialObject for the credentials" {
{Connect-ZertoServer -zertoServer -credential "MyUsername"} | Should -Throw
{Connect-ZertoServer -zertoServer -credential 1234} | Should -Throw
{Connect-ZertoServer -zertoServer -credential $(@{Username = "zerto\build"; Password = 'SecureString'})} | Should -Throw
It "should require a PSCredentialObject for the credentials" {
{ Connect-ZertoServer -zertoServer -credential "MyUsername" } | Should -Throw
{ Connect-ZertoServer -zertoServer -credential 1234 } | Should -Throw
{ Connect-ZertoServer -zertoServer -credential $(@{Username = "zerto\build"; Password = 'SecureString' }) } | Should -Throw
}
It "has a switch parameter to return the headers" {
Get-Command $global:function | Should -HaveParameter returnHeaders
Get-Command $global:function | Should -HaveParameter returnHeaders -Type Switch
}
It "has a switch parameter to auto reauthorize the session" {
Get-Command $global:function | Should -HaveParameter autoReconnect
Get-Command $global:function | Should -HaveParameter autoReconnect -Type Switch
}
}
InModuleScope ZertoApiWrapper {
Context "$($file.BaseName)::InModuleScope Function Unit Tests" {
InModuleScope -ModuleName ZertoApiWrapper {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
# Attempted to Mock this per the Mock Below and it blew up. Auth Headers Returns a Dictionary
# and does not index the same way when imported from a JSON file. Need addtional investigation.
$xZertoSession = @("e34da0b0-4bc2-4cda-b316-0384e35bdca5")
$Headers = @{'x-zerto-session' = $xZertoSession }
$results = @{'Headers' = $Headers }
return $results
}
$server = '192.168.1.100'
$userName = "zerto\build"
$password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
Context "$($global:function)::InModuleScope Function Unit Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
$xZertoSession = @("7ecf544d-e7ed-4108-86f3-fb355c51cdfa")
$Headers = @{'x-zerto-session' = $xZertoSession}
$results = @{'Headers' = $Headers}
return $results
BeforeAll {
$server = '192.168.1.100'
$password = ConvertTo-SecureString -String "NotARealPassword" -AsPlainText -Force
$credential = New-Object pscredential('NotARealUser', $password)
$now = $(Get-Date).ticks
Connect-ZertoServer -zertoServer $server -credential $credential
}
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoLocalSite {
$results = @{
BandwidthThrottlingInMBs = -1
ContactEmail = "vSphere-Site01@zerto.com"
ContactName = "vSphere-Site01@zerto.com"
ContactPhone = "066-6666666"
IpAddress = "192.168.200.1"
IsReplicationToSelfEnabled = $True
Link = @{
href = "https://192.168.24.1:7669/v1/localsite"
identifier = "928a122b-1763-4664-ad37-cc00bb883f2f"
rel = $null
type = "LocalSiteApi"
}
Location = "vSphere-Site01"
SiteName = "vSphere-Site01 at Zerto"
SiteType = "VCenter"
UtcOffsetInMinutes = -240
Version = "7.0.0"
SiteIdentifier = "928a122b-1763-4664-ad37-cc00bb883f2f"
}
return $results
}
$now = $(Get-Date).ticks
Connect-ZertoServer -zertoServer $server -credential $credential
it "Module Scope zvmServer variable tests" {
It "Module Scope zvmServer variable tests" {
$script:zvmServer | Should -Not -BeNullOrEmpty
$script:zvmServer | Should -Be $server
}
it "Module Scope zvmPort variable tests" {
It "Module Scope zvmPort variable tests" {
$script:zvmPort | Should -Not -BeNullOrEmpty
$script:zvmPort | Should -Be '9669'
}
it "Module Scope zvmLastAction variable tests" {
It "Module Scope zvmLastAction variable tests" {
$script:zvmLastAction | Should -Not -BeNullOrEmpty
$script:zvmLastAction | Should -BeGreaterOrEqual $now
}
it "Module Scope zvmHeaders variable tests" {
It "Module Scope zvmHeaders variable tests" {
$script:zvmHeaders | Should -Not -BeNullOrEmpty
$script:zvmHeaders | Should -BeOfType Hashtable
$script:zvmHeaders.keys.count | Should -BeExactly 2
$script:zvmHeaders | Should -BeOfType PSCustomObject
$script:zvmHeaders.keys.count | Should -BeExactly 3
$script:zvmHeaders.ContainsKey('x-zerto-session') | Should -BeTrue
$script:zvmHeaders.ContainsKey('Accept') | Should -BeTrue
$script:zvmHeaders['x-zerto-session'] | Should -BeOfType String
$script:zvmHeaders['Accept'] | Should -BeOfType String
}
it "Module Scope zvmLocalInfo variable tests" {
$script:zvmLocalInfo | Should -Not -BeNullOrEmpty
$script:zvmLocalInfo | Should -BeOfType Hashtable
$script:zvmLocalInfo['SiteIdentifier'] | Should -BeOfType String
$script:zvmLocalInfo.ContainsKey('SiteIdentifier') | Should -BeTrue
$script:zvmLocalInfo['SiteIdentifier'] | Should -BeOfType String
}
$headers = Connect-ZertoServer -zertoServer $Server -credential $credential -returnHeaders
it "returns a Hashtable with 2 keys" {
It "returns a Hashtable with 2 keys" {
$headers | Should -BeOfType Hashtable
$headers.keys.count | should be 2
$headers.keys.count | Should -Be 3
}
it "return value has a key called 'x-zerto-session'" {
$headers.ContainsKey('x-zerto-session') | should be $true
It "return value has a key called 'x-zerto-session'" {
$headers.ContainsKey('x-zerto-session') | Should -Be $true
}
it "return key 'x-zerto-session' value should be a string" {
$headers['x-zerto-session'] | should -BeOfType "String"
$headers['x-zerto-session'] | Should -BeExactly "7ecf544d-e7ed-4108-86f3-fb355c51cdfa"
It "return key 'x-zerto-session' value should be a string" {
$headers['x-zerto-session'] | Should -BeOfType "String"
$headers['x-zerto-session'] | Should -BeExactly "e34da0b0-4bc2-4cda-b316-0384e35bdca5"
}
it "return value has a key called 'accept'" {
$headers.ContainsKey('accept') | should be $true
It "return value has a key called 'accept'" {
$headers.ContainsKey('accept') | Should -Be $true
}
it "return key 'accept' value should be 'application/json'" {
$headers['accept'] | should be 'application/json'
It "return key 'accept' value should be 'application/json'" {
$headers['accept'] | Should -Be 'application/json'
}
it "should not require a port to be specified" {
It "should not require a port to be specified" {
Connect-ZertoServer -zertoServer $Server -credential $credential
}
it "returns null when -ReturnHeaders is not used" {
It "returns null when -ReturnHeaders is not used" {
Connect-ZertoServer -zertoServer $Server -credential $credential | Should -BeNullOrEmpty
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoLocalSite
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -Exactly 4
}
}
}
<#
Describe "Connect-ZertoServer" -Tag Integration {
it "file should exist" {
"$filePath\$fileName" | should exist
}
it "has a function called Connect-ZertoServer" {
get-command Connect-ZertoServer | should be $true
}
$headers = Connect-ZertoServer -zertoServer $Server -zertoPort $zertoPort -credential $credential -returnHeaders
it "returns a Hashtable with 2 keys" {
$headers.keys.count | should be 2
}
it "return value has a key called 'x-zerto-session'" {
$headers.ContainsKey('x-zerto-session') | should be $true
}
it "return key 'x-zerto-session' value should be a string" {
$headers['x-zerto-session'].gettype().name | should be "String"
}
it "return value has a key called 'accept'" {
$headers.ContainsKey('accept') | should be $true
}
it "return key 'accept' value should be 'application/json'" {
$headers['accept'] | should be 'application/json'
}
Disconnect-ZertoServer
}
#>
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+127
View File
@@ -0,0 +1,127 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
Context "$($global:function)::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'SourceVpgName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'NewVpgName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'VMs'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
}
}
It "Supports 'SupportsShouldProcess'" {
Get-Command $global:function | Should -HaveParameter WhatIf
Get-Command $global:function | Should -HaveParameter Confirm
$script:ScriptBlock | Should -match 'SupportsShouldProcess'
$script:ScriptBlock | Should -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "$($global:function)::Function Unit Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpg -ParameterFilter {
$vpgName -eq "MyVpg"
} {
return (Get-Content "$global:here\Mocks\GetVpg.json" -Raw | ConvertFrom-Json)
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpg -ParameterFilter {
$vpgName -eq "NotAVpg"
} {
return $null
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoUnprotectedVm {
return (Get-Content "$global:here\Mocks\UnprotectedVms.json" -Raw | ConvertFrom-Json)
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoProtectedVm {
return (Get-Content "$global:here\Mocks\ProtectedVms.json" -Raw | ConvertFrom-Json)
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq "vpgSettings/copyVpgSettings"
} {
return (Get-Content "$global:here\Mocks\VpgId.txt")
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq "vpgSettings/9607f923-00a7-477b-8b04-26a386214455/vms"
} {
return $null
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq "vpgSettings/9607f923-00a7-477b-8b04-26a386214455"
} {
return (Get-Content "$global:here\Mocks\CopyVpgSettings.json" -Raw | ConvertFrom-Json)
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Save-ZertoVpgSetting {
return (Get-Content "$global:here\Mocks\TaskId.txt")
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Get-Map -ParameterFilter {
$null -ne $InputObject[0].VpgName
} {
@{
"WindowsBox" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-90"
"CentOS-Test" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-88"
"Application01" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-35"
"sql01-test" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-73"
"jenkins" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-75"
}
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Get-Map -ParameterFilter {
$null -eq $InputObject[0].VpgName
} {
@{
"Win2019Template" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-79"
"Ubuntu01" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-34"
"WinTemplate" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-25"
"sql01-prod" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-87"
"nczvm.nc.lab" = "d809de8e-deb7-45cc-b620-08030a1143e1.vm-30"
}
} -Verifiable
It "Should throw an error when no VPG is found" {
{ Copy-ZertoVpg -SourceVpgName "NotAVpg" -NewVpgName "NewVpg" -VMs 'sql01-prod', 'Ubuntu01' } | Should Throw "Unable to find a VPG with the name:"
}
It "Returns a TaskIdentifier when called correctly" {
Copy-ZertoVpg -SourceVpgName "MyVpg" -NewVpgName "NewVpg" -VMs 'sql01-prod', 'Ubuntu01' | Should -Be "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
It "Should warn when VM is not found" {
$results = Copy-ZertoVpg -SourceVpgName "MyVpg" -NewVpgName "NewVpg" -VMs 'sql01-prod', 'Ubuntu01', 'DoesNotExist' 3>&1
$results[0].ToString() | Should -Match 'Unable to find VM with Name DoesNotExist. Skipping.'
}
Assert-VerifiableMock
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+31 -28
View File
@@ -1,37 +1,40 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
$null
}
Mock -ModuleName ZertoApiWrapper -CommandName Remove-Variable {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
}
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "Does not take any parameters" {
(get-command disconnect-zertoserver).parameters.count | Should -BeExactly 11
Context "$($global:function)::Parameter Unit Tests" {
It "Does not take any parameters" {
(Get-Command disconnect-zertoserver).parameters.count | Should -BeExactly 11
}
}
Context "$($file.BaseName)::Function Unit Tests" {
it "Does not return anything" {
Disconnect-ZertoServer | Should -BeNullOrEmpty
Context "$($global:function)::Function Unit Tests" {
InModuleScope -ModuleName ZertoApiWrapper {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest {
# Attempted to Mock this per the Mock Below and it blew up. Auth Headers Returns a Dictionary
# and does not index the same way when imported from a JSON file. Need addtional investigation.
$xZertoSession = @("e34da0b0-4bc2-4cda-b316-0384e35bdca5")
$Headers = @{'x-zerto-session' = $xZertoSession }
$results = @{'Headers' = $Headers }
return $results
}
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoLocalSite {
return (Get-Content -Path "$global:here\Mocks\LocalSiteInfo.json" -Raw | ConvertFrom-Json)
}
BeforeAll {
Connect-ZertoServer
}
It "Does not return anything" {
Disconnect-ZertoServer | Should -BeNullOrEmpty
}
}
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+76 -160
View File
@@ -1,187 +1,103 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path) -Replace "Tests", "ZertoApiWrapper"
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Mock -ModuleName ZertoApiWrapper Invoke-ZertoRestRequest {
return "8dcfdc8e-e5d2-4ba4-9885-f9eb57d92b14.928a122b-1763-4664-ad37-cc00bb883f2f"
Get-Content $global:here\Mocks\TaskId.txt
}
Mock -ModuleName ZertoApiWrapper Get-ZertoVra {
$vraInformation = @{
DatastoreClusterIdentifier = $null
DatastoreClusterName = $null
DatastoreIdentifier = "840f99fb-4689-2f8b-ea10-2a47a5bb00cc.Prod_Datastore"
DatastoreName = "Prod_Datastore"
HostIdentifier = "840f99fb-4689-2f8b-ea10-2a47a5bb00cc.znest82esxus-1"
HostVersion = 6.5
IpAddress = 192.168.1.100
Link = @{
href = "https://192.168.1.200:7669/v1/vras/2609816293328110468"
identifier = "269816293328110468"
rel = $null
type = "VraApi"
}
MemoryInGB = 3
NetworkIdentifier = "840f99fb-4689-2f8b-ea10-2a47a5bb00cc.network-1"
NetworkName = "Test Network"
Progress = 0
ProtectedCounters = @{
Vms = 0
Volumes = 0
Vpgs = 0
}
RecoveryCounters = @{
Vms = 0
Volumes = 0
Vpgs = 0
}
SelfProtectedVpgs = 0
Status = 0
VraAlerts = @{
VraAlertStatus = 0
}
VraGroup = "default_group"
VraIdentifier = 269816293328110468
VraIdentifierStr = "269816293328110468"
VraName = "VRA-znest82esxus-1"
VraNetworkDataApi = @{
DefaultGateway = "192.168.1.1"
SubnetMask = "255.255.255.0"
VraIpAddress = "192.168.1.100"
VraIpConfigurationTypeApi = "Dhcp"
}
VraVersion = 7.0
}
return $vraInformation
Mock -ModuleName ZertoApiWrapper Get-ZertoVra -ParameterFilter { $vraIdentifier -in @("MyVraIdentifier", "PasswordVraIdentifier") } {
Get-Content $global:here\Mocks\GetSingleVra.json -Raw | ConvertFrom-Json
}
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Mock -ModuleName ZertoApiWrapper Get-ZertoVra -ParameterFilter { $vraIdentifier -eq "DoesNotExist" } {
$null
}
Context "$($File.BaseName)::Parameter Unit Tests" {
Mock -ModuleName ZertoApiWrapper Get-ZertoVra -ParameterFilter { $vraIdentifier -eq "DhcpVraIdentifier" } {
Get-Content $global:here\Mocks\GetDhcpVra.json -Raw | ConvertFrom-Json
}
It "has a mandatory String variable for the vraIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter vraIdentifier -Mandatory -Type String
{Edit-ZertoVra}
Context "$($global:function)::Parameter Unit Tests" {
$ParameterTestCases = @(
@{ParameterName = 'vraIdentifier'; Type = 'String'; Mandatory = $true }
@{ParameterName = 'groupName'; Type = 'String'; Mandatory = $false }
@{ParameterName = 'vraIpAddress'; Type = 'String'; Mandatory = $false }
@{ParameterName = 'defaultGateway'; Type = 'String'; Mandatory = $false }
@{ParameterName = 'subnetMask'; Type = 'String'; Mandatory = $false }
@{ParameterName = 'HostRootPassword'; Type = 'securestring'; Mandatory = $false }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "has a non-mandatory String variable for the Bandwidth Group" {
Get-Command $file.BaseName | Should -HaveParameter groupName -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter groupName -Type String
$StringTestCases = @(
@{ ParameterName = 'vraIdentifier' }
@{ ParameterName = 'groupName' }
)
It "<ParameterName> validates against null or empty values" -TestCases $StringTestCases {
param($ParameterName)
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
it "has a non-mandatory String variable for the staticIp Address" {
Get-Command $file.BaseName | Should -HaveParameter vraIpAddress -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter vraIpAddress -Type String
$IpAddrTestCases = @(
@{ParameterName = 'vraIpAddress' }
@{ParameterName = 'defaultGateway' }
@{ParameterName = 'subnetMask' }
)
It "<ParameterName> validates string for a valid IP Address" -TestCases $IpAddrTestCases {
param($ParameterName)
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateScript] }.Count | Should -Be 1
$attrs.Where{ $_ -is [ValidateScript] }.ScriptBlock | Should -Match '\$_ \-match \[IPAddress\]\$_'
}
it "has a non-mandatory String variable for the default gateway" {
Get-Command $file.BaseName | Should -HaveParameter defaultGateway -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter defaultGateway -Type String
}
it "has a non-mandatory String variable for the subnetmask" {
Get-Command $file.BaseName | Should -HaveParameter subnetMask -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter subnetMask -Type String
}
it "supports WhatIf" {
Get-Command $file.BaseName | Should -HaveParameter WhatIf -Not -Mandatory
}
$cases = `
@{vraIpAddress = "192.168.1.256"}, `
@{vraIpAddress = "192.168.1"}, `
@{vraIpAddress = "String"}, `
@{vraIpAddress = 192.168.1}, `
@{vraIpAddress = 192.168.1.246}, `
@{vraIpAddress = 32}, `
@{vraIpAddress = ""}, `
@{vraIpAddress = $null}
It "IpAddress field require valid IP addresses as a String" -TestCases $cases {
param ( $vraIpAddress )
{Edit-ZertoVra -vraIdentifier "MyVraIdentifier" -vraIpaddress $vraIpAddress} | Should -Throw
}
$cases = `
@{subnetMask = "192.168.1.256"}, `
@{subnetMask = "192.168.1"}, `
@{subnetMask = "String"}, `
@{subnetMask = 192.168.1}, `
@{subnetMask = 192.168.1.246}, `
@{subnetMask = 32}, `
@{subnetMask = ""}, `
@{subnetMask = $null}
It "subnetMask field require valid IP addresses as a String" -TestCases $cases {
param ( $vraIpAddress )
{Edit-ZertoVra -vraIdentifier "MyVraIdentifier" -subnetMask $subnetMask} | Should -Throw
}
$cases = `
@{defaultGateway = "192.168.1.256"}, `
@{defaultGateway = "192.168.1"}, `
@{defaultGateway = "String"}, `
@{defaultGateway = 192.168.1}, `
@{defaultGateway = 192.168.1.246}, `
@{defaultGateway = 32}, `
@{defaultGateway = ""}, `
@{defaultGateway = $null}
It "defaultGateway field require valid IP addresses as a String" -TestCases $cases {
param ( $vraIpAddress )
{Edit-ZertoVra -vraIdentifier "MyVraIdentifier" -defaultGateway $defaultGateway} | Should -Throw
}
$cases = `
@{vraIdentifier = ""; paramName = "vraIdentifier"; paramValue = ""}, `
@{vraIdentifier = $null; paramName = "vraIdentifier"; paramValue = ""}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "groupName"; paramValue = ""}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "groupName"; paramValue = $null}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "vraIpAddress"; paramValue = ""}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "vraIpAddress"; paramValue = $null}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "subnetMask"; paramValue = ""}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "subnetMask"; paramValue = $null}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "defaultGateway"; paramValue = ""}, `
@{vraIdentifier = "MyVraIdentifier"; paramName = "defaultGateway"; paramValue = $null}
It "<paramName> does not take empty or null" -TestCases $cases {
param($vraIdentifier, $paramValue, $paramName )
if ([String]::IsNullOrEmpty($vraIdentifier)) {
{Edit-ZertoVra -vraIdentifier $vraIdentifier} | Should -Throw
} else {
{Edit-ZertoVra -vraIdentifier $vraIdentifier -$paramName $paramValue} | should -Throw
}
It "Supports 'SupportsShouldProcess'" {
Get-Command $global:function | Should -HaveParameter WhatIf
Get-Command $global:function | Should -HaveParameter Confirm
(Get-Command $global:function).ScriptBlock | Should -Match 'SupportsShouldProcess'
(Get-Command $global:function).ScriptBlock | Should -Match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "$($File.BaseName)::Function Unit Tests" {
Context "$($global:function)::Function Unit Tests" {
It "Returns a string" {
It "Returns a task id string" {
$results = Edit-ZertoVra -vraIdentifier "MyVraIdentifier" -groupName "MyGroup"
$results | should not benullorempty
$results | should -BeOfType "String"
$results | Should -BeExactly "8dcfdc8e-e5d2-4ba4-9885-f9eb57d92b14.928a122b-1763-4664-ad37-cc00bb883f2f"
$results | Should not benullorempty
$results | Should -BeOfType "String"
$results | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
it "Supports 'SupportsShouldProcess'" {
Get-Command $file.BaseName | Should -HaveParameter WhatIf
Get-Command $file.BaseName | Should -HaveParameter Confirm
$file | Should -FileContentMatch 'SupportsShouldProcess'
$file | Should -FileContentMatch '\$PSCmdlet\.ShouldProcess\(.+\)'
It "Throws an error when the VPG does not exist" {
{ Edit-ZertoVra -vraIdentifier "DoesNotExist" -groupName "MyNewGroup" } | Should Throw "VRA with Identifier:"
}
It "Runs when passed static IP information" {
Edit-ZertoVra -vraIdentifier "MyVraIdentifier" -vraIpAddress "192.168.1.250" -defaultGateway "192.168.1.254" -subnetMask "255.255.255.0"
}
It "Processes a VRA with a DHCP address" {
Edit-ZertoVra -vraIdentifier "DhcpVraIdentifier" -groupName "MyNewGroup" | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
It "Runs with root password provided" {
$SecurePassword = 'NotARealPassword' | ConvertTo-SecureString -AsPlainText -Force
Edit-ZertoVra -vraIdentifier "PasswordVraIdentifier" -HostRootPassword $SecurePassword | Should -BeExactly "7e79035e-fb8c-47fe-815c-12ddd41708e6.3e4cdd0d-1064-4022-921f-6265ad6d335a"
}
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoVra
}
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -Exactly 4
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoVra -Exactly 5
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
@@ -0,0 +1,32 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
$ParameterTestCases = @(
@{ParameterName = 'OutputFile'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> has <Validation> validation set" -TestCases $ParameterTestCases {
param($ParameterName)
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
Context "$global:function::Function Unit Tests" {
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+37 -44
View File
@@ -1,53 +1,39 @@
#Requires -Modules Pester
#Region - Test Setup
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
#EndRegion
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
it "has a mantatory string parameter for the output path" {
Get-Command $file.BaseName | Should -HaveParameter outputPath -Type String -Mandatory
$ParameterTestCases = @(
@{ParameterName = 'OutputPath'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'allVpgs'; Type = 'Switch'; Mandatory = $true; Validation = $null }
)
It "<ParameterName> parameter is of <Type> type, with correct validation" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
it "has a non-mandatory string array parameter for vpgName(s) to export" {
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type String[] -Mandatory
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
it "has a non-mandatory switch parameter to export all vpgs" {
Get-Command $file.BaseName | Should -HaveParameter allVpgs -Type Switch -Mandatory
}
it "No defined vpgName or AllVpg switch should throw an error" {
{Export-ZertoVpg -outputPath "."} | Should -Throw
}
it "Output path does not take null or empty string" {
{Export-ZertoVpg -outputPath "" -allVpgs} | Should -Throw
{Export-ZertoVpg -outputPath $null -allVpgs} | Should -Throw
}
it "Vpg Name parameter does not take null or empty string" {
{Export-ZertoVpg -outputPath "." -vpgName = ""} | Should -Throw
{Export-ZertoVpg -outputPath "." -vpgName = $null} | Should -Throw
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
}
}
}
Context "$($file.BaseName)::Function Unit Tests" {
Context "$($global:function)::Function Unit Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpg {
$returnObj = @{
VpgName = "HRIS"
@@ -60,6 +46,10 @@ Describe $file.BaseName -Tag 'Unit' {
return "1024d377-afb8-4880-82f0-96eeff413ffd"
}
Mock -ModuleName ZertoApiWrapper -CommandName Remove-ZertoVpgSettingsIdentifier {
return $null
}
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpgSetting {
$returnObj = @{
Backup = $null
@@ -213,11 +203,11 @@ Describe $file.BaseName -Tag 'Unit' {
$outputPath = "TestDrive:"
it "Output path should exist" {
It "Output path should exist" {
$outputPath | Should -Exist
}
it "Exported JSON file should exist after function called" {
It "Exported JSON file should exist after function called" {
$vpgName = "HRIS"
Export-ZertoVpg -outputPath $outputPath -vpgName $vpgName
$outputFile = "{0}\{1}.json" -f $outputPath, $vpgName
@@ -225,11 +215,11 @@ Describe $file.BaseName -Tag 'Unit' {
$outputFile | Should -Not -BeNullOrEmpty
}
it "Only one file should be present in the TestDrive" {
It "Only one file should be present in the TestDrive" {
(Get-ChildItem $outputPath).Count | Should -BeExactly 1
}
it "Should be valid JSON" {
It "Should be valid JSON" {
$vpgName = "HRIS"
Export-ZertoVpg -outputPath $outputPath -vpgName $vpgName
$outputFile = "{0}\{1}.json" -f $outputPath, $vpgName
@@ -247,3 +237,6 @@ Describe $file.BaseName -Tag 'Unit' {
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpgSetting
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
+53 -14
View File
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'limitTo'; Type = 'int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'alertIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "LimitTo Parameter should have a Min value of 1" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1
}
It "LimitTo Parameter should have a Max value of 1000000" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'datastoreIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'clusterIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+72 -14
View File
@@ -1,19 +1,77 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'limitTo'; Type = 'int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'category'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "LimitTo Parameter should have a Min value of 1" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1
}
It "LimitTo Parameter should have a Max value of 1000000" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000
}
It "Category parameter should only have 2 options" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 2
}
It "Category parameter should take 'events'" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'events'
}
It "Category parameter should take 'alertsHistory'" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'alertsHistory'
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,59 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+53 -14
View File
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+15 -15
View File
@@ -1,19 +1,19 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 11 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 11
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+20 -15
View File
@@ -1,19 +1,24 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
It "$global:function has a non-mandatory string parameter for the zOrgIdentifier" {
Get-Command $global:function | Should -HaveParameter zOrgIdentifier -Type String
Get-Command $global:function | Should -HaveParameter zOrgIdentifier -not -Mandatory
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,60 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 17 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 17
}
$ParameterTestCases = @(
@{ParameterName = 'protectedSiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,60 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 17 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 17
}
$ParameterTestCases = @(
@{ParameterName = 'protectedSiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+46 -14
View File
@@ -1,19 +1,51 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'protectedSiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+46 -14
View File
@@ -1,19 +1,51 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'protectedSiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoverySiteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+44 -14
View File
@@ -1,19 +1,49 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+44 -14
View File
@@ -1,19 +1,49 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,57 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 17 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 17
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' }
@{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,57 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 17 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 17
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' }
@{ParameterName = 'interval'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+42
View File
@@ -0,0 +1,42 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String[]'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,57 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 17 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 17
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' }
@{ParameterName = 'desiredJournalHistory'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,56 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,56 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'recoveryType'; Type = 'String'; Mandatory = $true; Validation = 'Set' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+41
View File
@@ -0,0 +1,41 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'AllVms'; Type = 'Switch'; Mandatory = $false; Validation = $Null }
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'Volumes'; Type = 'Switch'; Mandatory = $false; Validation = $Null }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,39 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
$ParameterTestCases = @(
@{ParameterName = 'vmIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+53 -14
View File
@@ -1,19 +1,58 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'Interval'; Type = 'Int32'; Mandatory = $false; Validation = 'Range' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 60" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 60
}
It "Interval Parameter should have a Max value of 2678400" {
(Get-Command $global:function).Parameters['Interval'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 2678400
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+23 -14
View File
@@ -1,19 +1,28 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
It "zOrgIdentifier Parameter should be present and of 'String' Type" {
Get-Command $global:function | Should -HaveParameter zOrgIdentifier -Type String -Mandatory:$false
}
It "zOrgIdentifier has the NotNullOrEmpty Validator" {
(Get-Command $global:function).Parameters['zOrgIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+39 -14
View File
@@ -1,19 +1,44 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+37 -14
View File
@@ -1,19 +1,42 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+52 -14
View File
@@ -1,19 +1,57 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'limitTo'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'taskIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "Interval Parameter should have a Min value of 1" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 1
}
It "Interval Parameter should have a Max value of 1000000" {
(Get-Command $global:function).Parameters['limitTo'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 1000000
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+40 -14
View File
@@ -1,19 +1,45 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'clusterIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'datastoreIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+38 -14
View File
@@ -1,19 +1,43 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 13 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 13
}
$ParameterTestCases = @(
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+14 -14
View File
@@ -1,19 +1,19 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 11 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 11
}
}
Context "$global:function::Parameter Functional Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+42 -75
View File
@@ -1,84 +1,51 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
$ParameterTestCases = @(
@{ParameterName = 'alertId'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'entities'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'helpIdentifiers'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'levels'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'level'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'helpIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'isDismissed'; Type = 'bool'; Mandatory = $false; Validation = $null }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
}
}
}
Context "$($file.BaseName)::Parameter Unit Tests" {
Context "$global:function::Parameter Functional Tests" {
it "Has a mandatory string parameter for the Alert identifier" {
Get-Command $file.BaseName | Should -HaveParameter alertId
Get-Command $file.BaseName | Should -HaveParameter alertId -Mandatory
Get-Command $file.BaseName | Should -HaveParameter alertId -Type String[]
}
it "Has a non-mandatory switch parameter for the entities" {
Get-Command $file.BaseName | Should -HaveParameter entities
Get-Command $file.BaseName | Should -HaveParameter entities -Type switch
}
it "Has a non-mandatory switch parameter for the helpIdentifiers" {
Get-Command $file.BaseName | Should -HaveParameter helpIdentifiers
Get-Command $file.BaseName | Should -HaveParameter helpIdentifiers -Type switch
}
it "Has a non-mandatory switch parameter for the levels" {
Get-Command $file.BaseName | Should -HaveParameter levels
Get-Command $file.BaseName | Should -HaveParameter levels -Type switch
}
it "Has a non-mandatory string parameter for the startDate" {
Get-Command $file.BaseName | Should -HaveParameter startDate
Get-Command $file.BaseName | Should -HaveParameter startDate -Type string
}
it "Has a non-mandatory string parameter for the endDate" {
Get-Command $file.BaseName | Should -HaveParameter endDate
Get-Command $file.BaseName | Should -HaveParameter endDate -Type string
}
it "Has a non-mandatory string parameter for the vpgIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter vpgIdentifier
Get-Command $file.BaseName | Should -HaveParameter vpgIdentifier -Type string
}
it "Has a non-mandatory string parameter for the siteIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter siteIdentifier
Get-Command $file.BaseName | Should -HaveParameter siteIdentifier -Type string
}
it "Has a non-mandatory string parameter for the zorgIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter zorgIdentifier
Get-Command $file.BaseName | Should -HaveParameter zorgIdentifier -Type string
}
it "Has a non-mandatory string parameter for the level" {
Get-Command $file.BaseName | Should -HaveParameter level
Get-Command $file.BaseName | Should -HaveParameter level -Type string
}
it "Has a non-mandatory string parameter for the helpIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter helpIdentifier
Get-Command $file.BaseName | Should -HaveParameter helpIdentifier -Type string
}
it "Has a non-mandatory bool parameter for the isDismissed" {
Get-Command $file.BaseName | Should -HaveParameter isDismissed
Get-Command $file.BaseName | Should -HaveParameter isDismissed -Type bool
}
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+19 -18
View File
@@ -1,24 +1,25 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "has a non-mandatory string parameter for the datacenterIdentifier" {
Get-Command $global:function | Should -HaveParameter datastoreIdentifier
Get-Command $global:function | Should -HaveParameter datastoreIdentifier -Type String[]
}
It "datastoreIdentifier parameter does not take null or empty values" {
(Get-Command $global:function).Parameters['datastoreIdentifier'].Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.count | Should -Be 1
}
}
It "has a non-mandatory string parameter for the datacenterIdentifier" {
Get-Command $file.BaseName | Should -HaveParameter datastoreIdentifier
Get-Command $file.BaseName | Should -HaveParameter datastoreIdentifier -Type String[]
Context "$global:function::Parameter Functional Tests" {
}
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+116 -15
View File
@@ -1,19 +1,120 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -Leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 28 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 28
}
$ParameterTestCases = @(
@{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpg'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'eventType'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'siteName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'zOrgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'entityType'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'userName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'category'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'eventCategory'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'alertIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'eventId'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'categories'; Type = 'Switch'; Mandatory = $true; Validation = $null }
@{ParameterName = 'entities'; Type = 'Switch'; Mandatory = $true; Validation = $null }
@{ParameterName = 'types'; Type = 'Switch'; Mandatory = $true; Validation = $null }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
It "entityType parameter only accecpts 4 different values" {
(Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 4
}
It "entityType parameter accecpts 'VPG' as a Value" {
(Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'VPG'
}
It "entityType parameter accecpts 'VRA' as a Value" {
(Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'VRA'
}
It "entityType parameter accecpts 'Unknown' as a Value" {
(Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'Unknown'
}
It "entityType parameter accecpts 'Site' as a Value" {
(Get-Command $global:function).Parameters['entityType'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'Site'
}
It "category parameter only accecpts 3 different values" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 3
}
It "category parameter accecpts 'All' as a Value" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'All'
}
It "category parameter accecpts 'events' as a Value" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'events'
}
It "category parameter accecpts 'alerts' as a Value" {
(Get-Command $global:function).Parameters['category'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'alerts'
}
It "eventCategory parameter only accecpts 3 different values" {
(Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues.Count | Should -Be 3
}
It "eventCategory parameter accecpts 'All' as a Value" {
(Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'All'
}
It "eventCategory parameter accecpts 'events' as a Value" {
(Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'events'
}
It "eventCategory parameter accecpts 'alerts' as a Value" {
(Get-Command $global:function).Parameters['eventCategory'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'alerts'
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+15 -15
View File
@@ -1,19 +1,19 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 11 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 11
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+18 -21
View File
@@ -1,27 +1,24 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "Has a non-mandatory switch parameter for the pairing Statuses" {
Get-Command $file.BaseName | Should -HaveParameter pairingstatuses
Get-Command $file.BaseName | Should -HaveParameter pairingstatuses -Type switch
It "Has a non-mandatory switch parameter for the pairing Statuses" {
Get-Command $global:function | Should -HaveParameter pairingstatuses
Get-Command $global:function | Should -HaveParameter pairingstatuses -Type switch
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+49 -15
View File
@@ -1,19 +1,53 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 18 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 18
}
$ParameterTestCases = @(
@{ParameterName = 'pairingStatuses'; Type = 'Switch'; Mandatory = $true; Validation = $null }
@{ParameterName = 'siteIdentifier'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'peerName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'paringStatus'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'location'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'hostName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'port'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,19 +1,261 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
BeforeAll {
$script:ScriptBlock = (Get-Command $global:function).ScriptBlock
}
}
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 23 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 23
}
$ParameterTestCases = @(
@{ParameterName = 'siteIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'hostIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'folders'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'hostClusters'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'hosts'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'networks'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'resourcePools'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'vms'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
@{ParameterName = 'repositories'; Type = 'Switch'; Mandatory = $true; Validation = $Null }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting of <Validation>" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Validation)
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
$Null {
$Type -match 'Switch' | Should -BeTrue -Because "Only Switch Parameters should not have validation"
}
default {
$true | Should -BeFalse -Because "No Validation Selected. Review test cases"
}
}
}
It "$($global:function) does not have 'SupportsShouldProcess'" {
Get-Command $global:function | Should -not -HaveParameter WhatIf
Get-Command $global:function | Should -not -HaveParameter Confirm
$script:ScriptBlock | Should -not -match 'SupportsShouldProcess'
$script:ScriptBlock | Should -not -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
}
Context "$global:function::Parameter Functional Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-NoParams.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/devices'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-devices.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/devices?hostIdentifier=4567'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-devices-hostid.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hosts'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-hosts.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hosts/4567'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-hosts-hostid.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-SiteId.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/datastores'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-datastores.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/datastoreclusters'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-datastoreClusters.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/networks'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-Networks.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/folders'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-Folders.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hostclusters'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-hostClusters.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/resourcepools'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-ResourcePools.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/vms'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-VMs.json" -Raw) | ConvertFrom-Json
} -Verifiable
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/repositories'
} {
return (Get-Content "$global:here\Mocks\VirtualSite-repositories.json" -Raw) | ConvertFrom-Json
} -Verifiable
It "Should return all known sites when called without parameters" {
$results = Get-ZertoVirtualizationSite
$results.Count | Should -BeExactly 2
}
It "Should return a single site when a siteIdentifier is provided" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234'
$results.VirtualizationSiteName | Should -BeExactly 'cavc.nc.lab'
$results.siteIdentifier | Should -BeExactly '8e1c9f53-4973-4a4a-b2dd-1ebb293614d8'
}
It "Should return a list of devices with the '-devices' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -devices
$results.Count | Should -BeExactly 5
}
It "Should return a list of devices with the '-devices' switch and hostIdentifier provided" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -devices -hostIdentifier '4567'
$results.Count | Should -BeExactly 5
}
It "Should return a list of hosts with the '-hosts' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -hosts
$results.Count | Should -BeExactly 3
}
It "Should return a single host with the '-hosts' switch and hostIdentifier provided" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -hosts -hostIdentifier '4567'
$results.VirtualizationHostName | Should -BeExactly "caesx3.nc.lab"
$results.hostIdentifier | Should -BeExactly "09db6c5b-b956-430f-9589-b58876ca377a.host-18"
}
It "Should return a list of datastores with the '-datastores' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -datastores
$results.Count | Should -BeExactly 8
}
It "Should return a list of datastores with the '-datastoreClusters' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -datastoreClusters
$results.DatastoreClusterIdentifier | Should -BeExactly "09db6c5b-b956-430f-9589-b58876ca377a.group-p44"
$results.DatastoreClusterName | Should -BeExactly "CA_DS_Cluster"
}
It "Should return a list of Networks with the '-networks' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -networks
$results.NetworkIdentifier | Should -BeExactly "09db6c5b-b956-430f-9589-b58876ca377a.network-20"
$results.VirtualizationNetworkName | Should -BeExactly "VM Network"
}
It "Should return a list of folders with the '-folders' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -folders
$results.Count | Should -BeExactly 3
}
It "Should return a list of Host Clusters with the '-hostClusters' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -hostClusters
$results.ClusterIdentifier | Should -BeExactly "09db6c5b-b956-430f-9589-b58876ca377a.domain-c7"
$results.VirtualizationClusterName | Should -BeExactly "CA Cluster"
}
It "Should return a list of Resource Pools with the '-resourcePools' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -resourcePools
$results.ResourcePoolIdentifier | Should -BeExactly "09db6c5b-b956-430f-9589-b58876ca377a.resgroup-8"
$results.ResourcePoolName | Should -BeExactly "Resources"
}
It "Should return a list of VMs with the '-VMs' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -vms
$results.Count | Should -BeExactly 4
}
It "Should return a list of LTR Repositories with the '-repositories' switch" {
$results = Get-ZertoVirtualizationSite -siteIdentifier '1234' -repositories
$results.ConnectionType | Should -BeExactly "ServerMessageBlock"
$results.RepositoryIdentifier | Should -BeExactly "120355ce-fcd0-4820-a971-787d0470793b"
$results.RepositoryName | Should -BeExactly "Synology"
$results.StorageType | Should -BeExactly "NetworkShare"
$results.Path | Should -not -be $null
}
Assert-VerifiableMock
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/devices'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/devices?hostIdentifier=4567'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hosts'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hosts/4567'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/datastores'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/datastoreclusters'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/networks'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/folders'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/hostclusters'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/resourcepools'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/vms'
} -Exactly 1
Assert-MockCalled -ModuleName ZertoApiWrapper -CommandName Invoke-ZertoRestRequest -ParameterFilter {
$uri -eq 'virtualizationsites/1234/repositories'
} -Exactly 1
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+14 -15
View File
@@ -1,19 +1,18 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+13 -15
View File
@@ -1,19 +1,17 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,30 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 11 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
It "Has a mandatory string array parameter for the settings file to import" {
Get-Command $global:function | Should -HaveParameter InputFile
Get-Command $global:function | Should -HaveParameter InputFile -Mandatory
Get-Command $global:function | Should -HaveParameter InputFile -Type String
}
It "Will not accecpt a Null or Empty string for the settings file" {
$attrs = (Get-Command $global:function).Parameters['InputFile'].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+16 -25
View File
@@ -1,39 +1,30 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
It "Has a mandatory string array parameter for the settings file to import" {
Get-Command $file.BaseName | Should -HaveParameter settingsFile
Get-Command $file.BaseName | Should -HaveParameter settingsFile -Mandatory
Get-Command $file.BaseName | Should -HaveParameter settingsFile -Type String[]
Get-Command $global:function | Should -HaveParameter settingsFile
Get-Command $global:function | Should -HaveParameter settingsFile -Mandatory
Get-Command $global:function | Should -HaveParameter settingsFile -Type String[]
}
It "Will not accecpt a Null or Empty string for the settings file" {
{Import-ZertoVpg -settingsFile $null} | Should -Throw
{Import-ZertoVpg -settingsFile ""} | Should -Throw
{Import-ZertoVpg -settingsFile @()} | Should -Throw
$attrs = (Get-Command $global:function).Parameters['settingsFile'].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
}
Context "$($file.BaseName)::Function Unit Tests" {
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+49 -100
View File
@@ -1,108 +1,57 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 24 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 25
}
$ParameterTestCases = @(
@{ParameterName = 'hostName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'datastoreName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'networkName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'Dhcp'; Type = 'Switch'; Mandatory = $true; Validation = $null }
@{ParameterName = 'vraIpAddress'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' }
@{ParameterName = 'subnetMask'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' }
@{ParameterName = 'defaultGateway'; Type = 'String'; Mandatory = $true; Validation = 'IpAddr' }
@{ParameterName = 'UseRootCredential'; Type = 'Switch'; Mandatory = $true; Validation = $null }
@{ParameterName = 'HostRootPassword'; Type = 'SecureString'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'IpAddr' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateScript] }.Count | Should -Be 1
$attrs.Where{ $_ -is [ValidateScript] }.ScriptBlock | Should -Match '\$_ \-match \[IPAddress\]\$_'
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 3
}
}
}
}
Context "$($file.BaseName)::Parameter Unit Tests" {
Context "$global:function::Parameter Functional Tests" {
It "Has a mandatory string host name parameter" {
Get-Command $file.BaseName | Should -HaveParameter hostName
Get-Command $file.BaseName | Should -HaveParameter hostName -Mandatory
Get-Command $file.BaseName | Should -HaveParameter hostName -Type String
}
It "Will not accecpt a Null or Empty string for the host name" {
{Install-ZertoVra -hostName $null -datastoreName "DS01" -networkName "MyNetwork" -Dhcp } | Should -Throw "The argument is null or empty"
{Install-ZertoVra -hostName "" -datastoreName "DS01" -networkName "MyNetwork" -Dhcp } | Should -Throw "The argument is null or empty"
}
It "Has a mandatory string datastore parameter" {
Get-Command $file.BaseName | Should -HaveParameter datastoreName
Get-Command $file.BaseName | Should -HaveParameter datastoreName -Mandatory
Get-Command $file.BaseName | Should -HaveParameter datastoreName -Type String
}
It "Will not accecpt a Null or Empty string for the datastore" {
{Install-ZertoVra -hostName "MyfirstHost" -datastoreName $null -networkName "MyNetwork" -Dhcp } | Should -Throw "The argument is null or empty"
{Install-ZertoVra -hostName "MyfirstHost" -datastoreName "" -networkName "MyNetwork" -Dhcp } | Should -Throw "The argument is null or empty"
}
It "Has a mandatory string network parameter" {
Get-Command $file.BaseName | Should -HaveParameter networkName
Get-Command $file.BaseName | Should -HaveParameter networkName -Mandatory
Get-Command $file.BaseName | Should -HaveParameter networkName -Type String
}
It "Will not accecpt a Null or Empty string for the datastore" {
{Install-ZertoVra -hostName "MyfirstHost" -datastoreName "DS01" -networkName $null -Dhcp } | Should -Throw "The argument is null or empty"
{Install-ZertoVra -hostName "MyfirstHost" -datastoreName "DS01" -networkName "" -Dhcp } | Should -Throw "The argument is null or empty"
}
it "Has a switch parameter for setting DHCP" {
Get-Command $file.BaseName | Should -HaveParameter Dhcp
Get-Command $file.BaseName | Should -HaveParameter Dhcp -Mandatory
Get-Command $file.BaseName | Should -HaveParameter Dhcp -Type 'Switch'
}
it "Has a mandatory string parameter for the static IP address" {
Get-Command $file.BaseName | Should -HaveParameter vraIpAddress
Get-Command $file.BaseName | Should -HaveParameter vraIpAddress -Mandatory
Get-Command $file.BaseName | Should -HaveParameter vraIpAddress -Type String
}
it "Has a mandatory string parameter for the subnet mask" {
Get-Command $file.BaseName | Should -HaveParameter subnetMask
Get-Command $file.BaseName | Should -HaveParameter subnetMask -Mandatory
Get-Command $file.BaseName | Should -HaveParameter subnetMask -Type String
}
it "Has a mandatory string parameter for the default gateway" {
Get-Command $file.BaseName | Should -HaveParameter defaultGateway
Get-Command $file.BaseName | Should -HaveParameter defaultGateway -Mandatory
Get-Command $file.BaseName | Should -HaveParameter defaultGateway -Type String
}
$cases = `
@{invalidIpAddress = "192.168.1.256"}, `
@{invalidIpAddress = "192.168.1"}, `
@{invalidIpAddress = "String"}, `
@{invalidIpAddress = 192.168.1.246}, `
@{invalidIpAddress = 32}, `
@{invalidIpAddress = ""}, `
@{invalidIpAddress = $null}
It "IpAddress field require valid IP addresses as a String: <invalidIpAddress>" -TestCases $cases {
param ( $invalidIpAddress )
{Install-ZertoVra -hostName "MyFirstHost" -datastoreName "DS01" -networkName "MyNetwork" -vraIpAddress $invalidIpAddress -subnetMask "255.255.255.0" -defaultGateway "192.168.1.254"} | Should -Throw
}
It "Default Gateway field require valid IP addresses as a String: <invalidIpAddress>" -TestCases $cases {
param ( $invalidIpAddress )
{Install-ZertoVra -hostName "MyFirstHost" -datastoreName "DS01" -networkName "MyNetwork" -vraIpAddress '192.168.1.100' -subnetMask "255.255.255.0" -defaultGateway $invalidIpAddress} | Should -Throw
}
It "Subnet Mask field require valid IP addresses as a String: <invalidIpAddress>" -TestCases $cases {
param ( $invalidIpAddress )
{Install-ZertoVra -hostName "MyFirstHost" -datastoreName "DS01" -networkName "MyNetwork" -vraIpAddress '192.168.1.100' -subnetMask $invalidIpAddress -defaultGateway "192.168.1.254"} | Should -Throw
}
}
Context "$($file.BaseName)::Function Unit Tests" {
#TODO
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -0,0 +1,90 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
InModuleScope -ModuleName ZertoApiWrapper {
Context "$global:function::Parameter Unit Tests" {
$testCases = @(
@{ParameterName = 'uri'; Type = 'String'; Mandatory = $true; TestName = 'URI' }
@{ParameterName = 'method'; Type = 'String'; Mandatory = $false; TestName = 'Method' }
@{ParameterName = 'body'; Type = 'String'; Mandatory = $false; TestName = 'Body' }
)
It "Parameter present and Type test for: <TestName> " -TestCases $testCases {
param($parameterName, $type, $Mandatory)
Get-Command $global:function | Should -HaveParameter $parameterName -Type $type
if ($Mandatory) {
Get-Command $global:function | Should -HaveParameter $parameterName -Mandatory
} else {
Get-Command $global:function | Should -HaveParameter $parameterName -Not -Mandatory
}
}
It "Method parameter default is 'GET'" {
Get-Command $global:function | Should -HaveParameter Method -DefaultValue "GET"
}
$NotNullOrEmptyTests = @(
@{ParameterName = 'uri'; TestName = 'Uri' }
@{ParameterName = 'body'; TestName = 'Body' }
)
It "<TestName> parameter does not accecpt a null or empty value" -TestCases $NotNullOrEmptyTests {
param($parameterName)
$parameterInfo = ( Get-Command Invoke-ZARestRequest ).Parameters[$parameterName]
$parameterInfo.Attributes.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
It "method parametert only accecpts 'GET' 'DELETE' 'PUT' 'POST' values" {
$parameterInfo = ( Get-Command Invoke-ZARestRequest ).Parameters['method']
$parameterInfo.Attributes.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
$validateSet = $parameterInfo.Attributes.Where{ $_ -is [ValidateSet] }
$validateSet.ValidValues -contains 'GET' | Should -BeTrue
$validateSet.ValidValues -contains 'PUT' | Should -BeTrue
$validateSet.ValidValues -contains 'POST' | Should -BeTrue
$validateSet.ValidValues -contains 'DELETE' | Should -BeTrue
$validateSet.ValidValues.Count | Should -Be 4
}
}
Context "$global:function::Function Unit Tests" {
Mock -ModuleName ZertoApiWrapper -CommandName Invoke-RestMethod {
"Ran Command"
}
BeforeEach {
Set-Variable -Name zaHeaders -Scope Script -Value (@{ "Accept" = "application/json" })
Set-Variable -Name zaLastActionTime -Scope Script -Value $(Get-Date).Ticks
}
It "runs when called" {
Invoke-ZARestRequest -uri "myuri" | Should -Be "Ran Command"
}
It "throws when the last action was over 60 minutes ago" {
$script:zaLastActionTime = (Get-Date).AddMinutes(-61).Ticks
{ Invoke-ZARestRequest -uri "myuri" } | Should Throw "Authorization Token has Expired."
}
It "throws when the zaHeaders variable does not exits" {
Remove-Variable -Name zaHeaders -Scope Script
{ Invoke-ZARestRequest -uri "myuri" } | Should Throw "Zerto Analytics Connection does not Exist."
}
It "throws when the zaLastActionTime variable does not exist" {
Remove-Variable -Name zaLastActionTime -Scope Script
{ Invoke-ZARestRequest -uri "myuri" } | Should Throw "Zerto Analytics Connection does not Exist."
}
Assert-MockCalled -CommandName Invoke-RestMethod -ModuleName ZertoApiWrapper -Exactly 1
}
}
}
Remove-Variable -Name function -Scope Global
Remove-Variable -Name here -Scope Global
@@ -0,0 +1,54 @@
#Requires -Modules Pester
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
$ParameterTestCases = @(
@{ParameterName = 'hostName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty'; ParameterSet = @('hostName') }
@{ParameterName = 'vraName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' ; ParameterSet = @('vraName') }
@{ParameterName = 'vraIdentifier'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' ; ParameterSet = @('vraIdentifier') }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
}
}
It "<ParameterName> parameter is part of the correct ParameterSet(s)" -TestCases $ParameterTestCases {
param($ParameterName, $ParameterSet)
$commandParameterSets = (Get-Command $global:function).Parameters[$ParameterName].ParameterSets
foreach ($Set in $ParameterSet) {
$commandParameterSets.ContainsKey($Set) | Should -BeTrue
}
$commandParameterSets.Count | Should -Be $ParameterSet.Count
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+79 -55
View File
@@ -1,77 +1,101 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 20 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 20
}
it "has a non-mandatory string parameter for the checkpoint" {
Get-Command $file.BaseName | Should -HaveParameter checkpointIdentifier
Get-Command $file.BaseName | Should -HaveParameter checkpointIdentifier -Type string
Get-Command $file.BaseName | Should -HaveParameter checkpointIdentifier -Not -Mandatory
$ParameterTestCases = @(
@{ParameterName = 'vpgName'; Type = 'String'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'checkpointIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'commitPolicy'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'shutdownPolicy'; Type = 'Int'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'timeToWaitBeforeShutdownInSec'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'reverseProtection'; Type = 'bool'; Mandatory = $false; Validation = $null }
@{ParameterName = 'vmName'; Type = 'String[]'; Mandatory = $false; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
it "has a non-mandatory string parameter for the commit policy" {
Get-Command $file.BaseName | Should -HaveParameter commitPolicy
Get-Command $file.BaseName | Should -HaveParameter commitPolicy -Type string
Get-Command $file.BaseName | Should -HaveParameter commitPolicy -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter commitPolicy -DefaultValue "Rollback"
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'ShouldProcess' {
$scriptBlock = (Get-Command $global:function).ScriptBlock
$scriptBlock | Should -match 'SupportsShouldProcess'
$scriptBlock | Should -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
it "has a non-mandatory int parameter for the shutdown policy" {
Get-Command $file.BaseName | Should -HaveParameter shutdownPolicy
Get-Command $file.BaseName | Should -HaveParameter shutdownPolicy -Type int
Get-Command $file.BaseName | Should -HaveParameter shutdownPolicy -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter shutdownPolicy -DefaultValue 0
It "Commit Policy Default Value is 'RollBack'" {
Get-Command $global:function | Should -HaveParameter commitPolicy -DefaultValue "Rollback"
}
it "has a non-mandatory int parameter for the time to wait before force shutdown" {
Get-Command $file.BaseName | Should -HaveParameter timeToWaitBeforeShutdownInSec
Get-Command $file.BaseName | Should -HaveParameter timeToWaitBeforeShutdownInSec -Type int
Get-Command $file.BaseName | Should -HaveParameter timeToWaitBeforeShutdownInSec -Not -Mandatory
Get-Command $file.BaseName | Should -HaveParameter timeToWaitBeforeShutdownInSec -DefaultValue 3600
It "Commit Policy Only Accecpts 'RollBack', 'Commit', or 'None'" {
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -HaveCount 3
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'RollBack'
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'Commit'
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'None'
}
it "has a non-mandatory bool parameter for the reverse protection policy" {
Get-Command $file.BaseName | Should -HaveParameter reverseProtection
Get-Command $file.BaseName | Should -HaveParameter reverseProtection -Type bool
Get-Command $file.BaseName | Should -HaveParameter reverseProtection -Not -Mandatory
It "Shutdown Policy Default Value is '0'" {
Get-Command $global:function | Should -HaveParameter shutdownPolicy -DefaultValue 0
}
it "has a non-mandatory array string parameter for the named VMs to be failed over" {
Get-Command $file.BaseName | Should -HaveParameter vmName
Get-Command $file.BaseName | Should -HaveParameter vmName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vmName -Not -Mandatory
It "Shutdown Policy Only Accecpts 'RollBack', 'Commit', or 'None'" {
(Get-Command $global:function).Parameters['shutdownPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -HaveCount 3
(Get-Command $global:function).Parameters['shutdownPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 0
(Get-Command $global:function).Parameters['shutdownPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 1
(Get-Command $global:function).Parameters['shutdownPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 2
}
it "Supports 'SupportsShouldProcess'" {
Get-Command $file.BaseName | Should -HaveParameter WhatIf
Get-Command $file.BaseName | Should -HaveParameter Confirm
$file | Should -FileContentMatch 'SupportsShouldProcess'
$file | Should -FileContentMatch '\$PSCmdlet\.ShouldProcess\(.+\)'
It "Time to wait before shutdown in sec should have a default value of 3600" {
Get-Command $global:function | Should -HaveParameter timeToWaitBeforeShutdownInSec -DefaultValue 3600
}
It "Time to wait before shutdown in sec should have a minimum value of 300 and max value of 86400" {
(Get-Command $global:function).Parameters['timeToWaitBeforeShutdownInSec'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 300
(Get-Command $global:function).Parameters['timeToWaitBeforeShutdownInSec'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 86400
}
}
Context "$($file.BaseName)::Function Unit Tests" {
#TODO
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,44 +1,56 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
it "Supports 'ShouldProcess'" {
Get-Command $file.BaseName | Should -HaveParameter WhatIf
Get-Command $file.BaseName | Should -HaveParameter Confirm
$file | Should -FileContentMatch 'SupportsShouldProcess'
$file | Should -FileContentMatch '\$PSCmdlet\.ShouldProcess\(.+\)'
It "$global:function should have exactly 15 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 15
}
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
$ParameterTestCases = @(
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'reverseProtection'; Type = 'switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
it "has a switch parameter for reverse protection" {
Get-Command $file.BaseName | Should -HaveParameter reverseProtection
Get-Command $file.BaseName | Should -HaveParameter reverseProtection -Type switch
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'ShouldProcess' {
$scriptBlock = (Get-Command $global:function).ScriptBlock
$scriptBlock | Should -match 'SupportsShouldProcess'
$scriptBlock | Should -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
Context "$($file.BaseName)::Function Unit Tests" {
#TODO
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
@@ -1,28 +1,25 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
It "has a mandatory string parameter for the vpgName" {
Get-Command $global:function | Should -HaveParameter vpgName
Get-Command $global:function | Should -HaveParameter vpgName -Type string[]
Get-Command $global:function | Should -HaveParameter vpgName -Mandatory
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+19 -21
View File
@@ -1,28 +1,26 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
It "$global:function should have exactly 12 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 12
}
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
It "has a mandatory string parameter for the vpgName" {
Get-Command $global:function | Should -HaveParameter vpgName
Get-Command $global:function | Should -HaveParameter vpgName -Type string[]
Get-Command $global:function | Should -HaveParameter vpgName -Mandatory
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+70 -61
View File
@@ -1,74 +1,83 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$($file.BaseName)::Parameter Unit Tests" {
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
Context "$global:function::Parameter Unit Tests" {
It "$global:function should have exactly 21 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 21
}
it "has a non-mandatory string parameter for commitPolicy" {
Get-Command $file.BaseName | Should -HaveParameter commitPolicy
Get-Command $file.BaseName | Should -HaveParameter commitPolicy -Type string
$ParameterTestCases = @(
@{ParameterName = 'vpgIdentifier'; Type = 'Guid[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'commitPolicy'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
@{ParameterName = 'commitPolicyTimeout'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
@{ParameterName = 'forceShutdown'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'disableReverseProtection'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'keepSourceVms'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'ContinueOnPreScriptFailure'; Type = 'Switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
it "CommitPolicy only accecpts 'Rollback', 'Commit', or 'None'" {
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicy "Rollbackk" } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicy "" } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicy $null } | Should -Throw
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'Set' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateSet] }.Count | Should -Be 1
}
'Range' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateRange] }.Count | Should -Be 1
}
'ShouldProcess' {
$scriptBlock = (Get-Command $global:function).ScriptBlock
$scriptBlock | Should -match 'SupportsShouldProcess'
$scriptBlock | Should -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
it "has a non-mandatory int parameter for commitPolicyTimeout" {
Get-Command $file.BaseName | Should -HaveParameter commitPolicyTimeout
Get-Command $file.BaseName | Should -HaveParameter commitPolicyTimeout -Type Int
It "Commit Policy Only Accecpts 'RollBack', 'Commit', or 'None'" {
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -HaveCount 3
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'RollBack'
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'Commit'
(Get-Command $global:function).Parameters['commitPolicy'].Attributes.Where{ $_ -is [ValidateSet] }.ValidValues | Should -Contain 'None'
}
it "Commit Policy Timeout will only accecpt an int value between 5 minutes and 24 Hours" {
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicyTimeout 150 } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicyTimeout 15000000 } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicyTimeout -1350 } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicyTimeout $null } | Should -Throw
{ Invoke-ZertoMove -vpgName "MyVpg" -commitPolicyTimeout "" } | Should -Throw
}
it "has a non-mandatory switch parameter for forceShutdown" {
Get-Command $file.BaseName | Should -HaveParameter forceShutdown
Get-Command $file.BaseName | Should -HaveParameter forceShutdown -Type Switch
}
it "has a mandatory switch parameter for disableReverseProtection" {
Get-Command $file.BaseName | Should -HaveParameter disableReverseProtection
Get-Command $file.BaseName | Should -HaveParameter disableReverseProtection -Type Switch
Get-Command $file.BaseName | Should -HaveParameter disableReverseProtection -Mandatory
}
it "has a non-mandatory switch parameter for keepSourceVms" {
Get-Command $file.BaseName | Should -HaveParameter keepSourceVms
Get-Command $file.BaseName | Should -HaveParameter keepSourceVms -Type Switch
Get-Command $file.BaseName | Should -HaveParameter keepSourceVms -Mandatory
}
it "has a non-mandatory switch parameter for ContinueOnPreScriptFailure" {
Get-Command $file.BaseName | Should -HaveParameter ContinueOnPreScriptFailure
Get-Command $file.BaseName | Should -HaveParameter ContinueOnPreScriptFailure -Type Switch
It "Commit Policy Timeout should have a minimum value of 300 and max value of 86400" {
(Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MinRange | Should -Be 300
(Get-Command $global:function).Parameters['commitPolicyTimeout'].Attributes.Where{ $_ -is [ValidateRange] }.MaxRange | Should -Be 86400
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+49 -21
View File
@@ -1,28 +1,56 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
It "$global:function should have exactly 16 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 16
}
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
$ParameterTestCases = @(
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
@{ParameterName = 'reverseProtection'; Type = 'switch'; Mandatory = $false; Validation = $null }
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
)
It "<ParameterName> parameter is of <Type> type" -TestCases $ParameterTestCases {
param($ParameterName, $Type, $Mandatory, $Validation)
Get-Command $global:function | Should -HaveParameter $ParameterName -Mandatory:$Mandatory -Type $Type
}
It "<ParameterName> parameter has correct validation setting" -TestCases $ParameterTestCases {
param($ParameterName, $Validation)
Switch ($Validation) {
'NotNullOrEmpty' {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.Where{ $_ -is [ValidateNotNullOrEmpty] }.Count | Should -Be 1
}
'ShouldProcess' {
$scriptBlock = (Get-Command $global:function).ScriptBlock
$scriptBlock | Should -match 'SupportsShouldProcess'
$scriptBlock | Should -match '\$PSCmdlet\.ShouldProcess\(.+\)'
}
$null {
$attrs = (Get-Command $global:function).Parameters[$ParameterName].Attributes
$attrs.TypeId.Count | Should -Be 2
}
default {
$true | Should -Be $false -Because "No Validation Selected. Review test cases"
}
}
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global
+18 -21
View File
@@ -1,28 +1,25 @@
#Requires -Modules Pester
$moduleFileName = "ZertoApiWrapper.psd1"
$here = (Split-Path -Parent $MyInvocation.MyCommand.Path).Replace("Tests", "ZertoApiWrapper")
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$file = Get-ChildItem "$here\$sut"
$modulePath = $here -replace "Public", ""
$moduleFile = Get-ChildItem "$modulePath\$moduleFileName"
Get-Module -Name ZertoApiWrapper | Remove-Module -Force
Import-Module $moduleFile -Force
$global:here = (Split-Path -Parent $PSCommandPath)
$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
Describe $file.BaseName -Tag 'Unit' {
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
It "is valid Powershell (Has no script errors)" {
$contents = Get-Content -Path $file -ErrorAction Stop
$errors = $null
$null = [System.Management.Automation.PSParser]::Tokenize($contents, [ref]$errors)
$errors | Should -HaveCount 0
}
Context "$global:function::Parameter Unit Tests" {
Context "$($file.BaseName)::Parameter Unit Tests" {
It "$global:function should have exactly 14 parameters defined" {
(Get-Command $global:function).Parameters.Count | Should -Be 14
}
it "has a mandatory string parameter for the vpgName" {
Get-Command $file.BaseName | Should -HaveParameter vpgName
Get-Command $file.BaseName | Should -HaveParameter vpgName -Type string[]
Get-Command $file.BaseName | Should -HaveParameter vpgName -Mandatory
It "has a mandatory string parameter for the vpgName" {
Get-Command $global:function | Should -HaveParameter vpgName
Get-Command $global:function | Should -HaveParameter vpgName -Type string[]
Get-Command $global:function | Should -HaveParameter vpgName -Mandatory
}
}
}
Context "$global:function::Parameter Functional Tests" {
}
}
Remove-Variable -Name here -Scope Global
Remove-Variable -Name function -Scope Global

Some files were not shown because too many files have changed in this diff Show More