ps/Modules/Alkami.PowerShell.Common/Public/Get-ImdsBaseUri.tests.ps1
2023-05-30 22:51:22 -07:00

21 lines
698 B
PowerShell

. $PSScriptRoot\..\..\Load-PesterModules.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.tests\.', '.'
$functionPath = Join-Path -Path $here -ChildPath $sut
Write-Host "Overriding SUT: $functionPath"
Import-Module $functionPath -Force
# $moduleForMock = ""
Describe "Get-ImdsBaseUri" {
Context "Data Evaluation" {
# This test makes sure someone doesn't change the IMDS URI nor add a trailing '/'
It "Should Return IMDS Endpoint" {
$compareUri = "http://169.254.169.254/latest"
$returnUri = Get-ImdsBaseUri
$returnUri | Should -Be $compareUri
}
}
}