blob: 5eadd05486eaadc8414933e209e392dc3c924807 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// 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/util/slaveproc.h>
using namespace vespalib;
vespalib::string run_cmd(const vespalib::string &cmd) {
std::string out;
ASSERT_TRUE(SlaveProc::run(cmd.c_str(), out));
return out;
}
TEST("require that host name can be obtained") {
EXPECT_EQUAL(run_cmd("hostname"), HostName::get());
}
TEST_MAIN_WITH_PROCESS_PROXY() { TEST_RUN_ALL(); }
|