Skip to content

Fix Missing Test Apps after Import-TestToolkitToBcContainer #3841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ function GetTestToolkitApps {
}
$appFiles = @()
$apps | ForEach-Object {
$appFiles += @(get-childitem -Path $symbolsFolder -Filter "$($_)_*.*.*.*.app" | Where-Object {($version.Major -ge 17 -or ($_.Name -notlike 'Microsoft_Tests-Marketing_*.*.*.*.app')) -and $_.Name -notlike "Microsoft_Tests-SINGLESERVER_*.*.*.*.app"} | ForEach-Object { $_.FullName })
$appFiles += @(get-childitem -Path $symbolsFolder -Filter "$($_)_*.*.*.*.app" | Where-Object { ($version.Major -ge 17 -or ($_.Name -notlike 'Microsoft_Tests-Marketing_*.*.*.*.app')) -and $_.Name -notlike "Microsoft_Tests-SINGLESERVER_*.*.*.*.app" } | ForEach-Object { $_.FullName })
}
$appFiles | Select-Object -Unique
}
Expand All @@ -424,9 +424,10 @@ function GetTestToolkitApps {

if (!$includeTestFrameworkOnly) {
# Add Test Libraries
$apps += "Microsoft_System Application Test Library.app", "Microsoft_Business Foundation Test Libraries.app", "Microsoft_Tests-TestLibraries.app", 'Microsoft_AI Test Toolkit.app' | ForEach-Object {
$apps += "Microsoft_System Application Test Library.app", "Microsoft_Business Foundation Test Libraries.app", "Microsoft_Tests-TestLibraries.app", 'Microsoft_AI Test Toolkit.app', 'Microsoft_Library Outlook REST API.app', 'Microsoft_Prevent Metadata Updates.app' | ForEach-Object {
@(get-childitem -Path "C:\Applications\*.*" -recurse -filter $_)
}
$apps += gci "C:\Applications\*\Test Library" | gci -filter "*.app"

if (!$includeTestLibrariesOnly) {
# Add Tests
Expand All @@ -435,7 +436,7 @@ function GetTestToolkitApps {
@(get-childitem -Path "C:\Applications\*.*" -recurse -filter $_)
}
}
$apps += @(get-childitem -Path "C:\Applications\*.*" -recurse -filter "Microsoft_Tests-*.app") | Where-Object { $_ -notlike "*\Microsoft_Tests-TestLibraries.app" -and ($version.Major -ge 17 -or ($_ -notlike "*\Microsoft_Tests-Marketing.app")) -and $_ -notlike "*\Microsoft_Tests-SINGLESERVER.app" }
$apps += @(get-childitem -Path "C:\Applications\*.*" -recurse) | ? { $_.name -like "Microsoft_Tests-*.app" -or $_.FullName -match '\\Test\\.*[ _]Test(?:s?| Automations).app' } | Where-Object { $_ -notlike "*\Microsoft_Tests-TestLibraries.app" -and ($version.Major -ge 17 -or ($_ -notlike "*\Microsoft_Tests-Marketing.app")) -and $_ -notlike "*\Microsoft_Tests-SINGLESERVER.app" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this double-add some of the Test Library apps from above?

}
}
}
Expand All @@ -458,6 +459,7 @@ function GetTestToolkitApps {
}
}


function GetExtendedErrorMessage {
Param(
$errorRecord
Expand Down Expand Up @@ -1647,4 +1649,4 @@ function Write-PSCallStack {
)
Write-Host "PS CallStack $message :"
Get-PSCallStack | ForEach-Object { Write-Host "- $($_.FunctionName) ($([System.IO.Path]::GetFileName($_.ScriptName)) Line $($_.ScriptLineNumber))" }
}
}
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Use FileStream when uploading per tenant extensions to online environments to su
Remove duplicate quotes in new Source and Build elements in apps generated by BcContainerHelper and AL-Go
Create filesonly build container before enumerating installed apps in Run-AlPipeline
AL-Go issue 1460 Don't fail if a dependency is installed in a newer version during build - upgrade if needed
Issue 3729 Missing Test Apps after Import-TestToolkitToBcContainer

6.0.34
Compare files before giving a warning about apps with the same name in Run-AlPipeline
Expand Down