diff --git a/integration-tests/tests/singlestore/test-docker.js b/integration-tests/tests/singlestore/test-docker.js index ec00dd191..f937ef99f 100644 --- a/integration-tests/tests/singlestore/test-docker.js +++ b/integration-tests/tests/singlestore/test-docker.js @@ -1,9 +1,9 @@ import Docker from 'dockerode'; import getPort from 'get-port'; -import { v4 as uuid } from 'uuid'; -import mysql from 'mysql2/promise'; +import * as mysql2 from 'mysql2/promise'; import path from 'path'; import { fileURLToPath } from 'url'; +import { v4 as uuid } from 'uuid'; const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file const __dirname = path.dirname(__filename); // get the name of the directory @@ -21,23 +21,23 @@ const image = 'ghcr.io/singlestore-labs/singlestoredb-dev:latest'; console.log('Pulling the SingleStoreDB Dev image...'); const pullStream = await docker.pull(image); await new Promise((resolve, reject) => - docker.modem.followProgress(pullStream, (err) => (err ? reject(err) : resolve(err))) + docker.modem.followProgress(pullStream, (err) => (err ? reject(err) : resolve(err))) ); console.log('Image pulled successfully.'); console.log('Creating the SingleStoreDB container...'); singlestoreContainer = await docker.createContainer({ - Image: image, - Env: ['ROOT_PASSWORD=singlestore'], - name: `drizzle-integration-tests-${uuid()}`, - HostConfig: { - AutoRemove: true, - PortBindings: { - '3306/tcp': [{ HostPort: `${port}` }], - '8080/tcp': [{ HostPort: '8080' }], - }, - Binds: [`${initSqlPath}:/init.sql`], - }, + Image: image, + Env: ['ROOT_PASSWORD=singlestore'], + name: `drizzle-integration-tests-${uuid()}`, + HostConfig: { + AutoRemove: true, + PortBindings: { + '3306/tcp': [{ HostPort: `${port}` }], + '8080/tcp': [{ HostPort: '8080' }], + }, + Binds: [`${initSqlPath}:/init.sql`], + }, }); console.log('Container created successfully.'); @@ -47,11 +47,11 @@ await new Promise((resolve) => setTimeout(resolve, 4000)); console.log('Container started.'); console.log('Connecting to the database...'); -const connection = await mysql.createConnection({ - host: 'localhost', - port: port, - user: 'root', - password: 'singlestore', +const connection = await mysql2.createConnection({ + host: 'localhost', + port: port, + user: 'root', + password: 'singlestore', }); console.log('Database connection established.'); diff --git a/integration-tests/vitest.config.ts b/integration-tests/vitest.config.ts index 0d6bfa4f0..0b0d5414b 100644 --- a/integration-tests/vitest.config.ts +++ b/integration-tests/vitest.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ 'tests/imports/**/*', 'tests/extensions/vectors/**/*', 'tests/version.test.ts', - 'tests/singlestore/**/*.test.ts' + 'tests/singlestore/**/singlestore-custom.test.ts', ], exclude: [ ...(process.env.SKIP_EXTERNAL_DB_TESTS @@ -37,7 +37,6 @@ export default defineConfig({ // Have a strange "invalid SQL: ERROR: must be owner of schema public" error. Will need to check with xata team 'tests/pg/xata-http.test.ts', 'tests/pg/neon-http-batch.ts', - 'tests/singlestore/singlestore-proxy.test.ts' ], typecheck: { tsconfig: 'tsconfig.json',