-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expired-pgp-keys: Add basic CI tests
- Loading branch information
1 parent
b0149dd
commit 70a3b2e
Showing
5 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
dnf-behave-tests/dnf/plugins-core/expired-pgp-keys.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Feature: expired-pgp-keys plugin functionality | ||
|
||
|
||
Background: | ||
Given I enable plugin "expired-pgp-keys" | ||
And I configure dnf with | ||
| key | value | | ||
| pluginconfpath | {context.dnf.installroot}/etc/dnf/libdnf5-plugins | | ||
And I create file "/etc/dnf/libdnf5-plugins/expired-pgp-keys.conf" with | ||
""" | ||
[main] | ||
enabled = 1 | ||
""" | ||
And I use repository "dnf-ci-gpg-expiry" with configuration | ||
| key | value | | ||
| gpgcheck | 1 | | ||
| gpgkey | file://{context.dnf.fixturesdir}/gpgkeys/keys/dnf-ci-gpg-expiry/dnf-ci-gpg-expiry-public | | ||
And I use repository "simple-base" | ||
And I successfully execute dnf with args "install wget" | ||
|
||
|
||
Scenario: When PGP key is expired, its removal is triggered before transaction | ||
Given I move the clock forward to "2 years" | ||
And I successfully execute dnf with args "install vagare" | ||
Then stderr contains lines matching | ||
""" | ||
The following PGP key \(0x.*\) is about to be removed: | ||
Reason : Expired on .* | ||
UserID : "dnf-ci-gpg-expiry" | ||
""" | ||
|
||
|
||
Scenario: When PGP key is expired, its removal is not triggered on non-transactional operations | ||
Given I move the clock forward to "2 years" | ||
And I successfully execute dnf with args "repoquery vagare" | ||
Then stderr does not contain "The following PGP key \(0x.*\) is about to be removed:" |
1 change: 1 addition & 0 deletions
1
dnf-behave-tests/fixtures/gpgkeys/keyspecs/dnf-ci-gpg-expiry/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
USE_EXPIRATION_DATE=1 |
1 change: 1 addition & 0 deletions
1
dnf-behave-tests/fixtures/gpgkeys/keyspecs/dnf-ci-gpg-expiry/packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dnf-ci-gpg-expiry/x86_64/wget-1.19.5-5.fc29.x86_64.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
dnf-behave-tests/fixtures/specs/dnf-ci-gpg-expiry/wget-1.19.5-5.fc29.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Name: wget | ||
Version: 1.19.5 | ||
Release: 5%{?dist} | ||
Summary: A utility for retrieving files using the HTTP or FTP protocols | ||
|
||
License: GPLv3+ | ||
Group: Applications/Internet | ||
Url: http://www.gnu.org/software/wget/ | ||
|
||
Provides: webclient | ||
Provides: bundled(gnulib) | ||
|
||
%description | ||
GNU Wget is a file retrieval utility which can use either the HTTP or | ||
FTP protocols. Wget features include the ability to work in the | ||
background while you are logged out, recursive retrieval of | ||
directories, file name wildcard matching, remote file timestamp | ||
storage and comparison, use of Rest with FTP servers and Range with | ||
HTTP servers to retrieve files over slow or unstable connections, | ||
support for Proxy servers, and configurability. | ||
|
||
%files | ||
|
||
%changelog |