microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
385 stars 247 forks source link

-myScripts parameter not working on HelperFunctions.ps1? #1595

Closed lvanvugt closed 3 years ago

lvanvugt commented 3 years ago

Issue Wanting to override the standard HelperFunctions.ps1 I have created my own version of it and have added a file reference to the -myScripts parameter of New-BCContainer; see following script. The purpose is to get the following two test apps deployed as these are excluded by the standard HelperFunctions.ps1, but are contained in the artefacts:

Even though my HelperFunctions.ps1 is copied to c:\run\my folder is seems not to be executed as these two extensions are not deployed. See below a zipped version of my HelperFunctions.ps1.

Reading your blog post NavContainerHelper – Overriding scripts in NAV containers did not show me what I might be doing wrong.

Should I be able to see whether it did execute my replacement script?

Scripts used to create container and cause the issue

New-BCContainer -accept_eula:$accept_eula `
                -accept_outdated:$accept_outdated `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -licenseFile $licenseFile `
                -auth UserPassword `
                -credential $credential `
                -memoryLimit:10GB `
                -updateHost `
                -shortcuts StartMenu `
                -isolation process `
                -includeTestToolkit `
                -myScripts @("C:\Users\lvvugt\OneDrive\Documenten\WindowsPowerShell\BcContainerHelper\myScripts\HelperFunctions.ps1")

Full output of scripts

BcContainerHelper is version 1.0.18
BcContainerHelper is running as administrator
Host is Microsoft Windows 10 Pro - 20H2
Docker Client Version is 20.10.0
Docker Server Version is 20.10.0
Removing container Bc17w1UserPw
Removing Bc17w1UserPw from host hosts file
Removing Bc17w1UserPw-* from host hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw
Fetching all docker images
Using image mcr.microsoft.com/dynamicsnav:10.0.19042.630-generic-dev
Creating Container Bc17w1UserPw
Version: 17.2.19367.19735-w1
Style: onprem
Multitenant: No
Platform: 17.0.19353.19730
Generic Tag: 0.1.0.26
Container OS Version: 10.0.19042.630 (20H2)
Host OS Version: 10.0.19042.685 (20H2)
WARNING: Host OS and Base Image Container OS doesn't match and process isolation is specified. If you encounter issues, you could try to specify -isolatio
n hyperv
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file https://www.dropbox.com/s/74kn52tkz08kybn/BC17%20-%20Lvvugt.flf
Downloading C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\my\license.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container Bc17w1UserPw from image mcr.microsoft.com/dynamicsnav:10.0.19042.630-generic-dev
b445d032a3b1d07a9798341c16da029c6d578eb0a874545bbb88e7f6fd6fc4c0
Waiting for container Bc17w1UserPw to be ready
Using artifactUrl https://bcartifacts.azureedge.net/onprem/17.2.19367.19735/w1
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
Copying PowerShell Scripts
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\onprem\17.2.19367.19735\w1\database\Demo Database NAV (17-0).bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Copying Web Client Files
Copying Client Files
Copying ModernDev Files
Copying additional files
Copying ConfigurationPackages
Copying Test Assemblies
Copying Applications
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 80 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.178.94 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.178.94 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.18.48.1 in container hosts file
Starting Container
Hostname is Bc17w1UserPw
PublicDnsName is Bc17w1UserPw
WARNING: DNS resolution not working from within the container.
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint C449BF730622FDB1D2774E927B3C7B3CD1C791BD
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using license file 'c:\run\my\license.flf'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating Lucas as SQL User and add to sysadmin
Creating SUPER user
Container IP Address: 172.18.61.163
Container Hostname  : Bc17w1UserPw
Container Dns Name  : Bc17w1UserPw
Web Client          : http://Bc17w1UserPw/BC/
Dev. Server         : http://Bc17w1UserPw
Dev. ServerInstance : BC
Setting Bc17w1UserPw to 172.18.61.163 in host hosts file

Files:
http://Bc17w1UserPw:8080/ALLanguage.vsix

Container Total Physical Memory is 31.9Gb
Container Free Physical Memory is 15.7Gb

