diff options
author | Haavard <havardpe@yahoo-inc.com> | 2017-04-19 13:19:59 +0000 |
---|---|---|
committer | Haavard <havardpe@yahoo-inc.com> | 2017-04-19 13:19:59 +0000 |
commit | 761a941d3a6eff29041de74ef4d5a562aaf16c0a (patch) | |
tree | ae77e6d57838fce512ba7e991d2e67882109fee5 /fastos/src/tests | |
parent | 934767f4381ee8bba5724314286f184988960faa (diff) |
remove FastOS_Socket::getHostName
Diffstat (limited to 'fastos/src/tests')
-rw-r--r-- | fastos/src/tests/sockettest.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/fastos/src/tests/sockettest.cpp b/fastos/src/tests/sockettest.cpp index 9a655548d97..c356ddfc93f 100644 --- a/fastos/src/tests/sockettest.cpp +++ b/fastos/src/tests/sockettest.cpp @@ -654,9 +654,6 @@ public: // Fallback to localhost if we can't get the hostname std::string strictBindHost("localhost"); - std::string hostName = FastOS_Socket::getHostName(); - if(!hostName.empty()) - strictBindHost = hostName; FastOS_ServerSocket *serverSocket = new FastOS_ServerSocket(18333, 5, NULL, strictBindHost.c_str()); @@ -812,68 +809,6 @@ public: PrintSeparator(); } - void HostNameTest () - { - std::string errorMessage; - std::string hostName; - - TestHeader("Hostname Test"); - - hostName = FastOS_Socket::getHostName(&errorMessage); - - if(!hostName.empty()) - { - Progress(true, "Got hostname: [%s]", hostName.c_str()); - - - } - else - { - Progress(false, "Error getting hostname:\n%s", errorMessage.c_str()); - } - - PrintSeparator(); - } - - void HostAddressTest (bool testWithFailure) - { - std::string errorMessage; - - if (!testWithFailure) - { - TestHeader("Hostaddress Test"); - } - else - { - TestHeader("Provoked Hostaddress Failure Test"); - } - - std::string hostName; - - hostName = FastOS_Socket::getHostName(&errorMessage); - - if (!hostName.empty()) - { - if (testWithFailure) - { - Progress(true, "Got FQ Hostname: [%s], but will use ZZZZ instead", - hostName.c_str()); - hostName = "ZZZZ"; - } - else - { - Progress(true, "Got FQ Hostname: [%s]", - hostName.c_str()); - } - } - else - { - Progress(false, "Error getting hostname:\n%s", errorMessage.c_str()); - } - - PrintSeparator(); - } - int Main () override { printf("This test should be run in the 'test/workarea' directory.\n\n"); @@ -892,9 +827,6 @@ public: } } - HostNameTest(); - HostAddressTest(false); - HostAddressTest(true); HttpClientTest(); ClientServerTest(); StrictBindTest(); |