chore: Remove DEPLOYMENT and SUBDOMAINS_ENABLED (#5742)

This commit is contained in:
Tom Moor
2023-08-28 20:39:58 -04:00
committed by GitHub
parent 7725f29dc7
commit 30a4303a8e
35 changed files with 136 additions and 135 deletions

View File

@@ -17,7 +17,6 @@ env.OIDC_TOKEN_URI = "http://localhost/token";
env.OIDC_USERINFO_URI = "http://localhost/userinfo";
env.RATE_LIMITER_ENABLED = false;
env.DEPLOYMENT = undefined;
if (process.env.DATABASE_URL_TEST) {
env.DATABASE_URL = process.env.DATABASE_URL_TEST;

View File

@@ -1,6 +1,8 @@
import TestServer from "fetch-test-server";
import { v4 as uuidv4 } from "uuid";
import sharedEnv from "@shared/env";
import { CollectionPermission } from "@shared/types";
import env from "@server/env";
import { User, Document, Collection, Team } from "@server/models";
import onerror from "@server/onerror";
import webService from "@server/services/web";
@@ -137,3 +139,17 @@ export function setupTestDatabase() {
afterAll(disconnect);
beforeEach(flush);
}
/**
* Set the environment to be cloud hosted
*/
export function setCloudHosted() {
return (env.URL = sharedEnv.URL = "https://app.outline.dev");
}
/**
* Set the environment to be self hosted
*/
export function setSelfHosted() {
return (env.URL = sharedEnv.URL = "https://wiki.example.com");
}