From 601b5032e74c0a2ade6ba944e57f203f39fd2187 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Mon, 17 Feb 2025 08:42:56 -0700 Subject: [PATCH] Stop running tests that require network access --- test/Network/IpAddress.test.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/Network/IpAddress.test.cpp b/test/Network/IpAddress.test.cpp index e4bdaf818..e22f191b8 100644 --- a/test/Network/IpAddress.test.cpp +++ b/test/Network/IpAddress.test.cpp @@ -71,15 +71,19 @@ TEST_CASE("[Network] sf::IpAddress") SECTION("Static functions") { - SECTION("getLocalAddress") + // These functions require external network access to work thus imposing an additional + // requirement on our test suite of internet access. This causes issues for developers + // trying to work offline and for package managers who may be building and running the + // tests offline as well. + (void)[] { const std::optional ipAddress = sf::IpAddress::getLocalAddress(); REQUIRE(ipAddress.has_value()); CHECK(ipAddress->toString() != "0.0.0.0"); CHECK(ipAddress->toInteger() != 0); - } + }; - SECTION("getPublicAddress") + (void)[] { const std::optional ipAddress = sf::IpAddress::getPublicAddress(sf::seconds(1)); if (ipAddress.has_value()) @@ -87,7 +91,7 @@ TEST_CASE("[Network] sf::IpAddress") CHECK(ipAddress->toString() != "0.0.0.0"); CHECK(ipAddress->toInteger() != 0); } - } + }; } SECTION("Static constants")