mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Add test for interface IP detection tools
This commit is contained in:
committed by
Dennis Klein
parent
5e4876c947
commit
0b199e779a
28
test/tools/_network.cxx
Normal file
28
test/tools/_network.cxx
Normal file
@@ -0,0 +1,28 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <fairmq/Tools.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
using namespace std;
|
||||
using namespace fair::mq;
|
||||
|
||||
TEST(Tools, Network)
|
||||
{
|
||||
string interface = fair::mq::tools::getDefaultRouteNetworkInterface();
|
||||
EXPECT_NE(interface, "");
|
||||
string interfaceIP = fair::mq::tools::getInterfaceIP(interface);
|
||||
EXPECT_NE(interfaceIP, "");
|
||||
}
|
||||
|
||||
} /* namespace */
|
Reference in New Issue
Block a user