Attempting to get integration tests passing again.
This commit is contained in:
parent
94983c289f
commit
d6eb2b9452
|
@ -17,7 +17,7 @@ import {
|
||||||
env as coreEnv,
|
env as coreEnv,
|
||||||
timers,
|
timers,
|
||||||
} from "@budibase/backend-core"
|
} from "@budibase/backend-core"
|
||||||
db.init()
|
|
||||||
import Koa from "koa"
|
import Koa from "koa"
|
||||||
import koaBody from "koa-body"
|
import koaBody from "koa-body"
|
||||||
import http from "http"
|
import http from "http"
|
||||||
|
@ -85,6 +85,7 @@ const shutdown = () => {
|
||||||
|
|
||||||
export default server.listen(parseInt(env.PORT || "4002"), async () => {
|
export default server.listen(parseInt(env.PORT || "4002"), async () => {
|
||||||
console.log(`Worker running on ${JSON.stringify(server.address())}`)
|
console.log(`Worker running on ${JSON.stringify(server.address())}`)
|
||||||
|
await db.init()
|
||||||
await initPro()
|
await initPro()
|
||||||
// configure events to use the pro audit log write
|
// configure events to use the pro audit log write
|
||||||
// can't integrate directly into backend-core due to cyclic issues
|
// can't integrate directly into backend-core due to cyclic issues
|
||||||
|
|
|
@ -7,7 +7,6 @@ mocks.licenses.init(mocks.pro)
|
||||||
mocks.licenses.useUnlimited()
|
mocks.licenses.useUnlimited()
|
||||||
|
|
||||||
import * as dbConfig from "../db"
|
import * as dbConfig from "../db"
|
||||||
dbConfig.init()
|
|
||||||
import env from "../environment"
|
import env from "../environment"
|
||||||
import * as controllers from "./controllers"
|
import * as controllers from "./controllers"
|
||||||
const supertest = require("supertest")
|
const supertest = require("supertest")
|
||||||
|
@ -109,6 +108,7 @@ class TestConfiguration {
|
||||||
// SETUP / TEARDOWN
|
// SETUP / TEARDOWN
|
||||||
|
|
||||||
async beforeAll() {
|
async beforeAll() {
|
||||||
|
await dbConfig.init()
|
||||||
try {
|
try {
|
||||||
await this.createDefaultUser()
|
await this.createDefaultUser()
|
||||||
await this.createSession(this.user!)
|
await this.createSession(this.user!)
|
||||||
|
|
|
@ -983,10 +983,10 @@
|
||||||
expect "^29.0.0"
|
expect "^29.0.0"
|
||||||
pretty-format "^29.0.0"
|
pretty-format "^29.0.0"
|
||||||
|
|
||||||
"@types/node-fetch@2.6.2":
|
"@types/node-fetch@2.6.4":
|
||||||
version "2.6.2"
|
version "2.6.4"
|
||||||
resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz"
|
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660"
|
||||||
integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==
|
integrity sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
form-data "^3.0.0"
|
form-data "^3.0.0"
|
||||||
|
@ -3587,18 +3587,18 @@ node-duration@^1.0.4:
|
||||||
resolved "https://registry.npmjs.org/node-duration/-/node-duration-1.0.4.tgz"
|
resolved "https://registry.npmjs.org/node-duration/-/node-duration-1.0.4.tgz"
|
||||||
integrity sha512-eUXYNSY7DL53vqfTosggWkvyIW3bhAcqBDIlolgNYlZhianXTrCL50rlUJWD1eRqkIxMppXTfiFbp+9SjpPrgA==
|
integrity sha512-eUXYNSY7DL53vqfTosggWkvyIW3bhAcqBDIlolgNYlZhianXTrCL50rlUJWD1eRqkIxMppXTfiFbp+9SjpPrgA==
|
||||||
|
|
||||||
node-fetch@2, node-fetch@2.6.7, node-fetch@^2.6.7:
|
node-fetch@2.6.0:
|
||||||
|
version "2.6.0"
|
||||||
|
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz"
|
||||||
|
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
|
||||||
|
|
||||||
|
node-fetch@2.6.7, node-fetch@^2.6.7:
|
||||||
version "2.6.7"
|
version "2.6.7"
|
||||||
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz"
|
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz"
|
||||||
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
|
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
whatwg-url "^5.0.0"
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
node-fetch@2.6.0:
|
|
||||||
version "2.6.0"
|
|
||||||
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz"
|
|
||||||
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
|
|
||||||
|
|
||||||
node-gyp-build-optional-packages@5.0.7:
|
node-gyp-build-optional-packages@5.0.7:
|
||||||
version "5.0.7"
|
version "5.0.7"
|
||||||
resolved "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz"
|
resolved "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz"
|
||||||
|
@ -4893,10 +4893,10 @@ type-is@^1.6.16, type-is@^1.6.18:
|
||||||
media-typer "0.3.0"
|
media-typer "0.3.0"
|
||||||
mime-types "~2.1.24"
|
mime-types "~2.1.24"
|
||||||
|
|
||||||
typescript@4.7.3:
|
typescript@5.2.2:
|
||||||
version "4.7.3"
|
version "5.2.2"
|
||||||
resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
|
||||||
integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==
|
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
|
||||||
|
|
||||||
uid2@0.0.x:
|
uid2@0.0.x:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
|
|
Loading…
Reference in New Issue