Skip to content
Closed
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
13 changes: 13 additions & 0 deletions build/projects/Apps (W1)/.AL-Go/RunTestsInBcContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@ Param(
[Hashtable]$parameters
)


if ($null -ne $env:settings) {
$alGoSettings = $env:settings | ConvertFrom-Json
if (($alGoSettings.PSObject.Properties.Name -contains "doNotImportTestData") -and ($alGoSettings.doNotImportTestData -eq $true)) {
Write-Host "Using test type UnitTest as doNotImportTestData is set to true in AL-Go settings"
$parameters["testType"] = "UnitTest"
} else {
Write-Host "doNotImportTestData not found in AL-Go settings or is set to false. Using default test type."
}
} else {
Write-Host "No AL-Go settings found in environment variable. Using default test type."
}

$script = Join-Path $PSScriptRoot "../../../scripts/RunTestsInBcContainer.ps1" -Resolve
. $script -parameters $parameters
11 changes: 10 additions & 1 deletion build/projects/Apps (W1)/.AL-Go/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"NO",
"NZ",
"SE",
"US"
"US",
"UnitTests"
],
"ConditionalSettings": [
{
Expand Down Expand Up @@ -224,6 +225,14 @@
"doNotPublishApps": true
}
},
{
"buildModes": [
"UnitTests"
],
"settings": {
"doNotImportTestData": true
}
},
{
"branches": [
"releases/*.[0-5]"
Expand Down
13 changes: 13 additions & 0 deletions build/scripts/ImportTestDataInBcContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,18 @@ foreach ($app in (Get-BcContainerAppInfo -containerName $ContainerName -tenantSp
Write-Host "App: $($app.Name) ($($app.Version)) - Scope: $($app.Scope) - $($app.IsInstalled) / $($app.IsPublished)"
}

if ($null -ne $env:settings) {
$alGoSettings = $env:settings | ConvertFrom-Json
if (($alGoSettings.PSObject.Properties.Name -contains "doNotImportTestData") -and ($alGoSettings.doNotImportTestData -eq $true)) {
Write-Host "Skipping demo data generation as doNotImportTestData is set to true in AL-Go settings"
return
} else {
Write-Host "doNotImportTestData not found in AL-Go settings or is set to false. Proceeding with demo data generation."
}
} else {
Write-Host "No AL-Go settings found in environment variable. Proceeding with demo data generation."
}


# Generate demo data in the container
Invoke-ContosoDemoTool -ContainerName $parameters.ContainerName
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"codeunitId": 133508,
"codeunitName": "E-Doc. PO Matching Unit Tests",
"method": "*",
"bug": "610664"
}
Loading