mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-09 07:09:57 +03:00
remove index html tests and update github conf
This commit is contained in:
Vendored
+1
-2
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
@@ -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}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user