Skip to content

Commit

Permalink
Disable IPv6 test if IPv6 is disabled (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
aut0 authored Jan 19, 2024
1 parent 054694c commit c70f451
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/utils/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "testing.h"
#include "mwr/utils/socket.h"
#include "mwr/core/utils.h"

TEST(socket, server) {
mwr::socket server(12345);
Expand All @@ -34,6 +35,8 @@ TEST(socket, rehost) {
}

TEST(socket, connect) {
if (mwr::getenv("MWR_NO_IPv6"))
GTEST_SKIP() << "IPv6 disabled. Skipping IPv6 test.";
mwr::socket server(0);
mwr::socket client("::1", server.port());

Expand Down

0 comments on commit c70f451

Please sign in to comment.