Skip to content

Commit

Permalink
Update New-JCRadiusServer.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc authored Nov 7, 2024
1 parent d654fdd commit 34e014b
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
Describe -Tag:('JCRadiusServer') 'New-JCRadiusServer Tests' {
BeforeAll {
$RadiusServerTemplate = Get-JCRadiusServer -Name:($PesterParams_RadiusServer.name); # -Fields:('') -Filter:('') -Limit:(1) -Skip:(1) -Paginate:($true) -Force;
$AzureRadiusServerTemplate = Get-JCRadiusServer -Name:($PesterParams_RadiusAzureServer.name); # -Fields:('') -Filter:('') -Limit:(1) -Skip:(1) -Paginate:($true) -Force;
$NewRadiusServer = @{
# networkSourceIp = [IPAddress]::Parse([String](Get-Random)).IPAddressToString
networkSourceIp = "119.213.49.186"
sharedSecret = "$(Get-Random)"
name = "PesterTest_RadiusServer_$(Get-Random)"
authIdp = 'JUMPCLOUD'

};
$NewAzureRadiusServer = @{
networkSourceIp = [IPAddress]::Parse([String](Get-Random)).IPAddressToString
sharedSecret = "$(Get-Random)"
name = "PesterTest_AzureRadiusServer_$(Get-Random)"
authIdp = 'AZURE'
};

$RadiusServerTemplate = Create-RadiusServerTryCatch $NewRadiusServer
$AzureRadiusServerTemplate = Create-RadiusServerTryCatch $NewAzureRadiusServer
}
Context 'New-JCRadiusServer' {
It ('Should create a new radius server.') {
Expand All @@ -21,4 +36,4 @@ Describe -Tag:('JCRadiusServer') 'New-JCRadiusServer Tests' {
Remove-JCRadiusServer -id $AzureRadiusServer.id -Force
}
}
}
}

0 comments on commit 34e014b

Please sign in to comment.