This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$prefix = "kv" # use a prefix to ensure valid hostname | |
$suffix = "$(New-Guid)" -replace "-" | |
$kvName = "$prefix$suffix".Substring(0, 24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select-ClusterSetPartialConfig ".\Configs" "PROD-EU-NorthEurope" ` | |
| Sort-Object ` | |
| % {$_ | Get-Content | ConvertFrom-Json} ` | |
| Merge-Object -Strategy Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select-ClusterSetPartialConfig ".\Configs" "PROD-EU-NorthEurope" ` | |
| % {$_ | Get-Content | ConvertFrom-Json} ` | |
| Merge-Object -Strategy Fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Select-ClusterSetPartialConfig([string]$Container, [string[]]$Vector) { | |
$clusterId = $Vector -join "-" | |
Get-ChildItem $Container ` | |
| ? {$clusterId -like ($_.BaseName -replace "_", "*")} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Convert-ClusterSetIdentityToFileName([string[]]$Vector) { | |
"$($Vector -join "-").json" | |
} | |
function Select-ClusterSetConfig([string]$Container, [string[]]$Vector) { | |
Get-Item "$Container/$($Vector -join "-").json" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Module Pester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module $PSScriptRoot -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module MyModule -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module MyModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@($tested), @($expected) | Test-Equality | Should -BeTrue |