feat(api): absorb the Hub control plane into the local instance model
Add central notification channels, rules, queue and delivery logs, fleet organization groups and tags, device discovery, the device action catalog, instance module reads, the log centre, connection settings and system maintenance as native /api/v1 routes backed by the existing secret store, audit trail and pinned upstream transport.
This commit is contained in:
@@ -274,26 +274,12 @@ describe('legacy import', () => {
|
||||
const path = await legacyFile(valid);
|
||||
const db = database();
|
||||
const now = new Date().toISOString();
|
||||
db.prepare('INSERT INTO instances VALUES (?,?,?,?,?,?,?,?)').run(
|
||||
'alpha',
|
||||
'Different',
|
||||
'https://203.0.113.99',
|
||||
'none',
|
||||
1,
|
||||
7,
|
||||
now,
|
||||
now,
|
||||
);
|
||||
db.prepare('INSERT INTO instances VALUES (?,?,?,?,?,?,?,?)').run(
|
||||
'owner',
|
||||
'Owner',
|
||||
'http://[2001:4860:4860::8888]:8080',
|
||||
'none',
|
||||
1,
|
||||
1,
|
||||
now,
|
||||
now,
|
||||
);
|
||||
db.prepare(
|
||||
'INSERT INTO instances (id,name,base_url,auth_mode,enabled,config_revision,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?)',
|
||||
).run('alpha', 'Different', 'https://203.0.113.99', 'none', 1, 7, now, now);
|
||||
db.prepare(
|
||||
'INSERT INTO instances (id,name,base_url,auth_mode,enabled,config_revision,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?)',
|
||||
).run('owner', 'Owner', 'http://[2001:4860:4860::8888]:8080', 'none', 1, 1, now, now);
|
||||
const preview = await previewLegacyImport(path, db);
|
||||
expect(preview.instances.map((item) => item.status)).toEqual(['conflict', 'conflict']);
|
||||
expect(preview.counts.conflict).toBe(2);
|
||||
|
||||
Reference in New Issue
Block a user