remove index html tests and update github conf

This commit is contained in:
zkldi
2021-07-31 01:59:44 +01:00
parent 5a6a334e69
commit 8993a27ff4
3 changed files with 4 additions and 22 deletions
+1 -2
View File
@@ -12,8 +12,7 @@
ARC_AUTH_TOKEN: "unused",
CDN_FILE_ROOT: "./local-cdn",
PORT: 8080,
TYPE: "omni", // It really doesn't matter whether we're in bokutachi or kamaitachi mode. If we had the performance we could run these in parallel?
CLIENT_INDEX_HTML_PATH: "./src/test-utils/mock-index.html",
TYPE: "omni",
ENABLE_SERVER_HTTPS: false,
RUN_OWN_CDN: true
}
-17
View File
@@ -1,17 +0,0 @@
import t from "tap";
import { CloseAllConnections } from "test-utils/close-connections";
import mockApi from "test-utils/mock-api";
t.test("GET /", (t) => {
t.test("Should return our index.html", async (t) => {
const res = await mockApi.get("/");
t.equal(res.text, "<div>Hello World.</div>");
t.end();
});
t.end();
});
t.teardown(CloseAllConnections);
+3 -3
View File
@@ -7,8 +7,8 @@ import path from "path";
import CreateLogCtx from "lib/logger/logger";
// im installing an entire library for rm rf...
import rimraf from "rimraf";
import { CDN_FILE_ROOT, MONGO_CONNECTION_URL } from "lib/setup/config";
import { SetIndexes } from "external/mongo/indexes";
import { ServerConfig } from "lib/setup/config";
const logger = CreateLogCtx(__filename);
@@ -79,7 +79,7 @@ export default async function ResetDBState() {
export function ResetCDN() {
return new Promise<void>((resolve, reject) =>
rimraf(CDN_FILE_ROOT, (err) => {
rimraf(ServerConfig.CDN_FILE_ROOT, (err) => {
if (err) {
reject(err);
}
@@ -89,7 +89,7 @@ export function ResetCDN() {
}
export async function SetIndexesForDB() {
const url = `${MONGO_CONNECTION_URL}/testingdb`;
const url = `${ServerConfig.MONGO_CONNECTION_URL}/testingdb`;
logger.info(`Setting indexes for ${url}`);