diff options
author | Mathias Stearn <mathias@10gen.com> | 2010-04-08 00:29:41 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2010-04-08 00:29:47 -0400 |
commit | ae8e216f44d4024159cb7f3c6e39bcc5ca815c6c (patch) | |
tree | fb7d6ad10c9bef539c6e47eb13871bd0cf4367be /dbtests/socktests.cpp | |
parent | c85e1313879535a33a4e818716f55bbe0e6a4cb1 (diff) | |
download | mongo-ae8e216f44d4024159cb7f3c6e39bcc5ca815c6c.tar.gz |
make HostByName test support IPv6
Diffstat (limited to 'dbtests/socktests.cpp')
-rw-r--r-- | dbtests/socktests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dbtests/socktests.cpp b/dbtests/socktests.cpp index c263f2e0a87..e6c8a2021c1 100644 --- a/dbtests/socktests.cpp +++ b/dbtests/socktests.cpp @@ -27,8 +27,9 @@ namespace SockTests { class HostByName { public: void run() { - ASSERT_EQUALS( "127.0.0.1", hostbyname( "localhost" ) ); + ASSERT( hostbyname( "localhost" ) == "127.0.0.0" || hostbyname( "localhost" ) == "::1" ); ASSERT_EQUALS( "127.0.0.1", hostbyname( "127.0.0.1" ) ); + ASSERT_EQUALS( "::1", hostbyname( "::1" ) ); } }; |