Commit 0731fb2b authored by Julian Andres Klode's avatar Julian Andres Klode

test_aptsources: Fix test if current distribution does not exist

This fixes tests on derivates that are not listed in data/, and
on new development versions of listed distributions - this also
has a negative effect though: We might miss some.
parent 9e8c15a5
......@@ -143,7 +143,10 @@ class TestAptSources(testcommon.TestCase):
apt_pkg.config.set("Dir::Etc::sourcelist", "data/aptsources/"
"sources.list.testDistribution")
sources = aptsources.sourceslist.SourcesList(True, self.templates)
distro = aptsources.distro.get_distro(id="Ubuntu")
distro = aptsources.distro.get_distro(id="Ubuntu",
codename="bionic",
description="Ubuntu 18.04 LTS",
release="18.04")
distro.get_sources(sources)
# test if all suits of the current distro were detected correctly
for s in sources:
......@@ -209,7 +212,10 @@ class TestAptSources(testcommon.TestCase):
apt_pkg.config.set("Dir::Etc::sourcelist", "data/aptsources/"
"sources.list.testDistribution")
sources = aptsources.sourceslist.SourcesList(True, self.templates)
distro = aptsources.distro.get_distro(id="Ubuntu")
distro = aptsources.distro.get_distro(id="Ubuntu",
codename="bionic",
description="Ubuntu 18.04 LTS",
release="18.04")
distro.get_sources(sources)
# test if all suits of the current distro were detected correctly
dist_templates = set()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment