diff --git a/dnf-behave-tests/dnf/gpg.feature b/dnf-behave-tests/dnf/gpg.feature index 4cdf28522..c8b9c9aad 100644 --- a/dnf-behave-tests/dnf/gpg.feature +++ b/dnf-behave-tests/dnf/gpg.feature @@ -31,10 +31,10 @@ Background: Add repository with gpgcheck=1 @dnf5 @dnf5daemon -Scenario: Install masterkey signed package and check GPG key was imported - When I execute dnf with args "install setup" +Scenario Outline: Install masterkey signed package and check GPG key was imported + When I execute dnf with args "install setup" Then the exit code is 0 - And Transaction is following + And is following | Action | Package | | install | setup-0:2.12.1-1.fc29.noarch | # There is now one imported gpg key in RPM db @@ -43,13 +43,18 @@ Scenario: Install masterkey signed package and check GPG key was imported Then the exit code is 0 And stdout contains "gpg\(dnf-ci-gpg\)" +Examples: + | offline | transaction | + | | Transaction | + | --offline | DNF Transaction | + @dnf5 @dnf5daemon -Scenario: Install subkey signed package with masterkey signed dependency - When I execute dnf with args "install filesystem" +Scenario Outline: Install subkey signed package with masterkey signed dependency + When I execute dnf with args "install filesystem" Then the exit code is 0 - And Transaction is following + And is following | Action | Package | | install | filesystem-0:3.9-2.fc29.x86_64 | | install-dep | setup-0:2.12.1-1.fc29.noarch | @@ -58,11 +63,16 @@ Scenario: Install subkey signed package with masterkey signed dependency And stdout contains "gpg\(dnf-ci-gpg\)" And stdout contains "gpg\(dnf-ci-gpg-subkey\)" +Examples: + | offline | transaction | + | | Transaction | + | --offline | DNF Transaction | + @dnf5 # XXX stderr @dnf5daemon -Scenario: Fail to install signed package with incorrectly signed dependency (with key from different repository) - When I execute dnf with args "install glibc" +Scenario Outline: Fail to install signed package with incorrectly signed dependency (with key from different repository) + When I execute dnf with args "install glibc" Then the exit code is 1 And DNF Transaction is following | Action | Package | @@ -79,11 +89,16 @@ Scenario: Fail to install signed package with incorrectly signed dependency (wit PGP check for package "basesystem-11-6\.fc29\.noarch" \(.*/basesystem-11-6\.fc29\.noarch\.rpm\) from repo "dnf-ci-gpg" has failed: Public key is not installed\. """ +Examples: + | offline | + | | + | --offline | + @dnf5 # XXX stderr @dnf5daemon -Scenario: Fail to install signed package with incorrect checksum - When I execute dnf with args "install broken-package" +Scenario Outline: Fail to install signed package with incorrect checksum + When I execute dnf with args "install broken-package" Then the exit code is 1 And DNF Transaction is following | Action | Package | @@ -95,29 +110,39 @@ Scenario: Fail to install signed package with incorrect checksum PGP check for package "broken-package-0\.2\.4-1\.fc29\.noarch" \(.*/broken-package-0\.2\.4-1\.fc29\.noarch\.rpm\) from repo "dnf-ci-gpg" has failed: Problem occurred when opening the package\. """ +Examples: + | offline | + | | + | --offline | + @dnf5 @dnf5daemon -Scenario: Install masterkey signed, unsigned and masterkey signed with unknown key packages from repo with gpgcheck=0 in repofile +Scenario Outline: Install masterkey signed, unsigned and masterkey signed with unknown key packages from repo with gpgcheck=0 in repofile Given I configure repository "dnf-ci-gpg" with | key | value | | gpgcheck | 0 | | gpgkey | file://{context.dnf.fixturesdir}/gpgkeys/keys/dnf-ci-gpg/dnf-ci-gpg-public | # install masterkey signed package - When I execute dnf with args "install setup" + When I execute dnf with args "install setup" Then the exit code is 0 # install unsigned package - When I execute dnf with args "install flac" + When I execute dnf with args "install flac" Then the exit code is 0 # install master signed with unknown key package - When I execute dnf with args "install basesystem" + When I execute dnf with args "install basesystem" Then the exit code is 0 +Examples: + | offline | + | | + | --offline | + @dnf5 # XXX stderr @dnf5daemon -Scenario: Attempt to install unsigned package from repo with gpgcheck=1 - When I execute dnf with args "install flac" +Scenario Outline: Attempt to install unsigned package from repo with gpgcheck=1 + When I execute dnf with args "install flac" Then the exit code is 1 And stderr contains lines matching """ @@ -125,24 +150,34 @@ Scenario: Attempt to install unsigned package from repo with gpgcheck=1 PGP check for package "flac-1\.3\.2-8\.fc29\.x86_64" \(.*/flac-1\.3\.2-8\.fc29\.x86_64\.rpm\) from repo "dnf-ci-gpg" has failed: The package is not signed\. """ +Examples: + | offline | + | | + | --offline | + @dnf5 -Scenario: Install unsigned package from repository without gpgcheck set using option --no-gpgchecks - When I execute dnf with args "install flac --no-gpgchecks" +Scenario Outline: Install unsigned package from repository without gpgcheck set using option --no-gpgchecks + When I execute dnf with args "install flac --no-gpgchecks" Then the exit code is 0 - And Transaction is following + And is following | Action | Package | | install | flac-0:1.3.2-8.fc29.x86_64 | +Examples: + | offline | transaction | + | | Transaction | + | --offline | DNF Transaction | + @dnf5 @bz1314405 -Scenario: Fail to install package with incorrect checksum with --no-gpgchecks +Scenario Outline: Fail to install package with incorrect checksum with --no-gpgchecks Given I configure repository "dnf-ci-gpg" with | key | value | | gpgcheck | | | gpgkey | | - When I execute dnf with args "install broken-package --no-gpgchecks" + When I execute dnf with args "install broken-package --no-gpgchecks" Then the exit code is 1 And DNF Transaction is following | Action | Package | @@ -150,24 +185,34 @@ Scenario: Fail to install package with incorrect checksum with --no-gpgchecks And RPMDB Transaction is empty And stderr contains "Transaction failed: Rpm transaction failed." +Examples: + | offline | + | | + | --offline | + @dnf5 @bz1915990 @bz1932079 @bz1932089 @bz1932090 -Scenario: Refuse to install a package with broken gpg signature +Scenario Outline: Refuse to install a package with broken gpg signature Given I drop repository "dnf-ci-gpg" And I use repository "dnf-ci-broken-rpm-signature" generated with exit code "2" And I configure repository "dnf-ci-broken-rpm-signature" with | key | value | | gpgcheck | 1 | | gpgkey | file://{context.dnf.fixturesdir}/gpgkeys/keys/dnf-ci-gpg/dnf-ci-gpg-public,file://{context.dnf.fixturesdir}/gpgkeys/keys/dnf-ci-gpg-subkey/dnf-ci-gpg-subkey-public | - When I execute dnf with args "install setup" + When I execute dnf with args "install setup" Then the exit code is 1 # dnf must not extract any files from the broken package Then file "/usr/share/doc/setup/README" does not exist +Examples: + | offline | + | | + | --offline | + @xfail @1941959 @@ -188,4 +233,3 @@ Scenario: Expire repo when failed to install package with incorrect checksum """ ["dnf-ci-gpg"] """ -