From 2cf6a4ceb01880b51aeb13e6d5019db9b74f8c9e Mon Sep 17 00:00:00 2001 From: saul Date: Tue, 26 Mar 2024 11:15:55 +1300 Subject: [PATCH] Cleanup revisions test. --- .../daemon/test/modules/revisions.spec.ts | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/daemon/test/modules/revisions.spec.ts b/packages/daemon/test/modules/revisions.spec.ts index 55653127..807cb3b7 100644 --- a/packages/daemon/test/modules/revisions.spec.ts +++ b/packages/daemon/test/modules/revisions.spec.ts @@ -197,9 +197,8 @@ describe('revisions', () => { }) it('rpc - it exports a revision (file)', async () => { - const { revisions: m, network, filesystem, groups, sigint, argv } = await create() + const { network, filesystem, groups, sigint, argv } = await create() const group = await createGroup(groups, 'test') - const r = m.getRevisions(group) const fs = filesystem.getFileSystem(group) const path = '/test' const client = createNetClient(argv.socket) @@ -207,7 +206,6 @@ describe('revisions', () => { const inFile = Path.join(dataPath, 'file-1.txt') const outFile = Path.join(testPath, 'file-1.txt') - assert(r != null) assert(fs != null) const [{ cid }] = await all(importer(network.helia.blockstore, inFile, { @@ -229,10 +227,6 @@ describe('revisions', () => { priority: 1 }]) - const entry = await fs.get(path) - - assert(entry != null) - await promise await new Promise(resolve => setTimeout(resolve, 100)) @@ -258,9 +252,8 @@ describe('revisions', () => { }) it('rpc - it exports a revision (directory)', async () => { - const { revisions: m, network, filesystem, groups, sigint, argv } = await create() + const { network, filesystem, groups, sigint, argv } = await create() const group = await createGroup(groups, 'test') - const r = m.getRevisions(group) const fs = filesystem.getFileSystem(group) const rootPath = '/test' const client = createNetClient(argv.socket) @@ -277,7 +270,6 @@ describe('revisions', () => { virtual: Path.join(rootPath, path) })) - assert(r != null) assert(fs != null) for (const path of paths) { @@ -328,15 +320,13 @@ describe('revisions', () => { }) it('rpc - lists a revision (file)', async () => { - const { revisions: m, network, filesystem, groups, sigint, argv } = await create() + const { network, filesystem, groups, sigint, argv } = await create() const group = await createGroup(groups, 'test') - const r = m.getRevisions(group) const fs = filesystem.getFileSystem(group) const path = '/test' const client = createNetClient(argv.socket) const inFile = Path.join(dataPath, 'file-1.txt') - assert(r != null) assert(fs != null) const [{ cid }] = await all(importer(network.helia.blockstore, inFile, { @@ -360,10 +350,6 @@ describe('revisions', () => { priority: 1 }]) - const entry = await fs.get(path) - - assert(entry != null) - await promise await new Promise(resolve => setTimeout(resolve, 100)) @@ -390,9 +376,8 @@ describe('revisions', () => { }) it('rpc - it lists a revision (directory)', async () => { - const { revisions: m, network, filesystem, groups, sigint, argv } = await create() + const { network, filesystem, groups, sigint, argv } = await create() const group = await createGroup(groups, 'test') - const r = m.getRevisions(group) const fs = filesystem.getFileSystem(group) const rootPath = '/test' const client = createNetClient(argv.socket) @@ -409,7 +394,6 @@ describe('revisions', () => { cid: CID.parse('QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN') })) - assert(r != null) assert(fs != null) const before = Date.now()