summaryrefslogtreecommitdiff
path: root/test/test.d/signed-packages.sh
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-04-02 13:19:05 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-04-02 13:19:05 +0200
commit1ce0c6368d0908e25f9bd1bb8183b5f29053fac8 (patch)
tree225c1d19b42c5b4a5d9319adb49bfece95a49952 /test/test.d/signed-packages.sh
parenta7b293ad4d819fa77592818af27f7c2a3b9b2ca4 (diff)
Add simple checks for handling signed packages
In addition to this dbscripts wont accept unsigned pacakges when REQUIRE_SIGNATURE is set to true. Note: At this point no signature verification is performed at all.
Diffstat (limited to 'test/test.d/signed-packages.sh')
-rwxr-xr-xtest/test.d/signed-packages.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test.d/signed-packages.sh b/test/test.d/signed-packages.sh
new file mode 100755
index 0000000..5d6f4ff
--- /dev/null
+++ b/test/test.d/signed-packages.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+curdir=$(readlink -e $(dirname $0))
+. "${curdir}/../lib/common.inc"
+
+testAddUnsignedPackage() {
+ releasePackage extra 'pkg-simple-a' 'i686'
+ # remove any signature
+ rm "${STAGING}"/extra/*.sig
+ ../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is missing!"
+}
+
+. "${curdir}/../lib/shunit2"