fix(qdreader): split archive and sign cron plugins

This commit is contained in:
2026-05-20 11:56:40 +08:00
parent 36717c3887
commit 2413bd5b12
8 changed files with 1668 additions and 23 deletions
+10
View File
@@ -557,3 +557,13 @@ test('user cannot overwrite another user bound cookie', () => {
assert.equal(JSON.parse(r.store.qdreader_cookie_json)['12345'], cookie);
assert.equal(JSON.parse(r.store.qdreader_user_bind_json)['12345'], '987654321');
});
test('qdreader cron is split into simple independent schedules for Autman compatibility', () => {
const signCode = fs.readFileSync(new URL('../plugins/qdreader/qdreader_sign_autman.js', import.meta.url), 'utf8');
const archiveCode = fs.readFileSync(new URL('../plugins/qdreader/qdreader_archive_autman.js', import.meta.url), 'utf8');
assert.match(signCode, /\/\/\[cron: 1 7 \* \* \*\]/);
assert.doesNotMatch(signCode, /\/\/\[cron: 1 0,7 \* \* \*\]/);
assert.match(archiveCode, /\/\/\[cron: 1 0 \* \* \*\]/);
assert.doesNotMatch(archiveCode, /\/\/\[rule:/);
assert.match(archiveCode, /日志归档插件/);
});