mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 00:24:07 +08:00
Test: Fix tests
Test: Add clear stats test Test: Attempt to fix tests Test: Add test for disable auth Update README
This commit is contained in:
@@ -176,7 +176,7 @@ exports.entryPage = "dashboard";
|
||||
|
||||
(async () => {
|
||||
Database.init(args);
|
||||
await initDatabase();
|
||||
await initDatabase(testMode);
|
||||
|
||||
exports.entryPage = await setting("entryPage");
|
||||
|
||||
@@ -1417,14 +1417,14 @@ async function getMonitorJSONList(userID) {
|
||||
return result;
|
||||
}
|
||||
|
||||
async function initDatabase() {
|
||||
async function initDatabase(testMode = false) {
|
||||
if (! fs.existsSync(Database.path)) {
|
||||
console.log("Copying Database");
|
||||
fs.copyFileSync(Database.templatePath, Database.path);
|
||||
}
|
||||
|
||||
console.log("Connecting to the Database");
|
||||
await Database.connect();
|
||||
await Database.connect(testMode);
|
||||
console.log("Connected");
|
||||
|
||||
// Patch the database
|
||||
|
Reference in New Issue
Block a user