INNER CODE UNIT · Go

cleanupTestEnv

ddev/ddev · winpkg/installer_test.go:534

func cleanupTestEnv(t *testing.T, distroName string) {
	t.Logf("Cleaning up test environment")

	// Clean up test distro
	t.Logf("Cleaning up test distro: %s", distroName)

	// Check if distro exists
	out, err := exec.RunHostCommand("wsl.exe", "-l", "-q")
	if err != nil {
		t.Logf("Failed to list WSL distros: %v", err)
		return
	}

	// Convert UTF-16 output to UTF-8 by removing null bytes
	cleanOut := strings.ReplaceAll(out, "\x00", "")
	//t.Logf("WSL distros list: %q", cleanOut)

	if strings.Contains(cleanOut, distroName) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…