blob: a9265e6ea36e9d43c94db518ad12d7baa4dd7b2f [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"
9#include "cryptopp.hpp"
Varun Patila24bd3e2020-11-24 10:08:33 +053010
11#include <boost/test/unit_test.hpp>
Yingdi Yu348f5ea2014-03-01 14:47:25 -080012#include <boost/filesystem.hpp>
13
Qiuhan Ding52f13832015-03-06 14:05:59 -080014namespace chronochat {
15namespace tests {
Yingdi Yu0b0a7362014-08-05 16:31:30 -070016
17using std::string;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080018namespace fs = boost::filesystem;
19
20BOOST_AUTO_TEST_SUITE(TestContactStorage)
21
Yingdi Yu0b0a7362014-08-05 16:31:30 -070022const string dbName("chronos-20e9530008b27c661ad3429d1956fa1c509b652dce9273bfe81b7c91819c272c.db");
Yingdi Yu348f5ea2014-03-01 14:47:25 -080023
24BOOST_AUTO_TEST_CASE(InitializeTable)
25{
26 Name identity("/TestContactStorage/InitializeTable");
27
Yingdi Yu0b0a7362014-08-05 16:31:30 -070028 ContactStorage contactStorage(identity);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080029 fs::path dbPath = fs::path(getenv("HOME")) / ".chronos" / dbName;
30
31 BOOST_CHECK(boost::filesystem::exists(dbPath));
32}
33
Yingdi Yu348f5ea2014-03-01 14:47:25 -080034BOOST_AUTO_TEST_SUITE_END()
Yingdi Yu0b0a7362014-08-05 16:31:30 -070035
Qiuhan Ding52f13832015-03-06 14:05:59 -080036} // namespace tests
37} // namespace chronochat