| 18 | ].sort()); |
| 19 | |
| 20 | async function call(service, method, input) { |
| 21 | const operation = root.lookupService(`atomic.${service}`).methods[method].resolve(); |
| 22 | const codec = operation.resolvedRequestType; |
| 23 | assert.equal(codec.verify(input), null); |
| 24 | const bytes = await native.call(`/atomic.${service}/${method}`, codec.encode(input).finish()); |
| 25 | return operation.resolvedResponseType.decode(bytes); |
| 26 | } |
| 27 | |
| 28 | const { repository } = await call('DaemonService', 'ResolveRepository', { path: process.env.ATOMIC_REVIEW_TEST_ROOT }); |
| 29 | const report = await call('ReviewService', 'GenerateReview', { repository, view: process.env.ATOMIC_REVIEW_TEST_VIEW }); |