-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathexpired-pgp-keys.feature
More file actions
36 lines (30 loc) · 1.54 KB
/
expired-pgp-keys.feature
File metadata and controls
36 lines (30 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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:"