From 2429e7b7c12a873e14cd2544cab01f9d6fe17588 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 4 Nov 2018 21:21:34 +0100 Subject: [PATCH] fix(core): update --- test/test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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();