Browse Source

Treat the search endpoint as a fetch when running tests as lucene doesn't exist

pull/2790/head
Andrew Kingston 5 years ago
parent
commit
2b31239f04
  1. 5
      packages/server/src/api/controllers/row/internal.js

5
packages/server/src/api/controllers/row/internal.js

@ -351,6 +351,11 @@ exports.bulkDestroy = async ctx => {
}
exports.search = async ctx => {
// Fetch the whole table when running tests, as search doesn't work
if (env.isTest()) {
return { rows: await exports.fetch(ctx) }
}
const appId = ctx.appId
const { tableId } = ctx.params
const db = new CouchDB(appId)

Loading…
Cancel
Save