Skip to content

Skip Docker tests when Docker isn't available#52

Merged
ewassef merged 2 commits intomainfrom
hotfix/bugs
Jan 28, 2026
Merged

Skip Docker tests when Docker isn't available#52
ewassef merged 2 commits intomainfrom
hotfix/bugs

Conversation

@ewassef
Copy link
Contributor

@ewassef ewassef commented Jan 28, 2026

Make FallbackDockerEngine tests safe to run on machines without Docker by checking connectivity in the test constructor and skipping tests when Docker is unavailable. Replaced [Fact] with [SkippableFact], added Skip.IfNot(_dockerAvailable, ...) to each test, and only pull the test image when Docker can be reached. Added a using Xunit and added the Xunit.SkippableFact package to the test project so tests can be conditionally skipped.

Make FallbackDockerEngine tests safe to run on machines without Docker by checking connectivity in the test constructor and skipping tests when Docker is unavailable. Replaced [Fact] with [SkippableFact], added Skip.IfNot(_dockerAvailable, ...) to each test, and only pull the test image when Docker can be reached. Added a using Xunit and added the Xunit.SkippableFact package to the test project so tests can be conditionally skipped.
Copilot AI review requested due to automatic review settings January 28, 2026 21:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the FallbackDockerEngine tests resilient to environments where Docker is not available by implementing conditional test execution. Tests are now automatically skipped when Docker cannot be reached, preventing test failures on machines without Docker installed.

Changes:

  • Added Xunit.SkippableFact package dependency to enable conditional test skipping
  • Modified test constructor to check Docker availability and conditionally pull test images
  • Converted all test methods from [Fact] to [SkippableFact] with skip conditions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cli/tests/Vdk.Tests/Vdk.Tests.csproj Added Xunit.SkippableFact package reference (v1.5.61) to enable conditional test skipping
cli/tests/Vdk.Tests/FallbackDockerEngineTests.cs Added Docker availability check in constructor, converted tests to SkippableFact, and added skip conditions for when Docker is unavailable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ewassef ewassef merged commit f70c168 into main Jan 28, 2026
2 checks passed
@ewassef ewassef deleted the hotfix/bugs branch January 28, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant