Skip to content

Tests - Unskip the three tests gated on $env:APPVEYOR - #10522

Open
andreasjordan wants to merge 1 commit into
developmentfrom
unskip-appveyor-gated-tests
Open

Tests - Unskip the three tests gated on $env:APPVEYOR#10522
andreasjordan wants to merge 1 commit into
developmentfrom
unskip-appveyor-gated-tests

Conversation

@andreasjordan

Copy link
Copy Markdown
Collaborator

Follow-up to #10521.

AppVeyor the service is gone, but tests/gha.shim.ps1 sets $env:APPVEYOR so the ported appveyor.*.ps1 harness keeps working. A side effect: three skip conditions written for the old AppVeyor image are now permanently true on the Azure fleet, and have been silently skipping ever since the move — on runners the reasons were never assessed against.

Test Lane Recorded reason for the skip
Get-DbaWindowsLog.Tests.ps1 (whole IntegrationTests Describe) SINGLE "the command finds the error log through a SQL Server startup event in the Windows Application log, and the CI runners have nothing to parse"
Enable-DbaFilestream.Tests.ps1 ("FileStream Level to 2") RESTART "the instance does not support FileStream Level 2"
Add-DbaComputerCertificate.Tests.ps1 ("PFX certificate with chain") default none recorded

Why these are worth re-checking rather than left alone

The Get-DbaWindowsLog reason in particular looks likely to have expired. Its VMs now boot from a sysprepped golden image and start the instance on first boot, which writes exactly the SQL Server startup event the command parses — plus Repair-GhaSqlServerName restarts the engine when the image carries a stale @@SERVERNAME. That is a different situation from the old hosted image the comment describes.

The other two are genuinely unknown. The filestream reason is a property of the instance, and nothing in .github/runners/image-scripts/ configures FILESTREAM either way. The certificate one never recorded a reason at all.

Evidence so far

All three pass against a live lab (SQL03/SQL04), including the parts CI skips:

Get-DbaWindowsLog.Tests.ps1            Passed   1 passed, 0 failed, 0 skipped
Add-DbaComputerCertificate.Tests.ps1   Passed   6 passed, 0 failed, 0 skipped
Enable-DbaFilestream.Tests.ps1         Passed   3 passed, 0 failed, 0 skipped

That establishes the tests are sound, not that the runners will satisfy them — the skips are environmental. This PR is how we find out: CI scopes tests from the changed files, so these three run on the real image.

If CI disagrees

The recorded reasons are kept as comments rather than deleted, so re-skipping is cheap. If one fails, please re-skip that one on a condition describing the actual missing precondition rather than on $env:APPVEYOR — the point of this change is that gating on a dead CI provider hides which environments a test really needs.

🤖 Generated with Claude Code

AppVeyor is gone, but tests\gha.shim.ps1 sets $env:APPVEYOR so the harness
scripts keep working. That left three skip conditions permanently true on the
Azure fleet, silently, against runners they were never assessed on:

- Get-DbaWindowsLog.Tests.ps1  (the whole IntegrationTests Describe)
- Enable-DbaFilestream.Tests.ps1  ("FileStream Level to 2")
- Add-DbaComputerCertificate.Tests.ps1  ("PFX certificate with chain")

All three pass against the lab, including the skipped parts. This removes the
gates so CI can say whether the original reasons still hold on the current
image. The recorded reasons are kept in place as comments rather than deleted,
so a re-skip can say what actually failed.

(do Get-DbaWindowsLog, Enable-DbaFilestream, Add-DbaComputerCertificate)
@potatoqualitee

Copy link
Copy Markdown
Member

shit wait, @claude why didn't the tests trigger for andreas?

@potatoqualitee

Copy link
Copy Markdown
Member

ahh outage 🙄

@potatoqualitee

Copy link
Copy Markdown
Member

reinited and real failures unfortuantely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants