summaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-05-08 09:13:29 +0000
committerArne Juul <arnej@yahoo-inc.com>2018-05-14 11:30:29 +0000
commitc1f67d3b2fdd0adc018e769d6c672d72e1d16989 (patch)
tree8cdc5bedd304ec02d6091bb7c1489971fdbbda2f /staging_vespalib
parentb8809aaead0313702e10e4e0ed87f6ec3454e83a (diff)
update test
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/tests/state_server/state_server_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/staging_vespalib/src/tests/state_server/state_server_test.cpp b/staging_vespalib/src/tests/state_server/state_server_test.cpp
index bc71d3c6db2..9d901a695e3 100644
--- a/staging_vespalib/src/tests/state_server/state_server_test.cpp
+++ b/staging_vespalib/src/tests/state_server/state_server_test.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
+#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/net/state_server.h>
#include <vespa/vespalib/net/simple_health_producer.h>
#include <vespa/vespalib/net/simple_metrics_producer.h>
@@ -121,7 +122,7 @@ struct EchoHost : JsonGetHandler {
TEST_FF("require that host is passed correctly", EchoHost(), HttpServer(0)) {
auto token = f2.repo().bind(my_path, f1);
f2.start();
- EXPECT_EQUAL(make_string("%s:%d", run_cmd("hostname").c_str(), f2.port()), f2.host());
+ EXPECT_EQUAL(make_string("%s:%d", HostName::get().c_str(), f2.port()), f2.host());
vespalib::string default_result = make_string("[\"%s\"]", f2.host().c_str());
vespalib::string localhost_result = make_string("[\"%s:%d\"]", "localhost", f2.port());
vespalib::string silly_result = "[\"sillyserver\"]";