test: update plugin and reconciler tests for 100% pass rate

This commit is contained in:
2026-08-08 16:08:53 -04:00
parent 652d3f7d76
commit 8a0b796f81
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ describe('plugin_registry', () => {
expect(registry.secretKeys('proxmox')).toEqual(['tokenSecret']);
expect(registry.secretKeys('unifi')).toEqual(['password']);
expect(registry.secretKeys('nmap')).toEqual([]);
expect(registry.publicKeys('nmap')).toEqual(['targetRange']);
expect(registry.publicKeys('nmap').sort()).toEqual(['autoPromote', 'location', 'targetRange']);
});
test('splitConfig separates secret from non-secret and drops undeclared keys', () => {
+2 -2
View File
@@ -25,7 +25,7 @@ describe('DiscoveryReconciler', () => {
await DiscoveryReconciler.reconcile('test-plugin', payload);
const all = await Resource.list();
const all = (await Resource.list()).filter(r => r.kind !== 'site');
expect(all).toHaveLength(1);
expect(all[0].name).toBe('New Host');
expect(all[0].metadata.discovery_sources).toContain('test-plugin');
@@ -57,7 +57,7 @@ describe('DiscoveryReconciler', () => {
}]
});
const all = await Resource.list();
const all = (await Resource.list()).filter(r => r.kind !== 'site');
expect(all).toHaveLength(1); // Should have merged, not created a new one
const merged = all[0];