mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-23 20:15:19 +08:00
fix(ql3): preserve legacy running instances
This commit is contained in:
@@ -86,7 +86,9 @@ function legacyDomain(name: string): LocalReconciliationPlanDomain {
|
|||||||
if (['Dependences', 'Dependencies', 'Apps'].includes(name)) {
|
if (['Dependences', 'Dependencies', 'Apps'].includes(name)) {
|
||||||
return 'plugin_package';
|
return 'plugin_package';
|
||||||
}
|
}
|
||||||
if (['CrontabStats', 'Logs'].includes(name)) return 'run_history';
|
if (['CrontabStats', 'Logs', 'RunningInstances'].includes(name)) {
|
||||||
|
return 'run_history';
|
||||||
|
}
|
||||||
return 'unknown';
|
return 'unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
const assert = require('node:assert/strict');
|
||||||
|
const { test } = require('node:test');
|
||||||
|
|
||||||
|
const {
|
||||||
|
classifyLocalReconciliationFact,
|
||||||
|
} = require('../dist/deployment/reconciliation/planning/inventory.js');
|
||||||
|
|
||||||
|
test('classifies Legacy runtime instances as preserved run history', () => {
|
||||||
|
assert.equal(
|
||||||
|
classifyLocalReconciliationFact('legacy', 'RunningInstances'),
|
||||||
|
'run_history',
|
||||||
|
);
|
||||||
|
assert.equal(
|
||||||
|
classifyLocalReconciliationFact('legacy', 'PluginOwnedState'),
|
||||||
|
'unknown',
|
||||||
|
);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user