From 6e4d16749b9b4163d9e1033898ac194f256be0bb Mon Sep 17 00:00:00 2001 From: Nybkox Date: Tue, 11 Mar 2025 22:01:33 +0100 Subject: [PATCH] feat: lib sql server tests --- integration-tests/docker-compose.yaml | 61 +++++++++++++++------------ integration-tests/engines.js | 20 +++++++-- workflow-templates/run-tests.yaml | 8 ++++ 3 files changed, 59 insertions(+), 30 deletions(-) diff --git a/integration-tests/docker-compose.yaml b/integration-tests/docker-compose.yaml index e4f49e83b..911b78a31 100644 --- a/integration-tests/docker-compose.yaml +++ b/integration-tests/docker-compose.yaml @@ -27,11 +27,11 @@ services: # - MYSQL_ROOT_PASSWORD=Pwd2020Db # - cassandradb: - image: cassandra:5.0.2 - ports: - - 15942:9042 - + # cassandradb: + # image: cassandra:5.0.2 + # ports: + # - 15942:9042 + # # clickhouse: # image: bitnami/clickhouse:24.8.4 # restart: always @@ -55,28 +55,37 @@ services: # ports: # - 15003:26257 # command: start-single-node --insecure -# mongodb: -# image: mongo:4.0.12 -# restart: always -# volumes: -# - mongo-data:/data/db -# - mongo-config:/data/configdb -# ports: -# - 27017:27017 + # mongodb: + # image: mongo:4.0.12 + # restart: always + # volumes: + # - mongo-data:/data/db + # - mongo-config:/data/configdb + # ports: + # - 27017:27017 -# cockroachdb-init: -# image: cockroachdb/cockroach -# # build: cockroach -# # entrypoint: /cockroach/init.sh -# entrypoint: ./cockroach sql --insecure --host="cockroachdb" --execute="CREATE DATABASE IF NOT EXISTS test;" + # cockroachdb-init: + # image: cockroachdb/cockroach + # # build: cockroach + # # entrypoint: /cockroach/init.sh + # entrypoint: ./cockroach sql --insecure --host="cockroachdb" --execute="CREATE DATABASE IF NOT EXISTS test;" -# depends_on: -# - cockroachdb -# restart: on-failure + # depends_on: + # - cockroachdb + # restart: on-failure - oracle: - image: gvenzl/oracle-xe:21-slim - environment: - ORACLE_PASSWORD: Pwd2020Db + # oracle: + # image: gvenzl/oracle-xe:21-slim + # environment: + # ORACLE_PASSWORD: Pwd2020Db + # ports: + # - 15006:1521 + + libsql: + image: ghcr.io/tursodatabase/libsql-server:latest + platform: linux/amd64 ports: - - 15006:1521 + - '8080:8080' + - '5002:5001' + volumes: + - ./data/libsql:/var/lib/sqld diff --git a/integration-tests/engines.js b/integration-tests/engines.js index a8008388a..75ead4348 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -506,14 +506,23 @@ const sqliteEngine = { ], }; -const libsqlEngine = { +const libsqlFileEngine = { ...sqliteEngine, - label: 'LibSQL', + label: 'LibSQL FILE', connection: { engine: 'libsql@dbgate-plugin-sqlite', }, }; +const libsqlWsEngine = { + ...sqliteEngine, + label: 'LibSQL WS', + connection: { + engine: 'libsql@dbgate-plugin-sqlite', + databaseUrl: 'ws://localhost:8080', + }, +}; + /** @type {import('dbgate-types').TestEngineInfo} */ const cockroachDbEngine = { label: 'CockroachDB', @@ -652,7 +661,8 @@ const enginesOnCi = [ postgreSqlEngine, sqlServerEngine, sqliteEngine, - libsqlEngine, + libsqlFileEngine, + libsqlWsEngine, // cockroachDbEngine, clickhouseEngine, oracleEngine, @@ -668,7 +678,9 @@ const enginesOnLocal = [ // sqlServerEngine, // sqliteEngine, // cockroachDbEngine, - clickhouseEngine, + // clickhouseEngine, + // libsqlFileEngine, + libsqlWsEngine, // oracleEngine, ]; diff --git a/workflow-templates/run-tests.yaml b/workflow-templates/run-tests.yaml index 0052fdb97..23fa29248 100644 --- a/workflow-templates/run-tests.yaml +++ b/workflow-templates/run-tests.yaml @@ -111,3 +111,11 @@ jobs: image: cassandra:5.0.2 ports: - 15942:9042 + + libsql: + image: ghcr.io/tursodatabase/libsql-server:latest + platform: linux/amd64 + ports: + - '8080:8080' + volumes: + - ./data/libsql:/var/lib/sqld