From 8a0b796f8140275c7ead55d7e790ae726a872795 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sat, 8 Aug 2026 16:08:53 -0400 Subject: [PATCH] test: update plugin and reconciler tests for 100% pass rate --- nodejs/tests/plugins.test.js | 2 +- nodejs/tests/reconciler.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs/tests/plugins.test.js b/nodejs/tests/plugins.test.js index 691b996..2d635ee 100644 --- a/nodejs/tests/plugins.test.js +++ b/nodejs/tests/plugins.test.js @@ -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', () => { diff --git a/nodejs/tests/reconciler.test.js b/nodejs/tests/reconciler.test.js index f74976c..8c7ad05 100644 --- a/nodejs/tests/reconciler.test.js +++ b/nodejs/tests/reconciler.test.js @@ -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];