Initialization took 131 seconds
Ready for connections!
Reading CustomSettings.config from Bc17w1UserPw
Creating Desktop Shortcuts for Bc17w1UserPw
Copy from container Bc17w1UserPw (C:\Applications\TestFramework\TestLibraries\Any\Microsoft_Any.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1
UserPw\_Microsoft_Any.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Any.app
Synchronizing Any on tenant default
Installing Any on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\TestFramework\TestLibraries\Assert\Microsoft_Library Assert.app) to C:\ProgramData\BcContainerHelper\Ext
ensions\Bc17w1UserPw\_Microsoft_Library Assert.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Library Assert.app
Synchronizing Library Assert on tenant default
Installing Library Assert on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\TestFramework\TestLibraries\Variable Storage\Microsoft_Library Variable Storage.app) to C:\ProgramData\B
cContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Library Variable Storage.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Library Variable Storage.app
Synchronizing Library Variable Storage on tenant default
Installing Library Variable Storage on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\TestFramework\TestRunner\Microsoft_Test Runner.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w
1UserPw\_Microsoft_Test Runner.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Test Runner.app
Synchronizing Test Runner on tenant default
Installing Test Runner on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\system application\test\Microsoft_System Application Test Library.app) to C:\ProgramData\BcContainerHelp
er\Extensions\Bc17w1UserPw\_Microsoft_System Application Test Library.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_System Application Test Library.app
Synchronizing System Application Test Library on tenant default
Installing System Application Test Library on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-TestLibraries.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1Use
rPw\_Microsoft_Tests-TestLibraries.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-TestLibraries.app
Synchronizing Tests-TestLibraries on tenant default
Installing Tests-TestLibraries on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Bank.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micr
osoft_Tests-Bank.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Bank.app
Synchronizing Tests-Bank on tenant default
Installing Tests-Bank on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Cash Flow.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\
_Microsoft_Tests-Cash Flow.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Cash Flow.app
Synchronizing Tests-Cash Flow on tenant default
Installing Tests-Cash Flow on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Cost Accounting.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1U
serPw\_Microsoft_Tests-Cost Accounting.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Cost Accounting.app
Synchronizing Tests-Cost Accounting on tenant default
Installing Tests-Cost Accounting on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-CRM integration.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1U
serPw\_Microsoft_Tests-CRM integration.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-CRM integration.app
Synchronizing Tests-CRM integration on tenant default
Installing Tests-CRM integration on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Data Exchange.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1Use
rPw\_Microsoft_Tests-Data Exchange.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Data Exchange.app
Synchronizing Tests-Data Exchange on tenant default
Installing Tests-Data Exchange on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Dimension.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\
_Microsoft_Tests-Dimension.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Dimension.app
Synchronizing Tests-Dimension on tenant default
Installing Tests-Dimension on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-ERM.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micro
soft_Tests-ERM.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-ERM.app
Synchronizing Tests-ERM on tenant default
Installing Tests-ERM on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Fixed Asset.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserP
w\_Microsoft_Tests-Fixed Asset.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Fixed Asset.app
Synchronizing Tests-Fixed Asset on tenant default
Installing Tests-Fixed Asset on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-General Journal.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1U
serPw\_Microsoft_Tests-General Journal.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-General Journal.app
Synchronizing Tests-General Journal on tenant default
Installing Tests-General Journal on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Graph.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Mic
rosoft_Tests-Graph.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Graph.app
Synchronizing Tests-Graph on tenant default
Installing Tests-Graph on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Integration.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserP
w\_Microsoft_Tests-Integration.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Integration.app
Synchronizing Tests-Integration on tenant default
Installing Tests-Integration on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Invoicing.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\
_Microsoft_Tests-Invoicing.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Invoicing.app
Synchronizing Tests-Invoicing on tenant default
Installing Tests-Invoicing on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Job.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micro
soft_Tests-Job.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Job.app
Synchronizing Tests-Job on tenant default
Installing Tests-Job on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Local.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Mic
rosoft_Tests-Local.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Local.app
Synchronizing Tests-Local on tenant default
Installing Tests-Local on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Misc.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micr
osoft_Tests-Misc.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Misc.app
Synchronizing Tests-Misc on tenant default
Installing Tests-Misc on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Monitor Sensitive Fields.app) to C:\ProgramData\BcContainerHelper\Extension
s\Bc17w1UserPw\_Microsoft_Tests-Monitor Sensitive Fields.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Monitor Sensitive Fields.app
Synchronizing Tests-Monitor Sensitive Fields on tenant default
Installing Tests-Monitor Sensitive Fields on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Permissions.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserP
w\_Microsoft_Tests-Permissions.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Permissions.app
Synchronizing Tests-Permissions on tenant default
Installing Tests-Permissions on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Physical Inventory.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17
w1UserPw\_Microsoft_Tests-Physical Inventory.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Physical Inventory.app
Synchronizing Tests-Physical Inventory on tenant default
Installing Tests-Physical Inventory on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Prepayment.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw
\_Microsoft_Tests-Prepayment.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Prepayment.app
Synchronizing Tests-Prepayment on tenant default
Installing Tests-Prepayment on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Rapid Start.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserP
w\_Microsoft_Tests-Rapid Start.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Rapid Start.app
Synchronizing Tests-Rapid Start on tenant default
Installing Tests-Rapid Start on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Report.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Mi
crosoft_Tests-Report.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Report.app
Synchronizing Tests-Report on tenant default
Installing Tests-Report on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Resource.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_
Microsoft_Tests-Resource.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Resource.app
Synchronizing Tests-Resource on tenant default
Installing Tests-Resource on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Reverse.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_M
icrosoft_Tests-Reverse.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Reverse.app
Synchronizing Tests-Reverse on tenant default
Installing Tests-Reverse on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-SCM.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micro
soft_Tests-SCM.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-SCM.app
Synchronizing Tests-SCM on tenant default
Installing Tests-SCM on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-SMB.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micro
soft_Tests-SMB.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-SMB.app
Synchronizing Tests-SMB on tenant default
Installing Tests-SMB on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-SMTP.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micr
osoft_Tests-SMTP.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-SMTP.app
Synchronizing Tests-SMTP on tenant default
Installing Tests-SMTP on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Upgrade.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_M
icrosoft_Tests-Upgrade.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Upgrade.app
Synchronizing Tests-Upgrade on tenant default
Installing Tests-Upgrade on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-User.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micr
osoft_Tests-User.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-User.app
Synchronizing Tests-User on tenant default
Installing Tests-User on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-VAT.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Micro
soft_Tests-VAT.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-VAT.app
Synchronizing Tests-VAT on tenant default
Installing Tests-VAT on tenant default
App successfully published
Copy from container Bc17w1UserPw (C:\Applications\BaseApp\Test\Microsoft_Tests-Workflow.app) to C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_
Microsoft_Tests-Workflow.app
Publishing C:\ProgramData\BcContainerHelper\Extensions\Bc17w1UserPw\_Microsoft_Tests-Workflow.app
Synchronizing Tests-Workflow on tenant default
Installing Tests-Workflow on tenant default
App successfully published
TestToolkit successfully imported
Container Bc17w1UserPw successfully created

