From 1244dbca3182e1deacdd65de3fda40e7b51adf8a Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Wed, 31 Jan 2024 12:40:38 -0800 Subject: [PATCH 1/5] ci: fix path to new sqlite3 executable --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb107a3a..45a8b43c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,15 +26,15 @@ jobs: - runs-on: ubuntu-latest artifact-name: cadt-linux-x64 build-command: npm run create-linux-x64-dist - sqlite-path: ./node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/ + sqlite-path: ./node_modules/sqlite3/build/Release/ - runs-on: macos-latest artifact-name: cadt-macos-x64 build-command: npm run create-mac-x64-dist - sqlite-path: ./node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/ + sqlite-path: ./node_modules/sqlite3/build/Release/ - runs-on: windows-2019 artifact-name: cadt-windows-x64 build-command: npm run create-win-x64-dist - sqlite-path: .\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64\ + sqlite-path: .\node_modules\sqlite3\build\Release\ steps: - name: Clean workspace From 1abc1dfd5c327dfd9054a2f8e4bc484cbe1760f7 Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Tue, 6 Feb 2024 15:44:21 -0800 Subject: [PATCH 2/5] ci: fix ARM sqlite path --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 45a8b43c..71020b28 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -184,8 +184,7 @@ jobs: - name: Copy sqlite3 run: | - ls ./node_modules/sqlite3/lib/binding/ - sudo cp ./node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-arm64/node_sqlite3.node ./dist/ + sudo cp ./node_modules/sqlite3/build/Release/node_sqlite3.node ./dist/ - name: Upload artifacts uses: actions/upload-artifact@v3 From db20c2f42f688de268abe2de6ff9c7142c1c2d8d Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Tue, 6 Feb 2024 15:54:56 -0800 Subject: [PATCH 3/5] tests: fix chai import in tests --- tests/test-fixtures/project-fixtures.js | 3 +-- tests/test-fixtures/staging-fixtures.js | 3 +-- tests/test-fixtures/unit-fixtures.js | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/test-fixtures/project-fixtures.js b/tests/test-fixtures/project-fixtures.js index 835064e7..5aaf7977 100644 --- a/tests/test-fixtures/project-fixtures.js +++ b/tests/test-fixtures/project-fixtures.js @@ -1,8 +1,7 @@ import _ from 'lodash'; import supertest from 'supertest'; -import chai from 'chai'; -const { expect } = chai; +import { expect } from 'chai'; import app from '../../src/server'; import newProject from '../test-data/new-project.js'; diff --git a/tests/test-fixtures/staging-fixtures.js b/tests/test-fixtures/staging-fixtures.js index a7979932..33fb6652 100644 --- a/tests/test-fixtures/staging-fixtures.js +++ b/tests/test-fixtures/staging-fixtures.js @@ -1,7 +1,6 @@ import _ from 'lodash'; -import chai from 'chai'; -const { expect } = chai; +import { expect } from 'chai'; import supertest from 'supertest'; import app from '../../src/server'; diff --git a/tests/test-fixtures/unit-fixtures.js b/tests/test-fixtures/unit-fixtures.js index b5415581..c421235c 100644 --- a/tests/test-fixtures/unit-fixtures.js +++ b/tests/test-fixtures/unit-fixtures.js @@ -1,9 +1,7 @@ import _ from 'lodash'; import supertest from 'supertest'; -import chai from 'chai'; -const { expect } = chai; - +import { expect } from 'chai'; import app from '../../src/server'; import newUnit from '../test-data/new-unit.js'; import updateUnitJson from '../test-data/update-unit.js'; From 4239711cf32fec1275a05e86c544398267977e67 Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Tue, 6 Feb 2024 16:01:25 -0800 Subject: [PATCH 4/5] tests: fix chai import in tests --- tests/test-fixtures/common-fixtures.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-fixtures/common-fixtures.js b/tests/test-fixtures/common-fixtures.js index 3f93b4db..2d7871f5 100644 --- a/tests/test-fixtures/common-fixtures.js +++ b/tests/test-fixtures/common-fixtures.js @@ -1,5 +1,4 @@ -import chai from 'chai'; -const { expect } = chai; +import { expect } from 'chai'; import { RelatedProject, From af06028d95b39aa850018645130b38e9ebb0b8d4 Mon Sep 17 00:00:00 2001 From: Zachary Brown Date: Tue, 6 Feb 2024 16:30:19 -0800 Subject: [PATCH 5/5] tests: fix chai import in tests --- tests/integration/project.spec.js | 5 ++--- tests/integration/unit.spec.js | 5 ++--- tests/resources/projects.spec.js | 3 +-- tests/utils/request-utils.js | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/integration/project.spec.js b/tests/integration/project.spec.js index 9c6f7429..df1296ff 100644 --- a/tests/integration/project.spec.js +++ b/tests/integration/project.spec.js @@ -1,7 +1,6 @@ import _ from 'lodash'; -import chai from 'chai'; -const { expect } = chai; +import { expect } from 'chai'; import * as testFixtures from '../test-fixtures'; import { pullPickListValues } from '../../src/utils/data-loaders'; @@ -27,7 +26,7 @@ describe('Project Resource Integration Tests', function () { /* Basic Idea for this test is that we are going to create a project and verify that the new project propagates through the data layer and into our db. Then we are going - to delete the same project and make sure the delete command propagates through the datalayer + to delete the same project and make sure the delete command propagates through the datalayer then gets removed from our db. */ // create and commit the project to be deleted diff --git a/tests/integration/unit.spec.js b/tests/integration/unit.spec.js index a2a90919..3c1d3c11 100644 --- a/tests/integration/unit.spec.js +++ b/tests/integration/unit.spec.js @@ -1,8 +1,7 @@ import _ from 'lodash'; -import chai from 'chai'; +import { expect } from 'chai'; import supertest from 'supertest'; -const { expect } = chai; import app from '../../src/server'; import { UnitMirror } from '../../src/models'; @@ -37,7 +36,7 @@ describe('Unit Resource Integration Tests', function () { /* Basic Idea for this test is that we are going to create a unit and verify that the new unit propagates through the data layer and into our db. Then we are going - to delete the same unit and make sure the delete command propagates through the datalayer + to delete the same unit and make sure the delete command propagates through the datalayer then gets removed from our db. */ // create and commit the unit to be deleted diff --git a/tests/resources/projects.spec.js b/tests/resources/projects.spec.js index 14ad4327..398285a0 100644 --- a/tests/resources/projects.spec.js +++ b/tests/resources/projects.spec.js @@ -1,9 +1,8 @@ -import chai from 'chai'; +import { expect } from 'chai'; import _ from 'lodash'; import * as testFixtures from '../test-fixtures'; import sinon from 'sinon'; import datalayer from '../../src/datalayer'; -const { expect } = chai; import newProject from '../test-data/new-project.js'; import supertest from 'supertest'; import app from '../../src/server'; diff --git a/tests/utils/request-utils.js b/tests/utils/request-utils.js index 05e6bd25..9c8ee18c 100644 --- a/tests/utils/request-utils.js +++ b/tests/utils/request-utils.js @@ -15,7 +15,7 @@ export const get = (url) => { } resolve(res); - + }); }); };