Skip to content

fix(test): skip TestCheckLiveConnectivityWithProject on Rancher/Colima/Lima, fix misleading WSL2 labels - #8365

Merged
rfay merged 1 commit into
mainfrom
20260429_rancher_TestCheckConnectivity
Apr 29, 2026
Merged

rfay merged 1 commit into
mainfrom
20260429_rancher_TestCheckConnectivity

Conversation

@rfay

@rfay rfay commented Apr 29, 2026

Copy link
Copy Markdown
Member

The Issue

Rancher Desktop (Lima-based) intermittently fails TestCheckLiveConnectivityWithProject because tls.Dial to localhost is unreliable on Lima-based runtimes — the same fundamental networking constraint that causes extra_expose_test.go, traefik_test.go, and router_test.go to all skip on Rancher/Colima/Lima.

Additionally, the test and function were written with a WSL2-centric mindset: the return value was named linuxIssues and assertion messages said "Linux/WSL2-side TLS connection must succeed", which is confusing/wrong on macOS Rancher Desktop.

How This PR Solves The Issue

  • Adds the standard IsColima() || IsLima() || IsRancherDesktop() skip (guarded by DDEV_RUN_TEST_ANYWAY) to TestCheckLiveConnectivityWithProject, matching the pattern used elsewhere in the test suite.
  • Renames linuxIssues → hostIssues in checkLiveConnectivity and all callers/tests.
  • Updates test assertion messages from "Linux/WSL2-side" to "host-side" so failures on macOS report something accurate.

Manual Testing Instructions

  • On a Rancher Desktop macOS machine, run go test -v -run TestCheckLiveConnectivityWithProject ./cmd/ddev/cmd/ — it should now skip.
  • On a normal Docker Desktop macOS or Linux machine the test should still pass.
  • Run DDEV_RUN_TEST_ANYWAY=true go test -v -run TestCheckLiveConnectivityWithProject ./cmd/ddev/cmd/ on Rancher to force it to run.

Automated Testing Overview

No new tests. The existing TestCheckLiveConnectivityWithProject test already covers the fixed code path and was verified passing on Linux Docker before this commit.

Release/Deployment Notes

Test-only change. No impact on DDEV behavior or released binaries.

…a/Lima, fix misleading WSL2 labels

Rancher Desktop (Lima-based) has unpredictable localhost port forwarding,
causing tls.Dial to localhost to fail intermittently — the same reason
extra_expose_test.go, traefik_test.go, and router_test.go all skip on
these runtimes. Add the same skip guarded by DDEV_RUN_TEST_ANYWAY.

The test and function were written on a WSL2-centric mindset. Rename
linuxIssues → hostIssues in checkLiveConnectivity and all callers/tests,
and update assertion messages from "Linux/WSL2-side" to "host-side" so
failures on macOS report something accurate.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@rfay
rfay requested a review from a team as a code owner April 29, 2026 15:41
@rfay
rfay requested a review from stasadev April 29, 2026 15:44
@github-actions

Copy link
Copy Markdown

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@rfay
rfay merged commit 9e1a271 into main Apr 29, 2026
41 of 46 checks passed
@rfay
rfay deleted the 20260429_rancher_TestCheckConnectivity branch April 29, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants