Speeding up server tests and removing the ability for it to port collide.
This commit is contained in:
parent
b379a1e3d3
commit
f0e7b9b25e
File diff suppressed because it is too large
Load Diff
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue