feat(prestashop): delegate product ingestion to orders (1.1.13)
This commit is contained in:
@@ -29,7 +29,7 @@ test('first run safely starts at the newest order without backfilling history',
|
||||
assert.deepEqual(result, { status: 'initialized', cursor: 812, processed: 0 });
|
||||
});
|
||||
|
||||
test('a failed order is skipped so later orders can still be imported', async () => {
|
||||
test('a failed order leaves a retryable cursor gap while later orders are still inspected', async () => {
|
||||
const writes = [];
|
||||
const imported = [];
|
||||
const errors = [];
|
||||
@@ -49,15 +49,15 @@ test('a failed order is skipped so later orders can still be imported', async ()
|
||||
});
|
||||
|
||||
assert.deepEqual(imported, [11, 12, 13]);
|
||||
assert.deepEqual(writes, [13]);
|
||||
assert.equal(config.lastOrderId, 13);
|
||||
assert.deepEqual(result, { status: 'processed', cursor: 13, processed: 2 });
|
||||
assert.deepEqual(writes, [11]);
|
||||
assert.equal(config.lastOrderId, 11);
|
||||
assert.deepEqual(result, { status: 'processed', cursor: 11, processed: 2 });
|
||||
assert.deepEqual(errors, [{
|
||||
message: 'Failed to import PS order; skipping order and continuing',
|
||||
message: 'Failed to import PS order; keeping cursor before the gap and continuing',
|
||||
details: {
|
||||
orderId: 12,
|
||||
previousCursor: 11,
|
||||
cursor: 12,
|
||||
cursor: 11,
|
||||
error: 'invalid order',
|
||||
},
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user