fix tests

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-28 11:44:45 +00:00
parent fff32c6f3e
commit b18f5ca8fe
2 changed files with 3 additions and 1 deletions

View File

@@ -40,6 +40,8 @@ test('e2e', async t => {
clientStore.replicate(socket)
const rpc = new ProtomuxRPC(socket)
const repoName = 'foo'
const url = `${serverSwarm.keyPair.publicKey.toString('hex')}/${repoName}`
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())
@@ -54,7 +56,7 @@ test('e2e', async t => {
await drive.core.update({ wait: true })
payload = Buffer.from(JSON.stringify({ body: { url, method: 'get-refs', data: 'foo' }}))
payload = Buffer.from(JSON.stringify({ body: { url, method: 'get-refs', data: repoName }}))
const refsRes = await rpc.request('get-refs', payload)
t.ok(refsRes)