blob: ffe00b02626156f0144ce48fd640f396ec8cc912 [file] [log] [blame]
Zhiyi Zhangae123bf2017-04-14 12:24:53 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -07003 * Copyright (c) 2014-2019, Regents of the University of California,
Zhiyi Zhangae123bf2017-04-14 12:24:53 -07004 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology,
9 * The University of Memphis.
10 *
11 * This file, originally written as part of NFD (Named Data Networking Forwarding Daemon),
12 * is a part of ndncert, a certificate management system based on NDN.
13 *
14 * ndncert is free software: you can redistribute it and/or modify it under the terms
15 * of the GNU General Public License as published by the Free Software Foundation, either
16 * version 3 of the License, or (at your option) any later version.
17 *
18 * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
19 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
20 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
21 *
22 * You should have received copies of the GNU General Public License along with
23 * ndncert, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
24 *
25 * See AUTHORS.md for complete list of ndncert authors and contributors.
26 */
27
28#ifndef NDNCERT_TESTS_DATABASE_FIXTURE_HPP
29#define NDNCERT_TESTS_DATABASE_FIXTURE_HPP
30
31#include "test-common.hpp"
32#include "identity-management-fixture.hpp"
33#include <boost/filesystem.hpp>
34
35namespace ndn {
36namespace ndncert {
37namespace tests {
38
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070039class DatabaseFixture : public IdentityManagementTimeFixture
Zhiyi Zhangae123bf2017-04-14 12:24:53 -070040{
41public:
42 DatabaseFixture()
43 {
44 dbDir = boost::filesystem::path(getenv("HOME")) / ".ndn";
45 }
46
47 ~DatabaseFixture()
48 {
49 boost::filesystem::remove_all(dbDir);
50 }
51
52public:
53 boost::filesystem::path dbDir;
54};
55
56} // namespace tests
57} // namespace ndncert
58} // namespace ndn
59
60#endif // NDNCERT_TESTS_DATABASE_FIXTURE_HPP