Skip to content

Commit

Permalink
Global(System): Fix Validaterange for Admin Timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Feb 1, 2024
1 parent 20f5d06 commit fa8d9f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PowerFGT/Public/cmdb/system/global.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function Set-FGTSystemGlobal {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'medium')]
Param(
[Parameter (Mandatory = $false)]
[ValidateRange("1", "480")]
[ValidateRange(1, 480)]
[int]$admintimeout,
[Parameter (Mandatory = $false)]
[ValidateRange(1, 65535)]
Expand Down
6 changes: 3 additions & 3 deletions Tests/integration/SystemGlobal.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ Describe "Set System Global" {
$script:settings = Get-FGTSystemGlobal
}

It "Change admintimeout to 480" {
Set-FGTSystemGlobal -admintimeout 480
It "Change admintimeout to 60" {
Set-FGTSystemGlobal -admintimeout 60
$sg = Get-FGTSystemGlobal
$sg.'admintimeout' | Should -Be "480"
$sg.'admintimeout' | Should -Be "60"
}

It "Change admin_port (HTTP)" -Skip:($httpOnly -or $ci) {
Expand Down

0 comments on commit fa8d9f7

Please sign in to comment.