fix: peer routing for delegate router (#377)

* fix: peer routing tests

* test: fix mock payload type

Provider results are type 4, not type 1: 6e566d10f4/routing/query.go (L15-L24)
This commit is contained in:
Vasco Santos 2019-07-12 14:02:03 +02:00 committed by Jacob Heun
parent 10811e9ced
commit 905c911946
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ module.exports = (node) => {
})
tryEach(tasks, (err, results) => {
if (err && err.code !== 'NOT_FOUND') {
if (err) {
return callback(err)
}
results = results || []

View File

@ -251,7 +251,7 @@ describe('.contentRouting', () => {
timeout: '1000ms',
'stream-channels': true
})
.reply(200, `{"Extra":"","ID":"QmWKqWXCtRXEeCQTo3FoZ7g4AfnGiauYYiczvNxFCHicbB","Responses":[{"Addrs":["/ip4/0.0.0.0/tcp/0"],"ID":"${provider}"}],"Type":1}\n`, [
.reply(200, `{"Extra":"","ID":"QmWKqWXCtRXEeCQTo3FoZ7g4AfnGiauYYiczvNxFCHicbB","Responses":[{"Addrs":["/ip4/0.0.0.0/tcp/0"],"ID":"${provider}"}],"Type":4}\n`, [
'Content-Type', 'application/json',
'X-Chunked-Output', '1'
])