Skip to content
Merged
Changes from 1 commit
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
27 changes: 27 additions & 0 deletions test/windows/NetworkTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4480,6 +4480,33 @@ class BridgedTests
auto [out, _] = LxsstuLaunchWslAndCaptureOutput(L"cat /proc/sys/net/ipv6/conf/all/disable_ipv6");
VERIFY_ARE_EQUAL(L"0\n", out);
}

TEST_METHOD(SmokeTest)
{
WSL2_TEST_ONLY();
WINDOWS_11_TEST_ONLY();

m_config->Update(LxssGenerateTestConfig({.networkingMode = wsl::core::NetworkingMode::Bridged, .vmSwitch = L"Default Switch"}));

// Verify that we have a working connection
NetworkTests::GuestClient(L"tcp-connect:bing.com:80");
}

TEST_METHOD(InternetConnectivityV4)
{
WSL2_TEST_ONLY();
WINDOWS_11_TEST_ONLY();

m_config->Update(LxssGenerateTestConfig({.networkingMode = wsl::core::NetworkingMode::Bridged, .vmSwitch = L"Default Switch"}));

if (!NetworkTests::HostHasInternetConnectivity(AF_INET))
{
LogSkipped("Host does not have IPv4 internet connectivity. Skipping...");
return;
}

NetworkTests::GuestClient(L"tcp4-connect:bing.com:80");
}
};

class VirtioProxyTests
Expand Down