Skip to content

Commit

Permalink
test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Nov 26, 2023
1 parent ab71d75 commit d33443e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function CalculateProjectsAndApps {
$excludeProjectList | ForEach-Object { Write-Host "- $_" }
foreach($mask in 'Apps','Dependencies') {
$allApps = @{}
foreach($folder in (Get-ChildItem -Path $tempFolder -Directory)) {
foreach($folder in (Get-ChildItem -Path $tempFolder -Filter '*' | Where-Object { $_.PSIsContainer })) {
if ($folder.Name -match "^(.*)-main-$mask-(\d*\.\d*\.\d*\.\d*)$") {
$project = $Matches[1]
Write-Host "Project: $project"
Expand Down
18 changes: 9 additions & 9 deletions Tests/BuildReferenceDocumentation.Action.Test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ Describe "BuildReferenceDocumentation Action Tests" {
. (Join-Path $scriptRoot 'BuildReferenceDocumentation.HelperFunctions.ps1')

Mock Get-ChildItem {
if ($directory) {
return @(
[PSCustomObject]@{ Name = 'P1-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P1-main-Apps-1.0.0.0' }
[PSCustomObject]@{ Name = 'P2-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P2-main-Apps-1.0.0.0' }
[PSCustomObject]@{ Name = 'P3-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P3-main-Apps-1.0.0.0' }
[PSCustomObject]@{ Name = 'P4-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P4-main-Apps-1.0.0.0' }
)
}
else {
if ($filter -eq '*.app') {
$project = $path.Substring($path.LastIndexOf('\')+1,2)
$noOfApps = [int]$project.substring(1,1)
$apps = @()
Expand All @@ -45,6 +37,14 @@ Describe "BuildReferenceDocumentation Action Tests" {
}
return $apps
}
else {
return @(
[PSCustomObject]@{ Name = 'P1-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P1-main-Apps-1.0.0.0'; "PsIsContainer" = $true }
[PSCustomObject]@{ Name = 'P2-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P2-main-Apps-1.0.0.0'; "PsIsContainer" = $true }
[PSCustomObject]@{ Name = 'P3-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P3-main-Apps-1.0.0.0'; "PsIsContainer" = $true }
[PSCustomObject]@{ Name = 'P4-main-Apps-1.0.0.0'; FullName = Join-Path $path 'P4-main-Apps-1.0.0.0'; "PsIsContainer" = $true }
)
}
}

$allApps = CalculateProjectsAndApps -tempFolder 'c:\temp' -projects @('P1','P2') -excludeProjects @('P3')
Expand Down

0 comments on commit d33443e

Please sign in to comment.