blob: cc97e0874897a05cc1d593d15a43b17a7aaedc62 [file] [log] [blame]
Yingdi Yu348f5ea2014-03-01 14:47:25 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * See COPYING for copyright and distribution information.
6 */
7
8#include <boost/test/unit_test.hpp>
9
Yingdi Yu0b0a7362014-08-05 16:31:30 -070010#include "contact-storage.hpp"
11#include "cryptopp.hpp"
Yingdi Yu348f5ea2014-03-01 14:47:25 -080012#include <boost/filesystem.hpp>
13
Yingdi Yu0b0a7362014-08-05 16:31:30 -070014namespace chronos {
15
16using std::string;
Yingdi Yu348f5ea2014-03-01 14:47:25 -080017namespace fs = boost::filesystem;
18
19BOOST_AUTO_TEST_SUITE(TestContactStorage)
20
Yingdi Yu0b0a7362014-08-05 16:31:30 -070021const string dbName("chronos-20e9530008b27c661ad3429d1956fa1c509b652dce9273bfe81b7c91819c272c.db");
Yingdi Yu348f5ea2014-03-01 14:47:25 -080022
23BOOST_AUTO_TEST_CASE(InitializeTable)
24{
25 Name identity("/TestContactStorage/InitializeTable");
26
Yingdi Yu0b0a7362014-08-05 16:31:30 -070027 ContactStorage contactStorage(identity);
Yingdi Yu348f5ea2014-03-01 14:47:25 -080028 fs::path dbPath = fs::path(getenv("HOME")) / ".chronos" / dbName;
29
30 BOOST_CHECK(boost::filesystem::exists(dbPath));
31}
32
Yingdi Yu348f5ea2014-03-01 14:47:25 -080033BOOST_AUTO_TEST_SUITE_END()
Yingdi Yu0b0a7362014-08-05 16:31:30 -070034
35} // namespace chronos