Skip to content

Holmanb/integration test fix ppa#1287

Merged
blackboxsw merged 3 commits into
canonical:mainfrom
holmanb:holmanb/integration-test-fix-ppa
Feb 21, 2022
Merged

Holmanb/integration test fix ppa#1287
blackboxsw merged 3 commits into
canonical:mainfrom
holmanb:holmanb/integration-test-fix-ppa

Conversation

@holmanb
Copy link
Copy Markdown
Member

@holmanb holmanb commented Feb 21, 2022

Update apt test for new ppa url in jammy

Additional Context

Looks like we're not the only ones affected by this behavior change.

Test failures look like this:

07:51:15 ___________________________ TestApt.test_ppa_source ____________________________
07:51:15 
07:51:15 self = <test_apt.TestApt object at 0x7f7b6878fda0>
07:51:15 class_client = <tests.integration_tests.instances.IntegrationInstance object at 0x7f7b6554c940>
07:51:15 
07:51:15     def test_ppa_source(self, class_client: IntegrationInstance):
07:51:15         """Test the apt ppa functionality.
07:51:15     
07:51:15         Ported from
07:51:15         tests/cloud_tests/testcases/modules/apt_configure_sources_ppa.py
07:51:15         """
07:51:15         release = ImageSpecification.from_os_image().release
07:51:15         ppa_path_contents = class_client.read_from_file(
07:51:15             "/etc/apt/sources.list.d/"
07:51:15             "simplestreams-dev-ubuntu-trunk-{}.list".format(release)
07:51:15         )
07:51:15     
07:51:15 >       assert (
07:51:15             "http://ppa.launchpad.net/simplestreams-dev/trunk/ubuntu"
07:51:15             in ppa_path_contents
07:51:15         )
07:51:15 E       AssertionError: assert 'http://ppa.launchpad.net/simplestreams-dev/trunk/ubuntu' in 'deb https://ppa.launchpadcontent.net/simplestreams-dev/trunk/ubuntu/ jammy main\n# deb-src https://ppa.launchpadcontent.net/simplestreams-dev/trunk/ubuntu/ jammy main'
07:51:15 

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor thought on avoiding the linelength and making the test more strict and jammy-only.

Your call, but we probably need to sort formating/flake errors somehow.

Comment thread tests/integration_tests/modules/test_apt.py Outdated
@holmanb holmanb force-pushed the holmanb/integration-test-fix-ppa branch from 58b9fd9 to a677b24 Compare February 21, 2022 20:16
Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@blackboxsw blackboxsw merged commit da3fd33 into canonical:main Feb 21, 2022
"simplestreams-dev-ubuntu-trunk-{}.list".format(release)
)

host = "launchpad" if release == "jammy" else "launchpadcontent"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holmanb I think we've got this backwards :/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're right. Fix PR here: #1296

holmanb added a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
PPA URLs in Jammy changed from ppa.launchpad.net
to ppa.launchpadcontent.net.
holmanb added a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
PPA URLs in Jammy changed from ppa.launchpad.net
to ppa.launchpadcontent.net.
blackboxsw pushed a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
PPA URLs in Jammy changed from ppa.launchpad.net
to ppa.launchpadcontent.net.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants