return (async () => { await fakePathModel(path.join(cwd, 'tmptest'), users, drives) // fake dir and file in drive let dir = paths.get('drives') await mkdirpAsync(path.join(dir, drv001UUID, 'world')) await fs.writeFileAsync(path.join(dir, drv001UUID, 'file001.png'), '0123456789ABCDEFGHIJKLMN') let stat = await fs.statAsync(path.join(dir, drv001UUID, 'file001.png')) file001Timestamp = stat.mtime.getTime() let file001attr = `{"uuid":"${file001UUID}","owner":[],"hash":"141f8b5fb558f3f84949abcba9ca15326b1b6cf335aa845f5ea6f3d21e3061a8","magic":"ASCII text, with no line terminators","htime":${file001Timestamp.toString()}}` await Promise.promisify(xattr.set)(path.join(dir, drv001UUID, 'file001.png'), 'user.fruitmix', file001attr) repo = await fakeRepoSilenced() token = await requestTokenAsync(app, userUUID, 'world') })()
beforeEach(() => (async () => { await fakePathModel(path.join(cwd, 'tmptest'), users, drives) await fakeRepoSilenced() token = await requestTokenAsync(app, userUUID, 'world') })())