From 49a6bee29d64e934851c02c98a3284d8c62d58c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Moreau?= Date: Tue, 17 Sep 2024 12:09:21 +0200 Subject: [PATCH] Fix typo --- Tests/common.ps1 | 2 +- Tests/integration/UserLocal.Tests.ps1 | 33 ++++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Tests/common.ps1 b/Tests/common.ps1 index 8846774d1..74e091a98 100644 --- a/Tests/common.ps1 +++ b/Tests/common.ps1 @@ -68,7 +68,7 @@ $script:pester_userradiusserver2 = "pesterradiusserver2.powerfgt" $script:pester_userradiusserver3 = "pesterradiusserver3.powerfgt" $script:pester_userradius_secret = ConvertTo-SecureString "pester_userradiussecret" -AsPlainText -Force -. ../credential.ps1 +#. ../credential.ps1 #TODO: Add check if no ipaddress/login/password info... $script:mysecpassword = ConvertTo-SecureString $password -AsPlainText -Force diff --git a/Tests/integration/UserLocal.Tests.ps1 b/Tests/integration/UserLocal.Tests.ps1 index 8a6931a81..5f1efb6c3 100644 --- a/Tests/integration/UserLocal.Tests.ps1 +++ b/Tests/integration/UserLocal.Tests.ps1 @@ -614,7 +614,7 @@ Describe "Configure User Local" { } - Context "Change name, email, MFA, etc as LDAP User" { + Context "Change type" { BeforeAll { Add-FGTUserRADIUS -Name $pester_userradius -server $pester_userradiusserver1 -secret $pester_userradius_secret @@ -655,26 +655,27 @@ Describe "Configure User Local" { } } +} - Describe "Remove User Local" { - - Context "local" { +Describe "Remove User Local" { - BeforeEach { - Add-FGTUserLocal -Name $pester_userlocal -passwd $pester_userlocalpassword - } + Context "local" { - It "Remove User Local $pester_userlocal by pipeline" { - $userlocal = Get-FGTUserLocal -name $pester_userlocal - $userlocal | Remove-FGTUserLocal -confirm:$false - $userlocal = Get-FGTUserLocal -name $pester_userlocal - $userlocal | Should -Be $NULL - } + BeforeEach { + Add-FGTUserLocal -Name $pester_userlocal -passwd $pester_userlocalpassword + } + It "Remove User Local $pester_userlocal by pipeline" { + $userlocal = Get-FGTUserLocal -name $pester_userlocal + $userlocal | Remove-FGTUserLocal -confirm:$false + $userlocal = Get-FGTUserLocal -name $pester_userlocal + $userlocal | Should -Be $NULL } } - AfterAll { - Disconnect-FGT -confirm:$false - } \ No newline at end of file +} + +AfterAll { + Disconnect-FGT -confirm:$false +} \ No newline at end of file