summaryrefslogtreecommitdiff
path: root/tests/unittests/distros/test_mariner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/distros/test_mariner.py')
-rw-r--r--tests/unittests/distros/test_mariner.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/unittests/distros/test_mariner.py b/tests/unittests/distros/test_mariner.py
new file mode 100644
index 00000000..57f8d498
--- /dev/null
+++ b/tests/unittests/distros/test_mariner.py
@@ -0,0 +1,25 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
+from tests.unittests.helpers import CiTestCase
+
+from . import _get_distro
+
+SYSTEM_INFO = {
+ "paths": {
+ "cloud_dir": "/var/lib/cloud/",
+ "templates_dir": "/etc/cloud/templates/",
+ },
+ "network": {"renderers": "networkd"},
+}
+
+
+class TestMariner(CiTestCase):
+ with_logs = True
+ distro = _get_distro("mariner", SYSTEM_INFO)
+ expected_log_line = "Rely on MarinerOS default network config"
+
+ def test_network_renderer(self):
+ self.assertEqual(self.distro._cfg["network"]["renderers"], "networkd")
+
+ def test_get_distro(self):
+ self.assertEqual(self.distro.osfamily, "mariner")