fix(core): update
This commit is contained in:
parent
2bf5665fea
commit
2429e7b7c1
25
test/test.ts
25
test/test.ts
@ -2,6 +2,7 @@ import { expect, tap } from '@pushrocks/tapbundle';
|
|||||||
import * as logdna from '../ts/index';
|
import * as logdna from '../ts/index';
|
||||||
|
|
||||||
import { Qenv } from '@pushrocks/qenv';
|
import { Qenv } from '@pushrocks/qenv';
|
||||||
|
import { ILogPackage } from '@pushrocks/smartlog-interfaces';
|
||||||
|
|
||||||
const testQenv = new Qenv('./', './.nogit');
|
const testQenv = new Qenv('./', './.nogit');
|
||||||
|
|
||||||
@ -33,4 +34,28 @@ tap.test('should send the message', async () => {
|
|||||||
await testLogDnaAccount.sendLogDnaMessage(testLogMessage);
|
await testLogDnaAccount.sendLogDnaMessage(testLogMessage);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tap.test('should send in order', async () => {
|
||||||
|
let i = 1;
|
||||||
|
while (i < 21) {
|
||||||
|
const testSmartlogMessage: ILogPackage = {
|
||||||
|
timestamp: Date.now(),
|
||||||
|
type: 'log',
|
||||||
|
level: 'info',
|
||||||
|
context: {
|
||||||
|
company: 'Lossless GmbH',
|
||||||
|
companyunit: 'lossless.cloud',
|
||||||
|
containerName: 'ci-mojoio-logdna',
|
||||||
|
environment: 'test',
|
||||||
|
runtime: 'node',
|
||||||
|
zone: 'shipzone'
|
||||||
|
},
|
||||||
|
message: `this is an awesome log message sent by the tapbundle test #${i}`
|
||||||
|
};
|
||||||
|
testLogDnaAccount.sendSmartlogPackage(testSmartlogMessage);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
tap.start();
|
tap.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user