From 3d862031aaf341d2b566e967eb4eaf8324df7909 Mon Sep 17 00:00:00 2001 From: javierbrk Date: Wed, 4 Oct 2023 09:13:47 -0300 Subject: [PATCH] removed hard_ifindex and added new line at the end of file --- .../files/usr/bin/shared-state-publish_bat_links_info | 2 ++ .../tests/test_shared-state-bat_links_info.lua | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shared-state-bat_links_info/files/usr/bin/shared-state-publish_bat_links_info b/packages/shared-state-bat_links_info/files/usr/bin/shared-state-publish_bat_links_info index 83d36bd7b..7c4b3468d 100755 --- a/packages/shared-state-bat_links_info/files/usr/bin/shared-state-publish_bat_links_info +++ b/packages/shared-state-bat_links_info/files/usr/bin/shared-state-publish_bat_links_info @@ -31,8 +31,10 @@ function get_bat_links_info() for key,value in pairs (batneights_obj) do macparts = network.get_mac(value.iface) src_macaddr = table.concat(macparts,":") + value.hard_ifindex=nil value.src_mac=src_macaddr end + utils.printJson(batneights_obj) return batneights_obj end diff --git a/packages/shared-state-bat_links_info/tests/test_shared-state-bat_links_info.lua b/packages/shared-state-bat_links_info/tests/test_shared-state-bat_links_info.lua index 94982926e..5a91ff026 100644 --- a/packages/shared-state-bat_links_info/tests/test_shared-state-bat_links_info.lua +++ b/packages/shared-state-bat_links_info/tests/test_shared-state-bat_links_info.lua @@ -20,8 +20,7 @@ describe('Tests bat_links_info #bat_links_info', function () links_info = get_bat_links_info() assert.are.equal(table.concat(iwinfo.mocks.wlan1_mesh_mac,":"), links_info[1].src_mac) assert.are.equal('02:58:47:da:4e:aa', links_info[1].dst_mac) - assert.are.equal(26, links_info[1].hard_ifindex) assert.are.equal(1990, links_info[1].last_seen_msecs) assert.are.equal("wlan0-mesh_250", links_info[1].iface) end) -end) \ No newline at end of file +end)