Skip to content

Commit

Permalink
adjusted tests for BeforeDiscovery use
Browse files Browse the repository at this point in the history
  • Loading branch information
techthoughts2 committed Aug 17, 2024
1 parent 3065365 commit 6ed822c
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.21.0]

- Catesta template module changes
- Unit and infra tests changed from use of import using `BeforeAll` to `BeforeDiscovery`
- Catesta primary module changes
- Unit and infra tests changed from use of import using `BeforeAll` to `BeforeDiscovery`

## [2.20.0]

- Catesta template module changes
Expand Down
2 changes: 1 addition & 1 deletion docs/Catesta.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: Catesta
Module Guid: 6796b193-9013-468a-b022-837749af2d06
Download Help Link: NA
Help Version: 2.20.0
Help Version: 2.21.0
Locale: en-US
---

Expand Down
2 changes: 1 addition & 1 deletion src/Catesta.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Add-BuildTask Test {
$pesterConfiguration.CodeCoverage.Path = "/Users/runner/work/$ModuleName/$ModuleName/src/$ModuleName/*/*.ps1"
}
else {
$pesterConfiguration.CodeCoverage.Path = "..\..\..\src\$ModuleName\*\*.ps1"
$pesterConfiguration.CodeCoverage.Path = "..\..\..\$ModuleName\*\*.ps1"
}
$pesterConfiguration.TestResult.Enabled = $true
$pesterConfiguration.TestResult.OutputPath = "$testOutPutPath\PesterTests.xml"
Expand Down
2 changes: 1 addition & 1 deletion src/Catesta/Catesta.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'Catesta.psm1'

# Version number of this module.
ModuleVersion = '2.20.0'
ModuleVersion = '2.21.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
2 changes: 1 addition & 1 deletion src/Catesta/Resources/Module/src/PSModule.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ elseif ($PLASTER_PARAM_Pester -eq '5') {
$pesterConfiguration.Run.PassThru = $true
$pesterConfiguration.Run.Exit = $false
$pesterConfiguration.CodeCoverage.Enabled = $true
$pesterConfiguration.CodeCoverage.Path = "..\..\..\src\$ModuleName\*\*.ps1"
$pesterConfiguration.CodeCoverage.Path = "..\..\..\$ModuleName\*\*.ps1"
$pesterConfiguration.CodeCoverage.CoveragePercentTarget = $script:coverageThreshold
$pesterConfiguration.CodeCoverage.OutputPath = "$codeCovPath\CodeCoverage.xml"
$pesterConfiguration.CodeCoverage.OutputFormat = 'JaCoCo'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = '<%=$PLASTER_PARAM_ModuleName%>'
$PathToManifest = [System.IO.Path]::Combine('..', '..', '..', $ModuleName, "$ModuleName.psd1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = '<%=$PLASTER_PARAM_ModuleName%>'
$PathToManifest = [System.IO.Path]::Combine('..', '..', '..', $ModuleName, "$ModuleName.psd1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = '<%=$PLASTER_PARAM_ModuleName%>'
$PathToManifest = [System.IO.Path]::Combine('..', '..', $ModuleName, "$ModuleName.psd1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = '<%=$PLASTER_PARAM_ModuleName%>'
$vaultName = '<%=$PLASTER_PARAM_ModuleName%>'
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Integration/New-ModuleProject.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = 'Catesta'
$PathToManifest = [System.IO.Path]::Combine('..', '..', 'Artifacts', "$ModuleName.psd1")
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Integration/New-VaultProject.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = 'Catesta'
$PathToManifest = [System.IO.Path]::Combine('..', '..', 'Artifacts', "$ModuleName.psd1")
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Unit/Public/New-ModuleProject.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = 'Catesta'
$PathToManifest = [System.IO.Path]::Combine('..', '..', '..', $ModuleName, "$ModuleName.psd1")
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Unit/Public/New-VaultProject.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BeforeAll {
BeforeDiscovery {
Set-Location -Path $PSScriptRoot
$ModuleName = 'Catesta'
$PathToManifest = [System.IO.Path]::Combine('..', '..', '..', $ModuleName, "$ModuleName.psd1")
Expand Down

0 comments on commit 6ed822c

Please sign in to comment.