1
0
Fork 0
mirror of synced 2024-06-01 18:20:18 +12:00

Speeding up server tests and removing the ability for it to port collide.

This commit is contained in:
mike12345567 2021-06-25 16:14:06 +01:00
parent 9b172bfa27
commit d90f77fa42
3 changed files with 11 additions and 1004 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,3 +6,4 @@ env._set("JWT_SECRET", "test-jwtsecret")
env._set("CLIENT_ID", "test-client-id")
env._set("BUDIBASE_DIR", tmpdir("budibase-unittests"))
env._set("LOG_LEVEL", "silent")
env._set("PORT", 0)

View file

@ -26,7 +26,8 @@ const PASSWORD = "babs_password"
class TestConfiguration {
constructor(openServer = true) {
if (openServer) {
env.PORT = 4002
// use a random port because it doesn't matter
env.PORT = 0
this.server = require("../../app")
// we need the request for logging in, involves cookies, hard to fake
this.request = supertest(this.server)