* [PATCH] tests: Avoid printing the entire test database
@ 2026-10-26 20:16 Valters Jansons
0 siblings, 0 replies; only message in thread
From: Valters Jansons @ 2026-10-26 20:16 UTC (permalink / raw)
To: location
Lua tests currently iterate the database, and dump all of its contents
into the runner's log. This might be beneficial in testing, however it
does not necessarily help during regular builds.
This commit retains the reverse_pointer() invocation, but instead of
printing simply counts the number of entries and asserts at at least
something existed.
---
tests/lua/main.lua.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/lua/main.lua.in b/tests/lua/main.lua.in
index c947334..290e832 100755
--- a/tests/lua/main.lua.in
+++ b/tests/lua/main.lua.in
@@ -219,9 +219,14 @@ function test_list_networks()
db = location.Database.open(ENV_TEST_DATABASE)
luaunit.assertNotNil(db)
+ local count = 0
+
for network in db:list_networks() do
- print(network, network:reverse_pointer())
+ network:reverse_pointer()
+ count = count + 1
end
+
+ luaunit.assertTrue(count > 0)
end
os.exit(luaunit.LuaUnit.run())
--
2.56.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-26 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 20:16 [PATCH] tests: Avoid printing the entire test database Valters Jansons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox