Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('Log - Join Concurrent Entries (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-join-concurrent' + new Date().getTime()
})
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
testIdentity = await IdentityProvider.createIdentity({ id: 'userA', identityKeysPath, signingKeysPath })
ipfs = await startIpfs(IPFS, ipfsConfig)
})
describe('Signed Log (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-signed' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
describe('Log - CRDT (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-crdt' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
describe('ipfs-log - Replication (' + IPFS + ')', function () {
this.timeout(config.timeout)
let ipfs1, ipfs2, id1, id2, testIdentity, testIdentity2
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig1 = Object.assign({}, config.daemon1, {
repo: config.daemon1.repo + new Date().getTime()
})
const ipfsConfig2 = Object.assign({}, config.daemon2, {
repo: config.daemon2.repo + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig1.repo)
rmrf.sync(ipfsConfig2.repo)
describe('Log - References (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-refs' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
describe('Log - Load (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-load' + new Date().getTime()
})
let firstWriteExpectedData = [
'entryA6', 'entryA7', 'entryA8', 'entryA9',
'entryA10', 'entryB1', 'entryB2', 'entryB3',
'entryB4', 'entryB5', 'entryA1', 'entryA2',
'entryA3', 'entryA4', 'entryA5', 'entryC0'
]
let keystore, signingKeystore
before(async () => {
describe('Log - Join (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-join' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
describe('Log - Heads and Tails (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-head-and-tails' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
describe('Entry (' + IPFS + ')', function () {
this.timeout(config.timeout)
const testACL = new AccessController()
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-entry' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)
signingKeystore = new Keystore(signingKeysPath)
describe('Log - Iterator (' + IPFS + ')', function () {
this.timeout(config.timeout)
const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-log-join' + new Date().getTime()
})
let keystore, signingKeystore
before(async () => {
rmrf.sync(ipfsConfig.repo)
rmrf.sync(identityKeysPath)
rmrf.sync(signingKeysPath)
await fs.copy(identityKeyFixtures, identityKeysPath)
await fs.copy(signingKeyFixtures, signingKeysPath)
keystore = new Keystore(identityKeysPath)