From 7de6c9994aa78df995a56e11b06727cb501045b1 Mon Sep 17 00:00:00 2001 From: Saravana Raj Balasubramanian Date: Sun, 29 Sep 2024 08:51:13 +0530 Subject: [PATCH] version 16 --- tests/Unit/DSC_SqlSetup.Tests.ps1 | 42 ------------------------------- 1 file changed, 42 deletions(-) diff --git a/tests/Unit/DSC_SqlSetup.Tests.ps1 b/tests/Unit/DSC_SqlSetup.Tests.ps1 index 9cd09980d..b0f66d8e2 100644 --- a/tests/Unit/DSC_SqlSetup.Tests.ps1 +++ b/tests/Unit/DSC_SqlSetup.Tests.ps1 @@ -2481,48 +2481,6 @@ Describe 'SqlSetup\Set-TargetResource' -Tag 'Set' { } } - Context 'When installing the database engine and ProductCoveredBySA is true' { - BeforeAll { - Mock -CommandName Get-TargetResource -MockWith { - return @{ - Features = '' - } - } - } - - It 'Should set the system in the desired state when feature is SQLENGINE' { - $mockStartSqlSetupProcessExpectedArgument = @{ - Quiet = 'True' - IAcceptSQLServerLicenseTerms = 'True' - Action = 'Install' - InstanceName = 'MSSQLSERVER' - Features = 'SQLENGINE' - SQLSysAdminAccounts = 'COMPANY\sqladmin COMPANY\SQLAdmins COMPANY\User1' - PID = '1FAKE-2FAKE-3FAKE-4FAKE-5FAKE' - ProductCoveredBySA = 'True' - } - - InModuleScope -ScriptBlock { - Set-StrictMode -Version 1.0 - - $mockSetTargetResourceParameters = @{ - Features = 'SQLENGINE' - SQLSysAdminAccounts = 'COMPANY\User1', 'COMPANY\SQLAdmins' - InstanceName = 'MSSQLSERVER' - SourceCredential = $null - SourcePath = $TestDrive - ProductKey = '1FAKE-2FAKE-3FAKE-4FAKE-5FAKE' - ProductCoveredBySA = $true - ServerName = 'host.company.local' - } - - { Set-TargetResource @mockSetTargetResourceParameters } | Should -Not -Throw - } - - Should -Invoke -CommandName Start-SqlSetupProcess -Exactly -Times 1 -Scope It - } - } - Context 'When installing the database engine and enabling the TCP protocol' { BeforeAll { Mock -CommandName Get-TargetResource -MockWith {