pkg: Test for extraction of config files and their hashes

parent 266bc228
......@@ -363,7 +363,7 @@ function pkg_examine(dir)
local fname = l:match("^%s*/(.*%S)%s*")
local function get_hash(text)
local hash = text:match("[0-9a-fA-F]+")
conffiles[fname] = hash
conffiles["/" .. fname] = hash
end
launch(get_hash, "/usr/bin/md5sum", fname)
end
......
......@@ -307,7 +307,9 @@ function test_pkg_unpack()
/usr/share/updater/hashes
/usr/share/updater/keys
/usr/bin]]), dirs)
-- TODO: How about the conffiles
assert_table_equal({
["/etc/config/updater"] = "30843ef73412c8f6b4212c00724a1cc8"
}, conffiles)
end
function setup()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment