When initializing the environment for tests of the ipc module, the
default GPG key is not explicitly set. Because newer GPG versions do
not automatically set the default key, no default key is set, causing
sign operations to fail.
This commit modifies the test cases for the ipc module so that the
default GPG key is set during the test setup.
The default key is not set automatically on newer GPG versions
include "ipc"
setup() {
+ local keyfp
+
if ! mkdir -p "/tmp/test.$$"; then
return 1
fi
return 1
fi
+ if ! keypf=$(gpg -K 2>/dev/null | grep -m 1 -oP '[0-9a-fA-F]{40}'); then
+ return 2
+ fi
+
+ if ! printf 'default-key %s\nquiet\n' "$keypf" > "/tmp/test.$$/gpg.conf"; then
+ return 3
+ fi
+
return 0
}