Skip to content

Commit

Permalink
Change some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Moreau committed Sep 17, 2024
1 parent 4ec58e0 commit 9073056
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Tests/integration/UserLocal.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -627,37 +627,30 @@ Describe "Configure User Local" {
Add-FGTUserLocal -Name $pester_userlocal -passwd $pester_userlocalpassword
}

It "Change type to RADIUS from Local" {
It "Change type to RADIUS from Local" -skip:($fgt_version -lt "6.4.0") {
Get-FGTUserLocal -name $pester_userlocal | Set-FGTUserLocal -radius_server $pester_userradius
$userlocal = Get-FGTUserLocal -name $pester_userlocal
$userlocal.name | Should -Be $pester_userlocal
$userlocal.type | Should -Be "radius"
$userlocal."radius-server" | Should -Be $pester_userradius
}

It "Change type to TACACS from RADIUS" {
It "Change type to TACACS from RADIUS" -skip:($fgt_version -lt "6.4.0") {
Get-FGTUserLocal -name $pester_userlocal | Set-FGTUserLocal -tacacs_server $pester_usertacacs
$userlocal = Get-FGTUserLocal -name $pester_userlocal
$userlocal.name | Should -Be $pester_userlocal
$userlocal.type | Should -Be "tacacs+"
$userlocal."tacacs+-server" | Should -Be $pester_usertacacs
}

It "Change type to LDAP from TACACS" {
It "Change type to LDAP from TACACS" -skip:($fgt_version -lt "6.4.0") {
Get-FGTUserLocal -name $pester_userlocal | Set-FGTUserLocal -ldap_server $pester_userldap
$userlocal = Get-FGTUserLocal -name $pester_userlocal
$userlocal.name | Should -Be $pester_userlocal
$userlocal.type | Should -Be "ldap"
$userlocal."ldap-server" | Should -Be $pester_userldap
}

It "Change type to Local from LDAP" {
Get-FGTUserLocal -name $pester_userlocal | Set-FGTUserLocal -passwd $pester_userlocalpassword
$userlocal = Get-FGTUserLocal -name $pester_userlocal
$userlocal.name | Should -Be $pester_userlocal
$userlocal.type | Should -Be "password"
}

AfterAll {
Get-FGTUserLocal -name $pester_userlocal | Remove-FGTUserLocal -confirm:$false
Get-FGTUserRADIUS -name $pester_userradius | Remove-FGTUserRADIUS -confirm:$false
Expand Down

0 comments on commit 9073056

Please sign in to comment.