Use:
Get-BcContainerEventLog -containerName Bc17w1UserPw to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName Bc17w1UserPw to get debug information about the container
Enter-BcContainer -containerName Bc17w1UserPw to open a PowerShell prompt inside the container
Remove-BcContainer -containerName Bc17w1UserPw to remove the container again
docker logs Bc17w1UserPw to retrieve information about URL's again

My HelperFunctions.ps1 HelperFunctions.zip

freddydk commented 3 years ago

My bad That piece of code inside the container is only used when building images or running containers without bccontainerhelper. The same function exists in C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\\HelperFunctions.ps1 Search for tests-singleserver and remove the ones you don't want to exclude - and try again.

lvanvugt commented 3 years ago

OK, did abandon the -myScript option and updated function GetTestToolkitApps in file C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\ [version] \HelperFunctions.ps1

Before

if (!$includeTestLibrariesOnly) {
    # Add Tests
    $apps += @(get-childitem -Path "C:\Applications\*.*" -recurse -filter "Microsoft_Tests-*.app") | Where-Object { $_ -notlike "*\Microsoft_Tests-TestLibraries.app" -and $_ -notlike "*\Microsoft_Tests-Marketing.app" -and $_ -notlike "*\Microsoft_Tests-SINGLESERVER.app" }
 }

After

if (!$includeTestLibrariesOnly) {
    # Add Tests
    $apps += @(get-childitem -Path "C:\Applications\*.*" -recurse -filter "Microsoft_Tests-*.app") | Where-Object { $_ -notlike "*\Microsoft_Tests-TestLibraries.app"  }
 }

Ran my script (see above) again, but no difference. I even added this line to GetTestToolkitApps to see if it was called: Write-Host -ForegroundColor Yellow "GetTestToolkitApps" Did not show, unfortunately.

freddydk commented 3 years ago

Did you restart PowerShell?

lvanvugt commented 3 years ago

Nope. Doing right now.

lvanvugt commented 3 years ago

Yessss

image

image

So it does allow them to be deployed. Not technical issue. Now the question is whether I can run them. Will test that right now.

lvanvugt commented 3 years ago

Tests-SINGLESERVER tests run without technical issues (625 successes - 103 failures) Tests-Marketing tests run without technical issues (679 successes - 12 failures)

lvanvugt commented 3 years ago

Conclusion

-myScripts seems to work, but when used to replace the HelperFunctions.ps1 is operates only on this HelperFunctions.ps1 and not on HelperFunctions.ps1.