acl: more drafts

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-28 11:22:43 +00:00
parent 0911049fa5
commit fff32c6f3e
4 changed files with 84 additions and 59 deletions

View File

@@ -40,7 +40,8 @@ test('e2e', async t => {
clientStore.replicate(socket)
const rpc = new ProtomuxRPC(socket)
const reposRes = await rpc.request('get-repos')
let payload = Buffer.from(JSON.stringify({ body: { url, method: 'get-repos' } }))
const reposRes = await rpc.request('get-repos', payload)
const reposJSON = JSON.parse(reposRes.toString())
const driveKey = Buffer.from(reposJSON.foo, 'hex')
@@ -53,7 +54,8 @@ test('e2e', async t => {
await drive.core.update({ wait: true })
const refsRes = await rpc.request('get-refs', Buffer.from('foo'))
payload = Buffer.from(JSON.stringify({ body: { url, method: 'get-refs', data: 'foo' }}))
const refsRes = await rpc.request('get-refs', payload)
t.ok(refsRes)
const want = Object.values(JSON.parse(refsRes.toString()))[0]