try
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
dd16633b53
commit
cfcfdc9d12
|
@ -1,6 +1,7 @@
|
|||
const Docker = require('../db/docker.js');
|
||||
let dataSources = require('../loopback/server/datasources.json');
|
||||
const log = require('fancy-log');
|
||||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
process.on('warning', warning => {
|
||||
console.log(warning.name);
|
||||
|
@ -39,6 +40,23 @@ async function test() {
|
|||
log('Waiting for backend is ready...');
|
||||
log('Application ready', await app.models.Application.status());
|
||||
|
||||
const params = {
|
||||
zoneFk: 1,
|
||||
geoFk: 20,
|
||||
isIncluded: false
|
||||
};
|
||||
log('Start upsert WITHOUT transaction');
|
||||
await models.ZoneIncluded.upsert(params);
|
||||
|
||||
log('Finish first upsert');
|
||||
log('Start transaction');
|
||||
const tx = await models.Zone.beginTransaction({});
|
||||
log('Start upsert WITH transaction');
|
||||
await models.ZoneIncluded.upsert(params, {transaction: tx});
|
||||
log('Finish second upsert');
|
||||
await tx.rollback();
|
||||
log('Finish rollback');
|
||||
|
||||
const Jasmine = require('jasmine');
|
||||
const jasmine = new Jasmine();
|
||||
|
||||
|
|
Loading…
Reference in New Issue