fix(core): update

This commit is contained in:
2023-07-05 15:31:00 +02:00
parent 9c767d07e4
commit 60617f2fca
5 changed files with 58 additions and 83 deletions

View File

@ -2,23 +2,21 @@ import { expect, tap } from '@pushrocks/tapbundle';
import { Qenv } from '@pushrocks/qenv';
import * as elasticsearch from '../ts/index.js';
const testQenv = new Qenv('./', './.nogit/');
let testElasticLog: elasticsearch.ElasticSearch<any>;
tap.test('first test', async () => {
testElasticLog = new elasticsearch.ElasticSearch({
indexPrefix: 'smartlog',
indexPrefix: 'testprefix',
indexRetention: 7,
node: testQenv.getEnvVarOnDemand('ELK_NODE'),
user: '',
pass: '',
node: 'http://localhost:9200',
user: 'elastic',
pass: 'YourPassword'
});
expect(testElasticLog).toBeInstanceOf(elasticsearch.ElasticSearch);
});
tap.skip.test('should send a message to Elasticsearch', async () => {
testElasticLog.log({
tap.test('should send a message to Elasticsearch', async () => {
await testElasticLog.log({
timestamp: Date.now(),
type: 'increment',
level: 'info',