blob: c554a584f8068b212b4c07cf7eb8ebe288c4181a [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
Varun Patila24bd3e2020-11-24 10:08:33 +05303 * Copyright (C) 2020 Regents of the University of California.
Yingdi Yu348f5ea2014-03-01 14:47:25 -08004 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * See COPYING for copyright and distribution information.
6 */
7
Yingdi Yu0b0a7362014-08-05 16:31:30 -07008#include "contact-storage.hpp"
Varun Patila24bd3e2020-11-24 10:08:33 +05309
10#include <boost/test/unit_test.hpp>
Yingdi Yu348f5ea2014-03-01 14:47:25 -080011#include <boost/filesystem.hpp>
12
Qiuhan Ding52f13832015-03-06 14:05:59 -080013namespace chronochat {
14namespace tests {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070015
Yingdi Yu348f5ea2014-03-01 14:47:25 -080016namespace fs = boost::filesystem;
17
18BOOST_AUTO_TEST_SUITE(TestContactStorage)
19
Davide Pesavento7676b562020-12-14 00:41:26 -050020const std::string dbName("chronos-20e9530008b27c661ad3429d1956fa1c509b652dce9273bfe81b7c91819c272c.db");
Yingdi Yu348f5ea2014-03-01 14:47:25 -080021
22BOOST_AUTO_TEST_CASE(InitializeTable)
23{
24 Name identity("/TestContactStorage/InitializeTable");
25
Yingdi Yu0b0a7362014-08-05 16:31:30 -070026 ContactStorage contactStorage(identity);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080027 fs::path dbPath = fs::path(getenv("HOME")) / ".chronos" / dbName;
28
29 BOOST_CHECK(boost::filesystem::exists(dbPath));
30}
31
Yingdi Yu348f5ea2014-03-01 14:47:25 -080032BOOST_AUTO_TEST_SUITE_END()
Yingdi Yu0b0a7362014-08-05 16:31:30 -070033
Qiuhan Ding52f13832015-03-06 14:05:59 -080034} // namespace tests
35} // namespace chronochat