Skip to content

Commit 4d97498

Browse files
Copilotjohlju
andcommitted
Fix mock command names in SqlRSSetup tests and add issue reference to CHANGELOG
Co-authored-by: johlju <[email protected]>
1 parent f858de7 commit 4d97498

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323

2424
- Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
2525
clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
26-
are available as aliases for backward compatibility.
26+
are available as aliases for backward compatibility
27+
([issue #2071](https://github.com/dsccommunity/SqlServerDsc/issues/2071)).
2728
- `SqlPermission`
2829
- Refactored to use the new object-based server permission commands
2930
(`Grant-SqlDscServerPermission`, `Deny-SqlDscServerPermission`,

tests/Unit/Classes/SqlRSSetup.Tests.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
728728
}
729729
}
730730

731-
Mock -CommandName Install-SqlDscBIReportServer -MockWith {
731+
Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith {
732732
return 0
733733
}
734734
}
@@ -744,7 +744,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
744744
}
745745
)
746746

747-
Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
747+
Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
748748
}
749749
}
750750
}
@@ -759,7 +759,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
759759
}
760760
}
761761

762-
Mock -CommandName Install-SqlDscBIReportServer -MockWith {
762+
Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith {
763763
return 3010
764764
}
765765

@@ -777,7 +777,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
777777
}
778778
)
779779

780-
Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
780+
Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
781781

782782
Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It
783783
}
@@ -1004,7 +1004,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
10041004
}
10051005
}
10061006

1007-
Mock -CommandName Repair-SqlDscBIReportServer -MockWith {
1007+
Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith {
10081008
return 0
10091009
}
10101010
}
@@ -1020,7 +1020,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
10201020
}
10211021
)
10221022

1023-
Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
1023+
Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
10241024
}
10251025
}
10261026
}
@@ -1035,7 +1035,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
10351035
}
10361036
}
10371037

1038-
Mock -CommandName Repair-SqlDscBIReportServer -MockWith {
1038+
Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith {
10391039
return 3010
10401040
}
10411041

@@ -1053,7 +1053,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
10531053
}
10541054
)
10551055

1056-
Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
1056+
Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
10571057

10581058
Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It
10591059
}

0 commit comments

Comments
 (0)