diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 16e2b1f..57e1a61 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,8 +31,9 @@ jobs: - name: Install Firebird run: | - sudo apt-get install libtommath1 libncurses5 + sudo apt-get install libtommath1 libncurses5 musl-dev gcc sudo ln -sf /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 + sudo ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 wget -nv -O Firebird-3.0.10.33601-0.amd64.tar.gz "https://github.com/FirebirdSQL/firebird/releases/download/v3.0.10/Firebird-3.0.10.33601-0.amd64.tar.gz" tar xzvf Firebird-3.0.10.33601-0.amd64.tar.gz (cd Firebird-3.0.10.33601-0.amd64; sudo ./install.sh -silent) @@ -45,11 +46,12 @@ jobs: sudo chown -R firebird:firebird . while ! nc -z localhost 3050; do sleep 1 ; done sleep 2 + ldconfig -p | grep libfbclient - name: Tests run: | sudo mkdir coverage sudo chown -R firebird:firebird coverage sudo chmod -R 777 coverage - sg firebird -c "yarn global add env-cmd; env-cmd -f /opt/firebird/SYSDBA.password yarn test" + sg firebird -c "yarn global add env-cmd; LD_LIBRARY_PATH=/usr/lib64 env-cmd -f /opt/firebird/SYSDBA.password yarn test" bash <(curl -s https://codecov.io/bash) diff --git a/src/index.js b/src/index.js index 2210367..21b9e29 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,13 @@ class Client_Firebird extends Client { async acquireRawConnection() { assert(!this._connectionForTransactions); + // FIREBIRD_HOST="fsdm.farmsoft.cz" + // FIREBIRD_PORT="3050" + // FIREBIRD_USER="SYSDBA" + // FIREBIRD_PASSWORD="AgrosofT" + // FIREBIRD_POOL_SIZE="1" + // FIREBIRD_KRONOS_PATH="/var/lib/firebird/3.0/data/kronos/kronos.fdb" + /** @type {import('node-firebird-driver-native').Client} client */ const client = this.driver.createNativeClient(this.config.libraryPath || this._driver().getDefaultLibraryFilename()) const databasePath = this.config.connection.database || this.config.connection.path diff --git a/tests/test.js b/tests/test.js index 842c0e8..adeb1db 100644 --- a/tests/test.js +++ b/tests/test.js @@ -20,6 +20,7 @@ const generateConfig = () => ({ pool: { min: 1, max: 1 }, createDatabaseIfNotExists: true, debug: false, + libraryPath: process.env.LIBRARY_PATH }); describe("Basic operations", () => {