diff --git a/tests/Unit/DSC_SqlRS.Tests.ps1 b/tests/Unit/DSC_SqlRS.Tests.ps1 index a6bc8c7081..36643a787e 100644 --- a/tests/Unit/DSC_SqlRS.Tests.ps1 +++ b/tests/Unit/DSC_SqlRS.Tests.ps1 @@ -60,17 +60,12 @@ Describe 'SqlRS\Get-TargetResource' -Tag 'Get' { $mockReportingServicesDatabaseDefaultInstanceName = $mockDefaultInstanceName $mockReportsApplicationName = 'ReportServerWebApp' - $mockReportsApplicationNameLegacy = 'ReportManager' $mockReportServerApplicationName = 'ReportServerWebService' $mockReportsApplicationUrl = 'http://+:80' $mockReportServerApplicationUrl = 'http://+:80' $mockVirtualDirectoryReportManagerName = 'Reports_SQL2016' $mockVirtualDirectoryReportServerName = 'ReportServer_SQL2016' - $mockInvokeCimMethod = { - throw 'Should not call Invoke-CimMethod directly, should call the wrapper Invoke-RsCimMethod.' - } - $mockInvokeRsCimMethod_ListReservedUrls = { return New-Object -TypeName Object | Add-Member -MemberType ScriptProperty -Name 'Application' -Value { @@ -87,18 +82,6 @@ Describe 'SqlRS\Get-TargetResource' -Tag 'Get' { } -PassThru -Force } - $mockInvokeRsCimMethod_GenerateDatabaseCreationScript = { - return @{ - Script = 'select * from something' - } - } - - $mockInvokeRsCimMethod_GenerateDatabaseRightsScript = { - return @{ - Script = 'select * from something' - } - } - $mockGetCimInstance_ConfigurationSetting_NamedInstance = { return @( ( @@ -134,30 +117,10 @@ Describe 'SqlRS\Get-TargetResource' -Tag 'Get' { Add-Member -MemberType NoteProperty -Name 'SecureConnectionLevel' -Value $mockDynamicSecureConnectionLevel -PassThru -Force } - $mockGetCimInstance_ConfigurationSetting_ParameterFilter = { - $ClassName -eq 'MSReportServer_ConfigurationSetting' - } - - $mockGetCimInstance_Language = { - return @{ - Language = '1033' - } - } - - $mockGetCimInstance_OperatingSystem_ParameterFilter = { - $ClassName -eq 'Win32_OperatingSystem' - } - Mock -CommandName Invoke-RsCimMethod -MockWith $mockInvokeRsCimMethod_ListReservedUrls -ParameterFilter { $MethodName -eq 'ListReservedUrls' } - <# - This is mocked here so that no calls are made to it directly, - or if any mock of Invoke-RsCimMethod are wrong. - #> - Mock -CommandName Invoke-CimMethod -MockWith $mockInvokeCimMethod - InModuleScope -ScriptBlock { $script:mockNamedInstanceName = 'INSTANCE' $script:mockReportingServicesDatabaseServerName = 'SERVER'