19 lines
756 B
TypeScript
19 lines
756 B
TypeScript
|
import { expect, tap } from '@push.rocks/tapbundle';
|
||
|
import { SmartlogDestinationClickhouse } from '../ts_destination_clickhouse/index.js';
|
||
|
import * as smartclickhouse from '@push.rocks/smartclickhouse';
|
||
|
|
||
|
// Test we can create a destination instance
|
||
|
tap.test('should create a ClickHouse destination instance', async () => {
|
||
|
// Use mock configuration
|
||
|
const clickhouseOptions: smartclickhouse.IClickhouseConstructorOptions = {
|
||
|
url: 'defult:@localhost:8123',
|
||
|
database: 'test_logs'
|
||
|
};
|
||
|
|
||
|
// Verify we can create an instance
|
||
|
// We won't start it to avoid making real connections
|
||
|
const clickhouseDestination = new SmartlogDestinationClickhouse(clickhouseOptions);
|
||
|
expect(clickhouseDestination).toBeTruthy();
|
||
|
});
|
||
|
|
||
|
export default tap.start();
|