Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkg/workflow/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ func TestValidateContainerImages(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Skip test if docker is not available
// Skip test if docker daemon is not running
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The comment is slightly misleading. It says "Skip test if docker daemon is not running" but the code checks both Docker binary availability (line 68-70) AND daemon running status (line 72-74). Consider updating to "Skip test if docker is not available or daemon is not running" for accuracy.

Suggested change
// Skip test if docker daemon is not running
// Skip test if docker is not available or daemon is not running

Copilot uses AI. Check for mistakes.
if tt.skipIfNoDocker {
if _, err := exec.LookPath("docker"); err != nil {
t.Skip("docker not available, skipping test")
}
// Also check if Docker daemon is running (not just if binary exists)
if !isDockerDaemonRunning() {
t.Skip("docker daemon not running, skipping test")
Comment on lines +71 to +73
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The same Docker daemon check should be applied to the tests in compiler_container_validation_test.go. The tests TestCompileWithInvalidContainerImage and TestCompileWithInvalidContainerValidationDisabled also check for Docker binary at lines 26-28 and 80-82 respectively, but don't verify the daemon is running. They will fail in CI with the same issue this PR fixes.

Copilot uses AI. Check for mistakes.
}
}

compiler := NewCompiler()
Expand All @@ -88,6 +92,10 @@ func TestValidateDockerImage(t *testing.T) {
if _, err := exec.LookPath("docker"); err != nil {
t.Skip("docker not available, skipping test")
}
// Also check if Docker daemon is running (not just if binary exists)
if !isDockerDaemonRunning() {
t.Skip("docker daemon not running, skipping test")
}

tests := []struct {
name string
Expand Down
Loading