File tree 3 files changed +58
-6
lines changed
Sampler/Templates/Sampler
3 files changed +58
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
- ` Get-MofSchemaName `
15
15
- Permanently skipped a test that the build worker ` ubuntu-latest ` were
16
16
unable to run due to missing shared library 'libmi'.
17
+ - Now the QA test that verifies that the Unreleased section header is present
18
+ in the CHANGELOG.md correctly supports ChangelogManagement v3.0.1.
17
19
- Task ` Convert_Pester_Coverage `
18
20
- No longer throws an exception when there was just one missed command
19
21
for a test suite. Fixes [ #407 ] ( https://github.com/gaelcolas/Sampler/issues/407 ) .
@@ -23,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
25
- Task ` Build_ModuleOutput_ModuleBuilder `
24
26
- Proper support for DSC composite resources (* .schema.psm1).
25
27
28
+ ### Changed
29
+
30
+ - The QA tests can now be debugged by ` Invoke-Pester ` directly, before it
31
+ had to be started by the build script ` build.ps1 ` . This will also help
32
+ the Pester Tests VS Code extension to be able to run the tests.
33
+
26
34
## [ 0.116.0] - 2022-11-08
27
35
28
36
### Removed
Original file line number Diff line number Diff line change 1
1
BeforeDiscovery {
2
+ $projectPath = "$($PSScriptRoot)\..\.." | Convert-Path
3
+
4
+ <#
5
+ If the QA tests are run outside of the build script (e.g with Invoke-Pester)
6
+ the parent scope has not set the variable $ProjectName.
7
+ #>
8
+ if (-not $ProjectName)
9
+ {
10
+ # Assuming project folder name is project name.
11
+ $ProjectName = Get-SamplerProjectName -BuildRoot $projectPath
12
+ }
13
+
2
14
$script:moduleName = $ProjectName
3
15
4
16
Remove-Module -Name $script:moduleName -Force -ErrorAction SilentlyContinue
@@ -9,11 +21,21 @@ BeforeDiscovery {
9
21
}
10
22
11
23
BeforeAll {
12
- $script:moduleName = $ProjectName
13
-
14
24
# Convert-Path required for PS7 or Join-Path fails
15
25
$projectPath = "$($PSScriptRoot)\..\.." | Convert-Path
16
26
27
+ <#
28
+ If the QA tests are run outside of the build script (e.g with Invoke-Pester)
29
+ the parent scope has not set the variable $ProjectName.
30
+ #>
31
+ if (-not $ProjectName)
32
+ {
33
+ # Assuming project folder name is project name.
34
+ $ProjectName = Get-SamplerProjectName -BuildRoot $projectPath
35
+ }
36
+
37
+ $script:moduleName = $ProjectName
38
+
17
39
$sourcePath = (
18
40
Get-ChildItem -Path $projectPath\*\*.psd1 |
19
41
Where-Object -FilterScript {
@@ -57,7 +79,7 @@ Describe 'Changelog Management' -Tag 'Changelog' {
57
79
}
58
80
59
81
It 'Changelog should have an Unreleased header' -Skip:$skipTest {
60
- (Get-ChangelogData -Path (Join-Path -Path $ProjectPath -ChildPath 'CHANGELOG.md') -ErrorAction Stop).Unreleased.RawData | Should -Not -BeNullOrEmpty
82
+ (Get-ChangelogData -Path (Join-Path -Path $ProjectPath -ChildPath 'CHANGELOG.md') -ErrorAction Stop).Unreleased | Should -Not -BeNullOrEmpty
61
83
}
62
84
}
63
85
Original file line number Diff line number Diff line change 1
1
BeforeDiscovery {
2
+ $projectPath = " $ ( $PSScriptRoot ) \..\.." | Convert-Path
3
+
4
+ <#
5
+ If the QA tests are run outside of the build script (e.g with Invoke-Pester)
6
+ the parent scope has not set the variable $ProjectName.
7
+ #>
8
+ if (-not $ProjectName )
9
+ {
10
+ # Assuming project folder name is project name.
11
+ $ProjectName = Get-SamplerProjectName - BuildRoot $projectPath
12
+ }
13
+
2
14
$script :moduleName = $ProjectName
3
15
4
16
Remove-Module - Name $script :moduleName - Force - ErrorAction SilentlyContinue
@@ -9,11 +21,21 @@ BeforeDiscovery {
9
21
}
10
22
11
23
BeforeAll {
12
- $script :moduleName = $ProjectName
13
-
14
24
# Convert-Path required for PS7 or Join-Path fails
15
25
$projectPath = " $ ( $PSScriptRoot ) \..\.." | Convert-Path
16
26
27
+ <#
28
+ If the QA tests are run outside of the build script (e.g with Invoke-Pester)
29
+ the parent scope has not set the variable $ProjectName.
30
+ #>
31
+ if (-not $ProjectName )
32
+ {
33
+ # Assuming project folder name is project name.
34
+ $ProjectName = Get-SamplerProjectName - BuildRoot $projectPath
35
+ }
36
+
37
+ $script :moduleName = $ProjectName
38
+
17
39
$sourcePath = (
18
40
Get-ChildItem - Path $projectPath \* \* .psd1 |
19
41
Where-Object - FilterScript {
@@ -57,7 +79,7 @@ Describe 'Changelog Management' -Tag 'Changelog' {
57
79
}
58
80
59
81
It ' Changelog should have an Unreleased header' - Skip:$skipTest {
60
- (Get-ChangelogData - Path (Join-Path - Path $ProjectPath - ChildPath ' CHANGELOG.md' ) - ErrorAction Stop).Unreleased.RawData | Should -Not - BeNullOrEmpty
82
+ (Get-ChangelogData - Path (Join-Path - Path $ProjectPath - ChildPath ' CHANGELOG.md' ) - ErrorAction Stop).Unreleased | Should -Not - BeNullOrEmpty
61
83
}
62
84
}
63
85
You can’t perform that action at this time.
0 commit comments