Commit 026c16a8 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

parser: Extend tests

Some more tests added, checking broken situations.
parent 4f9729ef
......@@ -217,6 +217,16 @@ function test_status_parse()
["/etc/config/dhcp"] = "f81fe9bd228dede2165be71e5c9dcf76cc",
["/etc/dnsmasq.conf"] = "1e6ab19c1ae5e70d609ac7b6246541d520"
})
-- Slightly broken package ‒ no relevant info files
status_check("ucollect-count", {
Package = "ucollect-count",
Version = "27",
Architecture = "mpc85xx",
["Installed-Time"] = "1453896279"
}, {"libc", "ucollect-prog"}, std_status, {})
-- More broken case - the whole status file missing
B.status_file = "/does/not/exist"
assert_error(B.status_parse)
end
local orig_status_file = B.status_file
......
......@@ -21,3 +21,10 @@ Conffiles:
/etc/config/dhcp f81fe9bd228dede2165be71e5c9dcf76cc
/etc/dnsmasq.conf 1e6ab19c1ae5e70d609ac7b6246541d520
Installed-Time: 1453896240
Package: ucollect-count
Version: 27
Depends: libc, ucollect-prog
Status: install user installed
Architecture: mpc85xx
Installed-Time: 1453896279
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