]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph - scalable distributed file system | |
5 | * | |
6 | * Copyright (C) 2011 New Dream Network | |
7 | * | |
8 | * This is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public | |
10 | * License version 2, as published by the Free Software | |
11 | * Foundation. See file COPYING. | |
12 | * | |
13 | */ | |
14 | ||
15 | #include "common/ceph_context.h" | |
16 | #include "include/util.h" | |
17 | #include "gtest/gtest.h" | |
18 | ||
19 | #include <sstream> | |
20 | ||
7c673cae FG |
21 | #if defined(__linux__) |
22 | TEST(util, collect_sys_info) | |
23 | { | |
24 | map<string, string> sys_info; | |
25 | ||
26 | CephContext *cct = (new CephContext(CEPH_ENTITY_TYPE_CLIENT))->get(); | |
27 | collect_sys_info(&sys_info, cct); | |
28 | ||
29 | ASSERT_TRUE(sys_info.find("distro") != sys_info.end()); | |
7c673cae FG |
30 | ASSERT_TRUE(sys_info.find("distro_description") != sys_info.end()); |
31 | ||
32 | cct->put(); | |
33 | } | |
34 | #endif |