Skip to content

Commit

Permalink
meta(Tests): Fix q_no_edit is not available with FortiOS 6.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Oct 24, 2023
1 parent 6dcc272 commit 6087d1c
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Tests/integration/FirewallAddress.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ Describe "Get Firewall Address" {
$address.q_path | Should -Be "firewall"
$address.q_name | Should -Be "address"
$address.q_mkey_type | Should -Be "string"
$address.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$address.q_no_edit | Should -Not -BeNullOrEmpty
}
$address.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallAddressGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Describe "Get Firewall Address Group" {
$addressgroup.q_path | Should -Be "firewall"
$addressgroup.q_name | Should -Be "addrgrp"
$addressgroup.q_mkey_type | Should -Be "string"
$addressgroup.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$addressgroup.q_no_edit | Should -Not -BeNullOrEmpty
}
$addressgroup.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallPolicy.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Describe "Get Firewall Policy" {
$policy.q_path | Should -Be "firewall"
$policy.q_name | Should -Be "policy"
$policy.q_mkey_type | Should -Be "integer"
$policy.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$policy.q_no_edit | Should -Not -BeNullOrEmpty
}
#$policy.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallProxyAddress.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ Describe "Get Firewall Proxy Address" {
$address.q_path | Should -Be "firewall"
$address.q_name | Should -Be "proxy-address"
$address.q_mkey_type | Should -Be "string"
$address.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$address.q_no_edit | Should -Not -BeNullOrEmpty
}
$address.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallProxyAddressGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ Describe "Get Firewall Proxy Address Group" {
$addressgroup.q_path | Should -Be "firewall"
$addressgroup.q_name | Should -Be "proxy-addrgrp"
$addressgroup.q_mkey_type | Should -Be "string"
$addressgroup.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$addressgroup.q_no_edit | Should -Not -BeNullOrEmpty
}
$addressgroup.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallProxyPolicy.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Describe "Get Firewall Proxy Policy" {
$policy.q_path | Should -Be "firewall"
$policy.q_name | Should -Be "proxy-policy"
$policy.q_mkey_type | Should -Be "integer"
$policy.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$policy.q_no_edit | Should -Not -BeNullOrEmpty
}
#$policy.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallVip.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ Describe "Get Firewall VIP" {
$vip.q_path | Should -Be "firewall"
$vip.q_name | Should -Be "vip"
$vip.q_mkey_type | Should -Be "string"
$vip.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$vip.q_no_edit | Should -Not -BeNullOrEmpty
}
$vip.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/FirewallVipGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Describe "Get Firewall Vip Group" {
$vipgroup.q_path | Should -Be "firewall"
$vipgroup.q_name | Should -Be "vipgrp"
$vipgroup.q_mkey_type | Should -Be "string"
$vipgroup.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$vipgroup.q_no_edit | Should -Not -BeNullOrEmpty
}
$vipgroup.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/RouterStatic.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ Describe "Get Static Route" {
$route.q_path | Should -Be "router"
$route.q_name | Should -Be "static"
$route.q_mkey_type | Should -Be "integer"
$route.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$route.q_no_edit | Should -Not -BeNullOrEmpty
}
#$route.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/SystemZone.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ Describe "Get zone" {
$zone.q_path | Should -Be "system"
$zone.q_name | Should -Be "zone"
$zone.q_mkey_type | Should -Be "string"
$zone.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$zone.q_no_edit | Should -Not -BeNullOrEmpty
}
#$zone.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/VpnIPsecPhase1Interface.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ Describe "Get VPN Ipsec Phase 1 Interface" {
$interface.q_path | Should -Be "vpn.ipsec"
$interface.q_name | Should -Be "phase1-interface"
$interface.q_mkey_type | Should -Be "string"
$interface.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$interface.q_no_edit | Should -Not -BeNullOrEmpty
}
#$interface.q_class | Should -Not -BeNullOrEmpty
}

Expand Down
4 changes: 3 additions & 1 deletion Tests/integration/VpnIPsecPhase2Interface.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Describe "Get VPN Ipsec Phase 2 Interface" {
$interface.q_path | Should -Be "vpn.ipsec"
$interface.q_name | Should -Be "phase2-interface"
$interface.q_mkey_type | Should -Be "string"
$interface.q_no_edit | Should -Not -BeNullOrEmpty
if ($DefaultFGTConnection.version -ge "6.2.0") {
$interface.q_no_edit | Should -Not -BeNullOrEmpty
}
#$interface.q_class | Should -Not -BeNullOrEmpty
}

Expand Down

0 comments on commit 6087d1c

Please sign in to comment.