Skip to content

Commit 37b433c

Browse files
authored
SqlServerDsc: Cleanup in unit tests and localization files (#2090)
- SqlServerDsc - Cleanup in unit tests for classes. - Cleanup in localization string files.
1 parent f9b9514 commit 37b433c

11 files changed

+33
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7373
PowerShell.
7474
- SqlServerDsc
7575
- Fix localization tests.
76+
- Cleanup in unit tests for classes.
77+
- Cleanup in localization string files.
7678
- `SqlAudit`
7779
- Fix localization strings in `Assert` method.
7880
- `Save-SqlDscSqlServerMediaFile`

source/en-US/SqlAudit.strings.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<#
22
.SYNOPSIS
33
The localized resource strings in English (en-US) for the
4-
resource SqlPermission.
4+
resource SqlAudit.
55
#>
66

77
ConvertFrom-StringData @'
88
## Strings overrides for the ResourceBase's default strings.
99
# None
1010
11-
## Strings directly used by the derived class SqlDatabasePermission.
11+
## Strings directly used by the derived class SqlAudit.
1212
BothFileSizePropertiesMustBeSet = Both the parameter MaximumFileSize and MaximumFileSizeUnit must be assigned. (SA0001)
1313
ReservDiskSpaceWithoutMaximumFiles = The parameter ReservDiskSpace can only be used together with the parameter MaximumFiles. (SA0002)
1414
PathInvalid = The path '{0}' does not exist. Audit file can only be created in a path that already exist and where the SQL Server instance has permission to write. (SA0003)

source/en-US/SqlPermission.strings.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ConvertFrom-StringData @'
88
## Strings overrides for the ResourceBase's default strings.
99
# None
1010
11-
## Strings directly used by the derived class SqlDatabasePermission.
11+
## Strings directly used by the derived class SqlPermission.
1212
EvaluateServerPermissionForPrincipal = Evaluate the current permissions for the principal '{0}' on the instance '{1}'. (SP0001)
1313
DesiredPermissionAreAbsent = The desired permission '{0}' that shall be present are absent. (SP0002)
1414
DesiredAbsentPermissionArePresent = The desired permission '{0}' that shall be absent are present. (SP0003)

tests/Unit/Classes/DatabasePermission.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Unit test for DatabasePermission class.
4+
#>
5+
16
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
27
param ()
38

tests/Unit/Classes/ServerPermission.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Unit test for ServerPermission class.
4+
#>
5+
16
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
27
param ()
38

tests/Unit/Classes/SqlAudit.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
Unit test for DSC_SqlAudit DSC resource.
3+
Unit test for SqlAudit DSC resource.
44
#>
55

66
# Suppressing this rule because Script Analyzer does not understand Pester's syntax.

tests/Unit/Classes/SqlDatabasePermission.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
Unit test for DSC_SqlDatabasePermission DSC resource.
3+
Unit test for SqlDatabasePermission DSC resource.
44
#>
55

66
# Suppressing this rule because Script Analyzer does not understand Pester's syntax.

tests/Unit/Classes/SqlPermission.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
Unit test for DSC_SqlPermission DSC resource.
3+
Unit test for SqlPermission DSC resource.
44
#>
55

66
# Suppressing this rule because Script Analyzer does not understand Pester's syntax.

tests/Unit/Classes/SqlReason.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Unit test for SqlReason class.
4+
#>
5+
16
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
27
param ()
38

tests/Unit/Classes/SqlResourceBase.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<#
2+
.SYNOPSIS
3+
Unit test for SqlResourceBase class.
4+
#>
5+
16
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
27
param ()
38

0 commit comments

Comments
 (0)