aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-11-16 03:47:26 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-11-16 16:00:14 +0100
commit007d6f0e85bc329040bb405ef6016339518caa66 (patch)
treeac11af2ab0bf7349f2508885a65eeb8e4ea19305
parent0aa014d5a34ed6b020b687ec924f8a17351f5aeb (diff)
test: fix `AddNode` unit test failure on OpenBSD
-rw-r--r--src/test/net_peer_connection_tests.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/net_peer_connection_tests.cpp b/src/test/net_peer_connection_tests.cpp
index 3d3f296d82..a9e9858d95 100644
--- a/src/test/net_peer_connection_tests.cpp
+++ b/src/test/net_peer_connection_tests.cpp
@@ -116,7 +116,10 @@ BOOST_AUTO_TEST_CASE(test_addnode_getaddednodeinfo_and_connection_detection)
BOOST_TEST_MESSAGE("\nCall AddNode() with 2 addrs resolving to existing localhost addnode entry; neither should be added");
BOOST_CHECK(!connman->AddNode({/*m_added_node=*/"127.0.0.1", /*m_use_v2transport=*/true}));
+ // OpenBSD doesn't support the IPv4 shorthand notation with omitted zero-bytes.
+#if !defined(__OpenBSD__)
BOOST_CHECK(!connman->AddNode({/*m_added_node=*/"127.1", /*m_use_v2transport=*/true}));
+#endif
BOOST_TEST_MESSAGE("\nExpect GetAddedNodeInfo to return expected number of peers with `include_connected` true/false");
BOOST_CHECK_EQUAL(connman->GetAddedNodeInfo(/*include_connected=*/true).size(), nodes.size());