mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-26 23:35:17 -07:00
perf(stats): use compressed incremental snapshot transfers (#241)
This commit is contained in:
1 parent
614a8ca912
commit
fb2d1a512b
17 files changed
+748
-25
No files matched your search
@@ -94,6 +94,23 @@ test('parseCliPrograms lowers sync options into app-owned CLI tokens', () => {
|
||||
assert.deepEqual(removeTemp.invocations.syncCliTokens, ['--remove-temp', '/tmp/subminer-sync-x']);
|
||||
});
|
||||
|
||||
test('parseCliPrograms forwards transfer cache keys with both sync temp helpers', () => {
|
||||
const key = 'a'.repeat(64);
|
||||
for (const helper of [['--make-temp'], ['--remove-temp', '/tmp/subminer-sync-x']]) {
|
||||
const tokens = [...helper, '--transfer-cache', key];
|
||||
const result = parseCliPrograms(['sync', ...tokens], 'subminer');
|
||||
assert.equal(result.invocations.syncTriggered, true);
|
||||
assert.deepEqual(result.invocations.syncCliTokens, tokens);
|
||||
}
|
||||
});
|
||||
|
||||
test('parseCliPrograms rejects sync --ui with --transfer-cache', () => {
|
||||
assert.throws(
|
||||
() => parseCliPrograms(['sync', '--ui', '--transfer-cache', 'a'.repeat(64)], 'subminer'),
|
||||
{ message: 'Sync --ui cannot be combined with other sync options.' },
|
||||
);
|
||||
});
|
||||
|
||||
test('parseCliPrograms leaves sync validation to the app parser', () => {
|
||||
// Invalid combinations are forwarded; the app's parseSyncCliTokens rejects them.
|
||||
const invalid = parseCliPrograms(['sync', 'media-box', '--push', '--pull'], 'subminer');
|
||||
|
||||
Reference in new issue
Block a user