From c1f67d3b2fdd0adc018e769d6c672d72e1d16989 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Tue, 8 May 2018 09:13:29 +0000 Subject: update test --- staging_vespalib/src/tests/state_server/state_server_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include #include #include #include @@ -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\"]"; -- cgit v1.2.3