def make_local_db_and_soledad_target( test, path='test', source_replica_uid=uuid4().hex): test.startTwistedServer() replica_uid = os.path.basename(path) db = test.request_state._create_database(replica_uid) st = soledad_sync_target( test, db._dbname, source_replica_uid=source_replica_uid) return db, st
def make_local_db_and_soledad_target(test, path='test', source_replica_uid=uuid4().hex): test.startTwistedServer() replica_uid = os.path.basename(path) db = test.request_state._create_database(replica_uid) st = soledad_sync_target(test, db._dbname, source_replica_uid=source_replica_uid) return db, st
def do_sync(self): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ target = soledad_sync_target( self, self.db2._dbname, source_replica_uid=self._soledad._dbpool.replica_uid) return sync.SoledadSynchronizer(self.db, target).sync()
def do_sync(self): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ target = soledad_sync_target( self, self.db2._dbname, source_replica_uid=self._soledad._dbpool.replica_uid) self.addCleanup(target.close) return sync.SoledadSynchronizer(self.db, target).sync(defer_decryption=False)
def do_sync(self): """ Perform sync using SoledadSynchronizer, SoledadSyncTarget and Token auth. """ replica_uid = self._soledad._dbpool.replica_uid sync_db = self._soledad._sync_db sync_enc_pool = self._soledad._sync_enc_pool dbsyncer = self._soledad._dbsyncer # Soledad.sync uses the dbsyncer target = soledad_sync_target(self, self.db2._dbname, source_replica_uid=replica_uid, sync_db=sync_db, sync_enc_pool=sync_enc_pool) self.addCleanup(target.close) return sync.SoledadSynchronizer(dbsyncer, target).sync(defer_decryption=True)