π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: sqlite test issues
mertmitcf4ff93f1ac4
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.ymlindex 3719b27f54..b3fc97d306 100644--- a/.github/workflows/ci-cd.yml+++ b/.github/workflows/ci-cd.yml@@ -120,16 +120,27 @@ jobs:key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}restore-keys: |${{ runner.os }}-pnpm-store-- - name: Set CI env- run: export CI=true- name: setup pgworking-directory: ./- run: docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d &+ run: docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d+ - name: Wait for PostgreSQL to be ready+ run: |+ echo "Waiting for PostgreSQL to be ready..."+ for i in {1..30}; do+ if docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml exec -T pg147 pg_isready -U postgres; then+ echo "PostgreSQL is ready!"+ break+ fi+ echo "Waiting for PostgreSQL... ($i/30)"+ sleep 2+ done- name: install dependenciesrun: pnpm bootstrap- name: run unit testsworking-directory: ./packages/nocodbrun: pnpm run test:unit:pg+ env:+ CI: truepre-build-for-playwright:uses: ./.github/workflows/pre-build-for-playwright.ymldiff --git a/packages/nocodb/src/db/BaseModelSqlv2/insert.ts b/packages/nocodb/src/db/BaseModelSqlv2/insert.tsindex 853513e4f9..b7635d7d7f 100644--- a/packages/nocodb/src/db/BaseModelSqlv2/insert.ts+++ b/packages/nocodb/src/db/BaseModelSqlv2/insert.ts@@ -92,11 +92,6 @@ export const baseModelInsert = (baseModel: IBaseModelSqlV2) => {let id;if (response?.length) {id = response[0];- } else {- const res = await baseModel.execAndParse(query, null, {- raw: true,- });- id = res?.id ?? res[0]?.insertId ?? res;}if (ai) {diff --git a/packages/nocodb/tests/unit/formula/tests/formula-error.test.ts b/packages/nocodb/tests/unit/formula/tests/formula-error.test.tsindex 416dc01068..88c466b6ba 100644--- a/packages/nocodb/tests/unit/formula/tests/formula-error.test.ts+++ b/packages/nocodb/tests/unit/formula/tests/formula-error.test.ts@@ -8,6 +8,7 @@ import {updateColumn2,} from '../../factory/column';import { initInitialModel } from '../initModel';+import { isSqlite } from '../../init/db';function formulaErrorTests() {let _setup;@@ -187,6 +188,8 @@ function formulaErrorTests() {describe(`long formula`, () => {beforeEach(async () => {+ if (isSqlite(_context)) return;+const longFormula = 'CONCAT("' + 'A'.repeat(1000) + '", "A")';await createColumn(_context,@@ -219,6 +222,8 @@ function formulaErrorTests() {);});it(`will create a formula longer than 500k characters`, async () => {+ if (isSqlite(_context)) return;+const longFormula = 'CONCAT(' + '{long_fcol2},'.repeat(20) + ' "A")';try {await createColumn(@@ -245,6 +250,8 @@ function formulaErrorTests() {});it(`will update a formula longer than 500k characters`, async () => {+ if (isSqlite(_context)) return;+const longFormula = 'CONCAT(' + '{long_fcol2},'.repeat(20) + ' "A")';try {const createdFormulaColumn = await createColumn(