MCPcopy Create free account
hub / github.com/ddev/ddev / TestIsLinux

Function TestIsLinux

pkg/nodeps/utils_test.go:201–210  ·  view source on GitHub ↗

TestIsLinux tests IsLinux function

(t *testing.T)

Source from the content-addressed store, hash-verified

199
200// TestIsLinux tests IsLinux function
201func TestIsLinux(t *testing.T) {
202 result := nodeps.IsLinux()
203 require.IsType(t, false, result)
204
205 if runtime.GOOS == "linux" {
206 require.True(t, result, "Should be true on Linux")
207 } else {
208 require.False(t, result, "Should be false on non-Linux platforms")
209 }
210}
211
212// TestIsWSL2 tests IsWSL2 function
213func TestIsWSL2(t *testing.T) {

Callers

nothing calls this directly

Calls 1

IsLinuxFunction · 0.92

Tested by

no test coverage detected