mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 18:19:04 +02:00
Signed-off-by: EisenbergD <dominik.eisenberg@beiersdorf.com> Co-authored-by: EisenbergD <dominik.eisenberg@beiersdorf.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.4 KiB
Markdown
41 lines
2.4 KiB
Markdown
# Windows feature tests
|
|
|
|
The CI Windows job prepares real Windows roles and workloads, then runs the Go
|
|
tests with the race detector. While the fixtures are provisioned, a background
|
|
step builds every test binary and the exporter with
|
|
[`tools/build-go-tests.ps1`](../tools/build-go-tests.ps1); linking the race test
|
|
binaries would otherwise take minutes after provisioning.
|
|
[`tools/run-go-tests.ps1`](../tools/run-go-tests.ps1) then runs the binaries
|
|
verbosely in parallel, each in its package directory, and prints each
|
|
package's output as one block. Collector tests validate the metrics
|
|
from those workloads. A final exporter smoke check starts the binary, requests
|
|
`/metrics` once, and checks for a nonempty HTTP 200 response.
|
|
|
|
The job runs on Windows Server 2022; Server 2025 runners take much longer to
|
|
provision the same fixtures. It provisions Containers, Hyper-V, SQL Server
|
|
Express, IIS, SMTP, MSMQ, NPS, FSRM, SMB, DNS, DHCP, a workgroup failover
|
|
cluster, printer and storage fixtures, unlocked and locked BitLocker volumes,
|
|
and an authenticated RDP session.
|
|
|
|
The failover cluster has no administrative access point: the DHCP-only runner
|
|
network cannot host a Cluster Name. An internal Hyper-V switch provides a private
|
|
client network for its resource fixtures. The `CIResources` group contains an
|
|
online Generic Service that depends on an online IP Address, plus an offline IP
|
|
Address. The `CIFailedResources` group contains a Generic Service whose binary is
|
|
missing, so it stays failed. Native and WMI parity tests require these resources.
|
|
|
|
Hyper-V runs the `GitHubActions` VM with a 1 GB dynamic VHDX and a legacy
|
|
network adapter. A second VM, `CIVirtualHardDisk`, is never started: it has a
|
|
dynamic disk with a checkpoint, so it runs on a differencing `.avhdx`, and a
|
|
fixed disk attached after the checkpoint. The `virtual_hard_disk` tests require
|
|
each of its disks to be reported exactly once.
|
|
|
|
`WINDOWS_EXPORTER_TEST_COLLECTORS` lists required collectors. Their tests fail
|
|
when setup is missing or collection fails instead of skipping. Fixture assertions
|
|
check known instances, including the active RDP user's session and SQL database.
|
|
RemoteFX is required when both network and graphics instances are available.
|
|
|
|
Each Windows job uploads a `windows-test-results-<OS>` artifact containing
|
|
setup diagnostics. Unavailable optional collectors show up in the Go tests log
|
|
as skipped `TestCollector` tests with the reason in their output.
|