pytests: TestApt tests parsing the apt-key output fail on Xenial and Hirsute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Sample error:
-------
def test_keyserver(
"""Test the apt keyserver functionality.
Ported from
"""
)
assert (
'http://
) in test_keyserver_
keys = class_client.
> assert TEST_KEYSERVER_KEY in keys
E AssertionError: assert 'pub rsa1024 2013-12-09 [SC]\n 7260 0DB1 5B8E 4C8B 1964 B868 038A CC97 C660 A937\nuid [ unknown] Launchpad PPA for Ryan Harper\n' in '/etc/apt/
class_client = <tests.
keys = '/etc/apt/
self = <test_apt.TestApt object at 0x7fcfcfbcb1d0>
test_keyserver_
-------
Changed in cloud-init: | |
status: | New → Fix Committed |
TestApt: :test_ppa_ source also fails on Hirsute because of a difference in how the PPA keys are added. This command
add-apt- repository ppa:simplestrea ms-dev/ trunk
on Focal install this file:
/etc/ apt/trusted. gpg.d/simplestr eams-dev_ ubuntu_ trunk.gpg
while on Hirsute file is named:
/etc/ apt/trusted. gpg.d/simplestr eams-dev- ubuntu- trunk.gpg
The PR above also cover this case, as it makes the test only check for the presence of the PPA key fingerprint.