Skip to content

Commit c780423

Browse files
authored
SqlServerDsc: Some maintenance resolving issues (#1887)
1 parent 63e9158 commit c780423

7 files changed

+17
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
- Now the new label 'command proposal' is an exempt for labeling issues stale.
3434
- Update the initializing header for all integration test to be equal to
3535
the unit tests.
36+
- Rename task jobs in Azure Pipelines ([issue #1881](https://github.com/dsccommunity/SqlServerDsc/issues/1881)).
3637
- `Get-SqlDscAudit`
3738
- The parameter `Name` is no longer mandatory. When left out all the current
3839
audits are returned ([issue #1812](https://github.com/dsccommunity/SqlServerDsc/issues/1812)).
@@ -45,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4546
also be set in the session.
4647
- Now imports the preferred module into the global scope so that MOF-based
4748
resources (that is in another module scope) can use the imported module.
49+
- Some code cleanup ([issue #1881](https://github.com/dsccommunity/SqlServerDsc/issues/1881)).
4850

4951
### Fixed
5052

@@ -64,6 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6466
- Fixed issue of configuring reporting services ([issue #1868](https://github.com/dsccommunity/SqlServerDsc/issues/1868)).
6567
- Test renamed to `When Reports virtual directory is different` so it
6668
is more correct and not a duplicate.
69+
- Integration tests configuration names was renamed to better tell what
70+
the configuration does ([issue #1880](https://github.com/dsccommunity/SqlServerDsc/issues/1880)).
6771

6872
## [16.1.0] - 2023-02-28
6973

azure-pipelines.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ stages:
190190
Import-Module -Name ./tests/TestHelpers/CommonTestHelper.psm1
191191
Remove-PowerShellModuleFromCI -Name @('SqlServer', 'SQLPS')
192192
Remove-Module -Name CommonTestHelper
193-
name: removeSqlServerModule
194-
displayName: 'Remove SqlServer module'
193+
name: cleanCIWorker
194+
displayName: 'Clean CI worker'
195195
- powershell: |
196196
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterTag $(TEST_CONFIGURATION) -PesterPath @(
197197
# Run the integration tests in a specific group order.
@@ -292,8 +292,8 @@ stages:
292292
Import-Module -Name ./tests/TestHelpers/CommonTestHelper.psm1
293293
Remove-PowerShellModuleFromCI -Name @('SqlServer', 'SQLPS')
294294
Remove-Module -Name CommonTestHelper
295-
name: removeSqlServerModule
296-
displayName: 'Remove SqlServer module'
295+
name: cleanCIWorker
296+
displayName: 'Clean CI worker'
297297
- powershell: |
298298
./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterTag $(TEST_CONFIGURATION) -PesterPath @(
299299
# Run the integration tests in a specific group order.

source/Public/Import-SqlDscPreferredModule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Import-SqlDscPreferredModule
110110
$modulePathUser = [System.String] [System.Environment]::GetEnvironmentVariable('PSModulePath', 'User')
111111
$modulePathMachine = [System.String] [System.Environment]::GetEnvironmentVariable('PSModulePath', 'Machine')
112112

113-
$modulePath = $modulePathSession + ';' + $modulePathUser + ';' + $modulePathMachine
113+
$modulePath = $modulePathSession, $modulePathUser, $modulePathMachine -join ';'
114114

115115
$modulePathArray = $modulePath -split ';' |
116116
Where-Object -FilterScript {

tests/Integration/DSC_SqlRS.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
119119
}
120120

121121
Context ('When using configuration <_>') -ForEach @(
122-
"$($script:dscResourceName)_InstallReportingServices_Config"
122+
"$($script:dscResourceName)_ConfigureReportingServices_Config"
123123
) {
124124
BeforeAll {
125125
$configurationName = $_

tests/Integration/DSC_SqlRS.config.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Configuration DSC_SqlRS_CreateDependencies_Config
159159
.SYNOPSIS
160160
Configures the Reporting Services.
161161
#>
162-
Configuration DSC_SqlRS_InstallReportingServices_Config
162+
Configuration DSC_SqlRS_ConfigureReportingServices_Config
163163
{
164164
Import-DscResource -ModuleName 'SqlServerDsc'
165165

tests/Integration/DSC_SqlRS_Default.Integration.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
119119
}
120120

121121
Context ('When using configuration <_>') -ForEach @(
122-
"$($script:dscResourceName)_InstallReportingServices_Config"
122+
"$($script:dscResourceName)_ConfigureReportingServices_Config"
123123
) {
124124
BeforeAll {
125125
$configurationName = $_
@@ -240,7 +240,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
240240
}
241241

242242
Context ('When using configuration <_>') -ForEach @(
243-
"$($script:dscResourceName)_InstallReportingServices_ConfigureSsl_Config"
243+
"$($script:dscResourceName)_ConfigureSsl_Config"
244244
) {
245245
BeforeAll {
246246
$configurationName = $_
@@ -314,7 +314,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
314314
}
315315

316316
Context ('When using configuration <_>') -ForEach @(
317-
"$($script:dscResourceName)_InstallReportingServices_RestoreToNoSsl_Config"
317+
"$($script:dscResourceName)_RestoreToNoSsl_Config"
318318
) {
319319
BeforeAll {
320320
$configurationName = $_

tests/Integration/DSC_SqlRS_Default.config.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Configuration DSC_SqlRS_CreateDependencies_Config
159159
.SYNOPSIS
160160
Configures the Reporting Services.
161161
#>
162-
Configuration DSC_SqlRS_InstallReportingServices_Config
162+
Configuration DSC_SqlRS_ConfigureReportingServices_Config
163163
{
164164
Import-DscResource -ModuleName 'SqlServerDsc'
165165

@@ -190,7 +190,7 @@ Configuration DSC_SqlRS_InstallReportingServices_Config
190190
.SYNOPSIS
191191
Enables SSL on the Reporting Services.
192192
#>
193-
Configuration DSC_SqlRS_InstallReportingServices_ConfigureSsl_Config
193+
Configuration DSC_SqlRS_ConfigureSsl_Config
194194
{
195195
Import-DscResource -ModuleName 'SqlServerDsc'
196196

@@ -222,7 +222,7 @@ Configuration DSC_SqlRS_InstallReportingServices_ConfigureSsl_Config
222222
.SYNOPSIS
223223
Disables SSL on the Reporting Services.
224224
#>
225-
Configuration DSC_SqlRS_InstallReportingServices_RestoreToNoSsl_Config
225+
Configuration DSC_SqlRS_RestoreToNoSsl_Config
226226
{
227227
Import-DscResource -ModuleName 'SqlServerDsc'
228228

0 commit comments

Comments
 (0)