release: Multi-Hoster-Upload 2.1.7

This commit is contained in:
Sucukdeluxe
2026-08-11 16:10:13 +02:00
parent 7c97915d64
commit 03136e9fef
28 changed files with 2368 additions and 80 deletions
+13
View File
@@ -83,6 +83,11 @@ describe('ConfigStore', () => {
assert.deepEqual(config.history, []);
});
it('keeps permanent source deletion disabled by default', () => {
const config = store.load();
assert.equal(config.globalSettings.deleteSourceAfterSuccessfulUpload, false);
});
it('save then load round-trips', async () => {
await store.save({ hosters: { 'doodstream.com': [{ id: 'test-1', enabled: true, authType: 'api', apiKey: 'test-key-123' }] } });
const config = store.load();
@@ -664,6 +669,14 @@ describe('ConfigStore history split (electron-history.json)', () => {
assert.equal(JSON.parse(fs.readFileSync(s.filePath, 'utf-8')).globalSettings.historyRetention, 'all');
});
it('appendHistory rejects when the migrated history file is corrupted', async () => {
writeConfigWithHistory(12);
s._migrateHistory();
fs.writeFileSync(s.historyPath, '{broken-history', 'utf-8');
await assert.rejects(s.appendHistory({ id: 'unsafe-delete-barrier', files: [] }), /Verlaufsdatei ist beschädigt/);
});
it('pruneHistory trims history.json and persists the retention setting', async () => {
writeConfigWithHistory(12);
s._migrateHistory();