fix: refs #6184 Requested changes
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
92abc3fb78
commit
2cab007f57
|
@ -96,6 +96,7 @@ async function test() {
|
|||
|
||||
// runner.loadConfigFile('back/jasmine.json');
|
||||
runner.loadConfig(config);
|
||||
process.env.SPEC_IS_RUNNING = true;
|
||||
await runner.execute();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('route downloadCmrsZip()', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(models.Route, 'downloadCmrsZip').and.returnValue(true);
|
||||
});
|
||||
|
||||
it('should create a zip file with the given cmr ids', async() => {
|
||||
const tx = await models.Route.beginTransaction({});
|
||||
const ctx = {
|
||||
|
@ -19,7 +15,7 @@ describe('route downloadCmrsZip()', () => {
|
|||
try {
|
||||
const stream = await models.Route.downloadCmrsZip(ctx, cmrs);
|
||||
|
||||
expect(stream).toBeTrue();
|
||||
expect(stream[0]).toBeDefined();
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('ticket saveCmr()', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(models.Ticket, 'saveCmr').and.returnValue(true);
|
||||
});
|
||||
|
||||
it(`should throw error if the cmr can't save`, async() => {
|
||||
const tx = await models.Ticket.beginTransaction({});
|
||||
const ctx = {
|
||||
|
@ -18,11 +14,11 @@ describe('ticket saveCmr()', () => {
|
|||
};
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
const ticket = [1];
|
||||
await models.Ticket.saveCmr(ctx, ticket);
|
||||
const ticket = [2];
|
||||
await models.Ticket.saveCmr(ctx, ticket, options);
|
||||
|
||||
const hasDmsCmr = await models.TicketDms.findOne({
|
||||
where: {ticketFk: ticket[1]},
|
||||
where: {ticketFk: ticket[0]},
|
||||
include: [{
|
||||
relation: 'dms',
|
||||
fields: ['id'],
|
||||
|
@ -35,7 +31,7 @@ describe('ticket saveCmr()', () => {
|
|||
}]
|
||||
}, options);
|
||||
|
||||
expect(hasDmsCmr?.dms()?.dmsType()).toEqual(1);
|
||||
expect(hasDmsCmr?.dms()?.id).toBeGreaterThanOrEqual(1);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
|
|
@ -35,7 +35,8 @@ module.exports = {
|
|||
logger.error(`[Print] => ${err.message}`);
|
||||
});
|
||||
|
||||
cluster.on('queue', () => logger.info('Printing task initialized by pool'));
|
||||
cluster.on('queue', () =>
|
||||
process.env.SPEC_IS_RUNNING === 'false' && logger.info('Printing task initialized by pool'));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue