blob: 158a77c2e7e1a761b1a8e4bdea4c30e6d75a87ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
#include <vespa/storage/common/hostreporter/diskreporter.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/util/jsonstream.h>
#include "util.h"
LOG_SETUP(".test.diskreporter");
namespace storage {
struct DiskReporterTest : public CppUnit::TestFixture
{
void testDiskReporter();
CPPUNIT_TEST_SUITE(DiskReporterTest);
CPPUNIT_TEST(testDiskReporter);
CPPUNIT_TEST_SUITE_END();
};
CPPUNIT_TEST_SUITE_REGISTRATION(DiskReporterTest);
void
DiskReporterTest::testDiskReporter()
{
DiskReporter diskReporter;
vespalib::Slime slime;
util::reporterToSlime(diskReporter, slime);
CPPUNIT_ASSERT(0 < slime.get()["disk"].toString().size());
}
} // storage
|