Skip to content

Commit

Permalink
fixup! Add test case for ima file signatures
Browse files Browse the repository at this point in the history
No need for run* wrappers here anymore (since commit
dd279b6), also use RPMTEST_SETUP as we
don't really need the RPMDB.
  • Loading branch information
dmnks committed Nov 21, 2024
1 parent c227360 commit 776ad98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/rpmsigdig.at
Original file line number Diff line number Diff line change
Expand Up @@ -1628,14 +1628,14 @@ RPMTEST_CLEANUP
AT_SETUP([ima])
AT_KEYWORDS([rpmsign file signature])

RPMDB_INIT
cp "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64.rpm "${RPMTEST}"/tmp/
gpg2 --import ${RPMTEST}/data/keys/rpm.org-rsa-2048-test.secret
runroot rpmsign --key-id 4344591E1964C5FC --addsign --signfiles --fskpath=/data/keys/privkey.pem /tmp/hello-2.0-1.x86_64.rpm
RPMTEST_SETUP
cp /data/RPMS/hello-2.0-1.x86_64.rpm /tmp/
gpg2 --import /data/keys/rpm.org-rsa-2048-test.secret
rpmsign --key-id 4344591E1964C5FC --addsign --signfiles --fskpath=/data/keys/privkey.pem /tmp/hello-2.0-1.x86_64.rpm

RPMTEST_CHECK([
runroot rpm -qp --qf "[%{filenames} %{filesignatures}\n]" /tmp/hello-2.0-1.x86_64.rpm | cut -c -20
runroot rpm -qp --qf "[%{filenames} %{filesignatures}\n]" /data/RPMS/imatest-1.0-1.fc34.noarch.rpm
rpm -qp --qf "[%{filenames} %{filesignatures}\n]" /tmp/hello-2.0-1.x86_64.rpm | cut -c -20
rpm -qp --qf "[%{filenames} %{filesignatures}\n]" /data/RPMS/imatest-1.0-1.fc34.noarch.rpm
],
[0],
[/usr/bin/hello 03020
Expand Down

0 comments on commit 776ad98

Please sign in to comment.