MCPcopy
hub / github.com/strongloop/loopback / seedConflict

Function seedConflict

test/replication.rest.test.js:640–663  ·  view source on GitHub ↗
(done)

Source from the content-addressed store, hash-verified

638 }
639
640 function seedConflict(done) {
641 LocalCar.replicate(ServerCar, function(err, conflicts) {
642 if (err) return done(err);
643
644 if (conflicts.length) return done(conflictError(conflicts));
645
646 ServerCar.replicate(LocalCar, function(err, conflicts) {
647 if (err) return done(err);
648
649 if (conflicts.length) return done(conflictError(conflicts));
650
651 // Hard-coded, see the seed data above
652 conflictedCarId = 'Ford-Mustang';
653
654 new LocalCar({id: conflictedCarId})
655 .updateAttributes({model: 'Client'}, function(err, c) {
656 if (err) return done(err);
657
658 new ServerCar({id: conflictedCarId})
659 .updateAttributes({model: 'Server'}, done);
660 });
661 });
662 });
663 }
664
665 function setAccessToken(token) {
666 clientApp.dataSources.remote.connector.remotes.auth = {

Callers

nothing calls this directly

Calls 2

conflictErrorFunction · 0.85
doneFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…