From 4f0c3e2b367e448eae1ee75b8f1c389f34643419 Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Thu, 9 Feb 2023 16:26:11 +0000 Subject: [PATCH] refactor: Create identity store outside of createIdentity (I.e. is configurable). --- test/entry.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/entry.spec.js b/test/entry.spec.js index 97f4e7f..a29bb52 100644 --- a/test/entry.spec.js +++ b/test/entry.spec.js @@ -5,6 +5,7 @@ import Entry from '../src/entry.js' import IdentityProvider from 'orbit-db-identity-provider' import Keystore from '../src/Keystore.js' import { config, testAPIs, startIpfs, stopIpfs } from 'orbit-db-test-utils' +import IPFSBlockStorage from '../src/ipfs-block-storage.js' const { sync: rmrf } = rimraf const { createIdentity } = IdentityProvider @@ -17,7 +18,7 @@ Object.keys(testAPIs).forEach((IPFS) => { const { identityKeyFixtures, signingKeyFixtures, identityKeysPath, signingKeysPath } = config let testIdentity - let keystore, signingKeystore + let keystore, signingKeystore, identityStore let ipfsd, ipfs before(async () => { @@ -29,8 +30,10 @@ Object.keys(testAPIs).forEach((IPFS) => { keystore = new Keystore(identityKeysPath) signingKeystore = new Keystore(signingKeysPath) + + identityStore = await IPFSBlockStorage({ ipfs, pin: true }) - testIdentity = await createIdentity({ id: 'userA', keystore, signingKeystore, ipfs }) + testIdentity = await createIdentity({ id: 'userA', keystore, signingKeystore, identityStore }) }) after(async () => {