• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 43393685734
79%
master: 79%

Build:
Build:
LAST BUILD BRANCH: CP-314185-typed-card-order
DEFAULT BRANCH: master
Ran 13 Nov 2026 08:30AM UTC
Jobs 1
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Nov 2026 08:29AM UTC coverage: 78.996%. Remained the same
43393685734

push

github

web-flow
CP-312156: Initialise the PowerShell module where $PROFILE isn't set (#7402)

Initialize-Environment.ps1, which runs when XenServerPSModule is
imported, finds the user's profile folder with Split-Path $PROFILE. Only
the PowerShell host sets $PROFILE, so it is empty in a ForEach-Object
-Parallel block, a thread or background job, or a runspace created from
code. There:

- importing the module reports "Cannot bind argument to parameter 'Path'
because it is null";
- the per-user XenServerProfile.ps1 isn't run;
- $KnownServerCertificatesFilePath isn't set, so Connect-XenServer fails
with "Value cannot be null. (Parameter 'path')".

A customer hit this using the module in a ForEach-Object -Parallel loop
(CP-312156).

When $PROFILE is empty, the script now uses the folder PowerShell keeps
the profile in: Documents\WindowsPowerShell for Windows PowerShell 5.1,
Documents\PowerShell for PowerShell 7 on Windows, and
$XDG_CONFIG_HOME/powershell or ~/.config/powershell elsewhere. These are
the folders Split-Path $PROFILE gives in a normal session, so the module
uses the same certificates file and XenServerProfile.ps1 everywhere.
When $PROFILE is set, nothing changes.

Testing

The module was imported with the old and the new script in each context,
checking for errors, that the cmdlets load, and that
$KnownServerCertificatesFilePath matches a normal session's:

- PowerShell 7 on Windows: ForEach-Object -Parallel, Start-ThreadJob,
Start-Job, a runspace created from code, and the main runspace. Old: 4
of 5 fail. New: 5 of 5 pass.
- Windows PowerShell 5.1: Start-Job, a runspace created from code, and
the main runspace. Old: 2 of 3 fail. New: 3 of 3 pass.
- PowerShell 7 on Linux, with and without XDG_CONFIG_HOME: the same five
contexts. Old: 4 of 5 fail. New: 5 of 5 pass.

End to end: three ForEach-Object -Parallel blocks each import the
module, run Connect-XenServer and Get-XenHost. Old: Connect-XenServer
fails in every block. New: every block connects and lists the... (continued)

3667 of 4642 relevant lines covered (79.0%)

0.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 43393685734.1 13 Nov 2026 08:30AM UTC 36
79.0
GitHub Action Run
Source Files on build 43393685734
  • Tree
  • List 36
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43393685734
  • ccd6e6ba on github
  • Prev Build on gh-readonly-queue/master/pr-7396-01d076d1c38dae0aaf086221f42bc146c6e214e4 (#43201432263)
  • Next Build on gh-readonly-queue/master/pr-7402-0a1c669963238ff34be1948315c615bae13a2154 (#43393685761)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc