Skip to content

Commit

Permalink
Update Remove-JCRadiusServer.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc authored Nov 7, 2024
1 parent 67d5613 commit d280ebc
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
Describe -Tag:('JCRadiusServer') 'Remove-JCRadiusServer Tests' {
BeforeAll {
$PesterParams_RadiusServer = Get-JCRadiusServer -Name:($PesterParams_RadiusServer.name)
If (-not $PesterParams_RadiusServer) {
$PesterParams_RadiusServer = New-JCRadiusServer @PesterParams_NewRadiusServer
}
$NewRadiusServer = @{
networkSourceIp = [IPAddress]::Parse([String](Get-Random)).IPAddressToString
sharedSecret = "$(Get-Random)"
name = "PesterTest_RadiusServer_$(Get-Random)"
authIdp = 'JUMPCLOUD'

};
$RadiusServerTemplate = Create-RadiusServerTryCatch $NewRadiusServer
}
Context 'Remove-JCRadiusServer' {
It ('Should remove a specific radius server.') {
$RadiusServer = Remove-JCRadiusServer -Id:($PesterParams_RadiusServer.id) -Force;
$RadiusServer = Remove-JCRadiusServer -Id:($RadiusServerTemplate.id) -Force;
$RadiusServer | Should -Not -BeNullOrEmpty
$RadiusServer.name | Should -Be $PesterParams_RadiusServer.name
$RadiusServer.name | Should -Be $RadiusServerTemplate.name
}
}
}
}

0 comments on commit d280ebc

Please sign in to comment.