← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~dbungert/curtin:py-apt-prep into curtin:master

 


Diff comments:

> diff --git a/tests/vmtests/test_python_apt.py b/tests/vmtests/test_python_apt.py
> new file mode 100644
> index 0000000..4162608
> --- /dev/null
> +++ b/tests/vmtests/test_python_apt.py
> @@ -0,0 +1,42 @@
> +# This file is part of curtin. See LICENSE file for copyright and license info.
> +
> +from aptsources.sourceslist import SourceEntry
> +
> +from . import VMBaseClass
> +from .releases import base_vm_classes as relbase
> +
> +
> +class TestPythonApt(VMBaseClass):
> +    """TestPythonApt - apt sources manipulation with python{,3}-apt"""
> +    test_type = 'config'
> +    conf_file = "examples/tests/apt_source_custom.yaml"
> +
> +    def test_python_apt(self):
> +        """test_python_apt - Ensure the python-apt package is available"""
> +
> +        line = 'deb http://us.archive.ubuntu.com/ubuntu/ hirsute main'
> +
> +        self.assertEqual(line, str(SourceEntry(line)))

Yes, this is just a stand in for more interesting tests.  Subsequent MP will replace this with more interesting content.
It is purposefully a test environment test as I was not certain that the python-apt package was getting installed to various places.

> +
> +
> +class XenialTestPythonApt(relbase.xenial, TestPythonApt):
> +    __test__ = True
> +
> +
> +class BionicTestPythonApt(relbase.bionic, TestPythonApt):
> +    __test__ = True
> +
> +
> +class FocalTestPythonApt(relbase.focal, TestPythonApt):
> +    __test__ = True
> +
> +
> +class HirsuteTestPythonApt(relbase.hirsute, TestPythonApt):
> +    __test__ = True
> +
> +
> +class ImpishTestPythonApt(relbase.impish, TestPythonApt):
> +    __test__ = True
> +
> +
> +# vi: ts=4 expandtab syntax=python


-- 
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/407871
Your team curtin developers is subscribed to branch curtin:master.



References