c-ipfs/test/repo/test_repo_fsrepo.h
John Jones c64a700223 The beginnings of datastore
A lot of code cleanup, plus beginning the implementation of a datastore.
2016-11-17 15:07:59 -05:00

20 lines
423 B
C

#include "ipfs/repo/fsrepo/fs_repo.h"
int test_repo_fsrepo_open_config() {
struct FSRepo* fs_repo;
struct RepoConfig* repo_config;
const char* path = "/tmp/.ipfs";
// create the struct
int retVal = ipfs_repo_fsrepo_new((char*)path, repo_config, &fs_repo);
if (retVal == 0)
return 0;
// open the repository and read the file
retVal = ipfs_repo_fsrepo_open(fs_repo);
if (retVal == 0)
return 0;
return 1;
}