Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "OpenPGP" instead of "PGP" in distro-sync, gpg #1608

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dnf-behave-tests/dnf/distro-sync.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Given I use repository "dnf-ci-gpg"
Then the exit code is 1
And stderr contains lines matching
"""
Transaction failed: Signature verification failed.
PGP check for package "wget-2\.0\.0-1\.fc29\.x86_64" \(.*/wget-2.0.0-1.fc29.x86_64.rpm\) from repo "dnf-ci-gpg-updates" has failed: Problem occurred when opening the package.
Transaction failed: Signature verification failed\.
OpenPGP check for package "wget-2\.0\.0-1\.fc29\.x86_64" \(.*/wget-2.0.0-1.fc29.x86_64.rpm\) from repo "dnf-ci-gpg-updates" has failed: Problem occurred when opening the package\.
"""


Expand All @@ -86,8 +86,8 @@ Given I use repository "dnf-ci-gpg"
Then the exit code is 1
And stderr contains lines matching
"""
Transaction failed: Signature verification failed.
PGP check for package "wget-2\.0\.0-1\.fc29\.x86_64" \(.*/wget-2.0.0-1.fc29.x86_64.rpm\) from repo "dnf-ci-gpg-updates" has failed: Problem occurred when opening the package.
Transaction failed: Signature verification failed\.
OpenPGP check for package "wget-2\.0\.0-1\.fc29\.x86_64" \(.*/wget-2.0.0-1.fc29.x86_64.rpm\) from repo "dnf-ci-gpg-updates" has failed: Problem occurred when opening the package\.
"""


Expand Down
12 changes: 6 additions & 6 deletions dnf-behave-tests/dnf/gpg.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ Scenario Outline: Fail to <offline> install signed package with incorrectly sign
And RPMDB Transaction is empty
And stderr contains lines matching
"""
Transaction failed: Signature verification failed
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\.
Transaction failed: Signature verification failed\.
OpenPGP 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:
Expand All @@ -103,8 +103,8 @@ Scenario Outline: Fail to <offline> install signed package with incorrect checks
And RPMDB Transaction is empty
And stderr contains lines matching
"""
Transaction failed: Signature verification failed
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\.
Transaction failed: Signature verification failed\.
OpenPGP 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:
Expand Down Expand Up @@ -141,8 +141,8 @@ Scenario Outline: Attempt to <offline> install unsigned package from repo with g
Then the exit code is 1
And stderr contains lines matching
"""
Transaction failed: Signature verification failed
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\.
Transaction failed: Signature verification failed\.
OpenPGP 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:
Expand Down
4 changes: 2 additions & 2 deletions dnf-behave-tests/dnf/steps/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def then_stdout_contains_lines_matching(context):
test_lines = context.text.split('\n')
for line in test_lines:
for outline in out_lines:
if re.search(line.strip(), outline.strip()):
if re.search("^" + line.strip() + "$", outline.strip()):
break
else:
raise AssertionError("Stderr doesn't contain line matching: %s" % line)
Expand Down Expand Up @@ -321,7 +321,7 @@ def then_stderr_contains_lines_matching(context):
test_lines = context.text.split('\n')
for line in test_lines:
for outline in out_lines:
if re.search(line.strip(), outline.strip()):
if re.search("^" + line.strip() + "$", outline.strip()):
break
else:
raise AssertionError("Stderr doesn't contain line matching: %s" % line)
Expand Down
Loading