Update STIG.BackupRevert.tests.ps1

This commit is contained in:
hinderjd 2024-07-23 10:31:06 -06:00
Родитель 42d23fb692
Коммит 45c8643c7e
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -11,15 +11,15 @@ Describe 'Backup-StigSettings' {
Mock Invoke-DscResource -MockWith { return $get }
It 'Should not throw WindowsServer' {
{Backup-StigSettings -StigName "WindowsServer-2019-MS-2.7.xml"} | Should -not -Throw
{Backup-StigSettings -StigName "WindowsServer-2019-MS-3.1.xml"} | Should -not -Throw
}
It 'Should not throw WindowsClient' {
{Backup-StigSettings -StigName "WindowsClient-10-2.7.xml"} | Should -not -Throw
{Backup-StigSettings -StigName "WindowsClient-10-3.1.xml"} | Should -not -Throw
}
It 'Should not throw Sql Server 2016' {
{Backup-StigSettings -StigName "SqlServer-2016-Instance-2.8.xml"} | Should -not -Throw
{Backup-StigSettings -StigName "SqlServer-2016-Instance-3.1.xml"} | Should -not -Throw
}
It 'Should return string with valid STIGs' {
@ -41,15 +41,15 @@ Describe 'Restore-StigSettings' {
Mock -CommandName Invoke-DscResource -MockWith {return $get}
It 'Should not throw for Server' {
{Restore-StigSettings -StigName "WindowsServer-2019-MS-2.7.xml" -Confirm:$false} | Should -Not -Throw
{Restore-StigSettings -StigName "WindowsServer-2019-MS-3.1.xml" -Confirm:$false} | Should -Not -Throw
}
It 'Should not throw for Client' {
{Restore-StigSettings -StigName "WindowsClient-10-2.7.xml" -Confirm:$false} | Should -Not -Throw
{Restore-StigSettings -StigName "WindowsClient-10-3.1.xml" -Confirm:$false} | Should -Not -Throw
}
It 'Should not throw for Sql Server 2016' {
{Restore-StigSettings -StigName "SqlServer-2016-Instance-2.8.xml" -Confirm:$false} | Should -Not -Throw
{Restore-StigSettings -StigName "SqlServer-2016-Instance-3.1.xml" -Confirm:$false} | Should -Not -Throw
}
}