public void Start(string use_backend = "sqlite")
{
tmpPath = "/tmp/rainy-test-data/";
Directory.CreateDirectory(tmpPath);
DbConfig.SetSqliteFile(Path.Combine(tmpPath, "rainy-test.db"));
// tmpPath = Path.GetTempPath () + Path.GetRandomFileName ();
IDataBackend backend;
if (use_backend == "sqlite")
{
backend = new DatabaseBackend(tmpPath, credentialsVerifier);
DbConfig.CreateSchema(reset: true);
using (var c = DbConfig.GetConnection()) {
c.Insert <DBUser>(new DBUser()
{
Username = TEST_USER
});
}
}
else
{
backend = new RainyFileSystemBackend(tmpPath, credentialsVerifier);
}
rainyServer = new RainyStandaloneServer(backend, RainyListenUrl);
rainyServer.Start();
}