Skip to content

Commit

Permalink
test: switch from inkscape to terminator ppa for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garner-canonical committed Dec 4, 2024
1 parent b993c54 commit 679ae50
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 42 deletions.
29 changes: 0 additions & 29 deletions tests/integration/keys/INKSCAPE_KEY.asc

This file was deleted.

28 changes: 28 additions & 0 deletions tests/integration/keys/TERMINATOR_KEY.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF+QbdoBEADVJllCeHgrQoKNH0ThjzarJAf379nA/y1Bxog9BsJCyyny/wlb
BJ9hUWdqTVgLAvrE4Dz4Y+ju0bjI4ukonzG4oTsFzncm20MmbcrmhdMZQXC2ONit
2+cRI05HGlgPlnIsMT0NRFJ3JjL0GSU+koSyU3SWb2Dgevnk2zkoo37xvsvF3DFx
gg1JvGhZyMiPDqnnBcknkdoQHIG/Qe8T0yCIz7Byu5Ej7WzPFznlHhg1ybmU0eze
TJOTo9R+57dD4hthi4329/E+6AuGZSZJBTRe2r1yW3tKpxx88b9RU6l/5fyJM6xi
udneOdcGKE6PNRCmKCAMXc5UGS4H1j5s5QcWdmXKtYG+b5tQcqX2DlCnCdAnmwMh
VlH1s9PI19leRkQnJs64cZkVBBqNhPQrBvvZpBLKXWB6YQBhRDf8FoP/zwdvKEZh
4JwFrRk6fnJ7ZmZFun58rMYnkTy8AX4wvvGPlfo2UgjDlEG9w82udIkTpCAgIOFG
4rQ4mcXvH6D7v7VhrIszKIDrtHTtV03FJntZCyAavbafyfx3OmMgWIZFXOxqk2Jm
hVm93CrZbrp3A7FnxcMa7mCuOw9j7kYe4ZmMj9eY3JiM+lrGB+WhA9mhmQc8kWWU
5wJphnmZ2SqEu/FD7B2UNQHHswRcTbGFBIjsgFE2FNFE6WFF7sB+uKeFLQARAQAB
tBpMYXVuY2hwYWQgUFBBIGZvciBNYXR0Um9zZYkCTgQTAQoAOBYhBGTdJhyFmKa6
4qIL070v4KAeMWTbBQJfkG3aAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJ
EL0v4KAeMWTbrrMQAM5oNOWNSFmkCysxmd/geBT8B9koClVLWyiKeWdVtGvFjajq
+AUQ9xJpbQSf7wL1VkcqmL3HKAY6xwfT5qJCjvpljJVNMxpg12EMHBEzzFq5XnL7
5l0ovf+LigexN0zU46Uc8vasDFDkRrR6Vftl4wq3DXKo70SPXX+rACN4R7Tt/jRE
D+XWKT2zJ1KZIt/8j064d9d2r6n6ozdMiO/WyR/oNQjqZHkqSxH7jOEfPp6u8PM6
HnsyCBIWfliS5ieQ1hT3bp2Zl0qHSrvND4j+TnrmgU5LYhWhzvafEKyPoEkjWiIr
3zXRtqc40yVlYdMtu4LEesYxLUKt0Kx9yoAoe/UtT4feCFdXb/9S8CEqSfSDo8Hb
XVjKHjX0HL9os7xFX0f4Jeah7QHF0NiYPMqClDCe+/A49wvWz6JMaGhHy7qoa/hg
k8mmpSmWw24juMP6j3mMD0W8NfEOc0gXmFczJjGcm7WwYD6w3y1G8EOafM6CvzW6
3M/sMt/NSKtXlXtflb1JJCcY6rLhXihjjE5HGZGvzTsNLWZi5kaIXOk/qBKf4gLJ
MjSgVI4iBvlsmQkQvGwuSJIkrXeNvzQIOyfllmA4L+i/8gGYJslxNtd19Ij/TMFs
glQXml9hi28VCApMCL64eF3sED9731RH7dYlW6xVFeNqL4Dg002y4ZTpXBPb
=3yD+
-----END PGP PUBLIC KEY BLOCK-----
26 changes: 13 additions & 13 deletions tests/integration/test_apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,37 +91,37 @@ def test_install_package_from_external_repository():


def test_install_higher_version_package_from_external_repository():
repo_id = "deb-https://ppa.launchpadcontent.net/inkscape.dev/stable/ubuntu/-jammy"
repo_id = "deb-https://ppa.launchpadcontent.net/mattrose/terminator/ubuntu/-jammy"
repos = apt.RepositoryMapping()
assert repo_id not in repos
## version before
if not get_command_path("inkscape"):
apt.add_package("inkscape")
if not get_command_path("terminator"):
apt.add_package("terminator")
version_before = subprocess.run(
["inkscape", "--version"],
["terminator", "--version"],
capture_output=True,
check=True,
text=True,
).stdout
apt.remove_package("inkscape")
assert not get_command_path("inkscape")
apt.remove_package("terminator")
assert not get_command_path("terminator")
## steps
repo = apt.DebianRepository(
enabled=True,
repotype="deb",
uri="https://ppa.launchpadcontent.net/inkscape.dev/stable/ubuntu/",
uri="https://ppa.launchpadcontent.net/mattrose/terminator/ubuntu/",
release="jammy",
groups=["main"],
)
repos.add(repo) # update_cache=False by default
assert repo_id in repos
assert repo_id in apt.RepositoryMapping()
key_file = apt.import_key((KEY_DIR / "INKSCAPE_KEY.asc").read_text())
key_file = apt.import_key((KEY_DIR / "TERMINATOR_KEY.asc").read_text())
apt.update()
apt.add_package("inkscape")
assert get_command_path("inkscape")
apt.add_package("terminator")
assert get_command_path("terminator")
version_after = subprocess.run(
["inkscape", "--version"],
["terminator", "--version"],
capture_output=True,
check=True,
text=True,
Expand All @@ -132,8 +132,8 @@ def test_install_higher_version_package_from_external_repository():
apt._add_repository(repo, remove=True) # pyright: ignore[reportPrivateUsage]
assert repo_id not in apt.RepositoryMapping()
apt.update()
apt.remove_package("inkscape")
assert not get_command_path("inkscape")
apt.remove_package("terminator")
assert not get_command_path("terminator")


def test_install_hardware_observer_ssacli():
Expand Down

0 comments on commit 679ae50

Please sign in to comment.