fix(core): update

This commit is contained in:
Philipp Kunz 2018-11-04 21:21:34 +01:00
parent 2bf5665fea
commit 2429e7b7c1

View File

@ -2,6 +2,7 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as logdna from '../ts/index';
import { Qenv } from '@pushrocks/qenv';
import { ILogPackage } from '@pushrocks/smartlog-interfaces';
const testQenv = new Qenv('./', './.nogit');
@ -33,4 +34,28 @@ tap.test('should send the message', async () => {
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();