[debsums] 04/07: Add check for handling of missing md5sums files
Axel Beckert
abe at deuxchevaux.org
Thu Mar 26 01:30:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository debsums.
commit a848683fdba3e566926aeabbfcacb187ee535294
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Thu Mar 26 02:21:17 2015 +0100
Add check for handling of missing md5sums files
---
t/debsums.t | 6 ++++++
t/fakechroots/lossy/etc/fakepkg.cfg | 1 +
.../lossy/usr/share/doc/fakepkg/changelog.Debian.gz | Bin 0 -> 161 bytes
t/fakechroots/lossy/usr/share/doc/fakepkg/copyright | 14 ++++++++++++++
t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.conffiles | 1 +
t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.list | 8 ++++++++
t/fakechroots/lossy/var/lib/dpkg/status | 12 ++++++++++++
t/fakechroots/lossy/var/lib/dpkg/updates/.emptydir | 0
8 files changed, 42 insertions(+)
diff --git a/t/debsums.t b/t/debsums.t
index 604e0a8..c20658c 100644
--- a/t/debsums.t
+++ b/t/debsums.t
@@ -104,6 +104,12 @@ EOT
}
}
+# Check for handling of missing md5sums files
+run($command, "--root=t/fakechroots/lossy");
+is(stderr, "debsums: no md5sums for fakepkg\n", 'Warning on STDERR');
+is(stdout, '', 'STDOUT is empty');
+expected_rc(0);
+
done_testing();
sub sort_lines {
diff --git a/t/fakechroots/lossy/etc/fakepkg.cfg b/t/fakechroots/lossy/etc/fakepkg.cfg
new file mode 100644
index 0000000..362d60b
--- /dev/null
+++ b/t/fakechroots/lossy/etc/fakepkg.cfg
@@ -0,0 +1 @@
+# Valid conffile
diff --git a/t/fakechroots/lossy/usr/share/doc/fakepkg/changelog.Debian.gz b/t/fakechroots/lossy/usr/share/doc/fakepkg/changelog.Debian.gz
new file mode 100644
index 0000000..bdbec22
Binary files /dev/null and b/t/fakechroots/lossy/usr/share/doc/fakepkg/changelog.Debian.gz differ
diff --git a/t/fakechroots/lossy/usr/share/doc/fakepkg/copyright b/t/fakechroots/lossy/usr/share/doc/fakepkg/copyright
new file mode 100644
index 0000000..ecf2c92
--- /dev/null
+++ b/t/fakechroots/lossy/usr/share/doc/fakepkg/copyright
@@ -0,0 +1,14 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Comment: This is a fake copyright file, part of debsums' test suite
+
+Files: *
+Copyright:
+ 2015 Axel Beckert <abe at debian.org>
+License: GPL
+ This is free software, licensed under the terms of the GNU General Public
+ License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE.
+ .
+ You are free to distribute this software under the terms of the GNU General
+ Public License. On Debian systems, the complete text of the GNU General
+ Public License can be found in /usr/share/common-licenses/GPL file.
diff --git a/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.conffiles b/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.conffiles
new file mode 100644
index 0000000..8e3fbe9
--- /dev/null
+++ b/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.conffiles
@@ -0,0 +1 @@
+/etc/fakepkg.cfg
diff --git a/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.list b/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.list
new file mode 100644
index 0000000..15e4d61
--- /dev/null
+++ b/t/fakechroots/lossy/var/lib/dpkg/info/fakepkg.list
@@ -0,0 +1,8 @@
+/usr
+/usr/share
+/usr/share/doc
+/usr/share/doc/fakepkg
+/usr/share/doc/fakepkg/copyright
+/usr/share/doc/fakepkg/changelog.Debian.gz
+/etc
+/etc/fakepkg.cfg
diff --git a/t/fakechroots/lossy/var/lib/dpkg/status b/t/fakechroots/lossy/var/lib/dpkg/status
new file mode 100644
index 0000000..c040b54
--- /dev/null
+++ b/t/fakechroots/lossy/var/lib/dpkg/status
@@ -0,0 +1,12 @@
+Package: fakepkg
+Status: install ok installed
+Priority: extra
+Section: metapackages
+Installed-Size: 123
+Maintainer: Axel Beckert <abe+debsums-testsuite at debian.org>
+Architecture: all
+Version: 1
+Description: dummy package for debsums' test suite
+ This is an empty dummy package just used for debsums' test suite.
+Conffiles:
+ /etc/fakepkg.cfg dc0b26e33cba0138a27aa00dcc90ae09
diff --git a/t/fakechroots/lossy/var/lib/dpkg/updates/.emptydir b/t/fakechroots/lossy/var/lib/dpkg/updates/.emptydir
new file mode 100644
index 0000000..e69de29
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git
More information about the Pkg-perl-cvs-commits
mailing list