diff --git a/packages/client-node/__tests__/integration/node_jwt_auth.test.ts b/packages/client-node/__tests__/integration/node_jwt_auth.test.ts index 62f1f49..728ed4a 100644 --- a/packages/client-node/__tests__/integration/node_jwt_auth.test.ts +++ b/packages/client-node/__tests__/integration/node_jwt_auth.test.ts @@ -1,10 +1,11 @@ -import type { ClickHouseClient } from '@clickhouse/client-common' -import { createTestClient, TestEnv, whenOnEnv } from '@test/utils' +import { TestEnv, whenOnEnv } from '@test/utils' import { EnvKeys, getFromEnv } from '@test/utils/env' +import { createClient } from '../../src' +import type { NodeClickHouseClient } from '../../src/client' import { makeJWT } from '../utils/jwt' whenOnEnv(TestEnv.CloudSMT).describe('[Node.js] JWT auth', () => { - let jwtClient: ClickHouseClient + let jwtClient: NodeClickHouseClient let url: string let jwt: string @@ -17,7 +18,7 @@ whenOnEnv(TestEnv.CloudSMT).describe('[Node.js] JWT auth', () => { }) it('should work with client configuration', async () => { - jwtClient = createTestClient({ + jwtClient = createClient({ url, access_token: jwt, }) @@ -29,7 +30,7 @@ whenOnEnv(TestEnv.CloudSMT).describe('[Node.js] JWT auth', () => { }) it('should override the client instance auth', async () => { - jwtClient = createTestClient({ + jwtClient = createClient({ url, username: 'gibberish', password: 'gibberish', diff --git a/packages/client-web/__tests__/jwt/web_jwt_auth.test.ts b/packages/client-web/__tests__/jwt/web_jwt_auth.test.ts index 3272531..4da2d98 100644 --- a/packages/client-web/__tests__/jwt/web_jwt_auth.test.ts +++ b/packages/client-web/__tests__/jwt/web_jwt_auth.test.ts @@ -1,12 +1,12 @@ -import type { ClickHouseClient } from '@clickhouse/client-common' -import { createTestClient } from '@test/utils' import { EnvKeys, getFromEnv } from '@test/utils/env' +import { createClient } from '../../src' +import type { WebClickHouseClient } from '../../src/client' /** Cannot use the jsonwebtoken library to generate the token: it is Node.js only. * The access token should be generated externally before running the test, * and set as the CLICKHOUSE_JWT_ACCESS_TOKEN environment variable */ describe('[Web] JWT auth', () => { - let client: ClickHouseClient + let client: WebClickHouseClient let url: string let jwt: string @@ -19,7 +19,7 @@ describe('[Web] JWT auth', () => { }) it('should work with client configuration', async () => { - client = createTestClient({ + client = createClient({ url, access_token: jwt, }) @@ -31,7 +31,7 @@ describe('[Web] JWT auth', () => { }) it('should override the client instance auth', async () => { - client = createTestClient({ + client = createClient({ url, username: 'gibberish', password: 'gibberish',