diff --git a/test/test.ts b/test/test.ts index b540911..33fc9eb 100644 --- a/test/test.ts +++ b/test/test.ts @@ -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();