summaryrefslogtreecommitdiff
path: root/tests/vmtests/test_apt_source.py
diff options
authorChristian Ehrhardt <[email protected]>2016-05-31 11:55:27 +0000
committerChristian Ehrhardt <[email protected]>2016-05-31 11:55:27 +0000
commit7dfff554e49a90f47545ec75b72d793e30e4144e (patch)
tree7072a6dd5c8727acae09763473fa3041877c1cc3 /tests/vmtests/test_apt_source.py
parent5772191dea191d8409d2ab4e2100d0016c0b9c46 (diff)
improve docstrings to help the unit- & vm-test log being meaningful
bzr-revno: 389.7.46
Diffstat (limited to 'tests/vmtests/test_apt_source.py')
-rw-r--r--tests/vmtests/test_apt_source.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/vmtests/test_apt_source.py b/tests/vmtests/test_apt_source.py
index 4994a870..773288be 100644
--- a/tests/vmtests/test_apt_source.py
+++ b/tests/vmtests/test_apt_source.py
@@ -8,9 +8,7 @@ from .releases import base_vm_classes as relbase
class TestAptSrcAbs(VMBaseClass):
- """ TestAptSrcAbs
- Basic tests for apt_sources features of curtin
- """
+ "TestAptSrcAbs - Basic tests for apt_sources features of curtin"
interactive = False
# disk for early data collection at install stage
extra_disks = ['1G']
@@ -30,7 +28,7 @@ class TestAptSrcAbs(VMBaseClass):
secmirror = "http://security.ubuntu.com/ubuntu/"
def test_output_files_exist(self):
- "Check if all output files exist"
+ "test_output_files_exist - Check if all output files exist"
self.output_files_exist(
["fstab", "ignorecount", "keyid-F430BBA5", "keylongid-F470A0AC",
"keyraw-8280B242", "keyppa-03683F77", "aptconf", "sources.list",
@@ -39,7 +37,7 @@ class TestAptSrcAbs(VMBaseClass):
["smoser-ubuntu-ppa-%s.list" % self.release])
def test_keys_imported(self):
- "Check if all keys that should be imported are there"
+ "test_keys_imported - Check if all keys are imported correctly"
self.check_file_regex("keyid-F430BBA5",
r"Launchpad PPA for Ubuntu Screen Profile")
self.check_file_regex("keylongid-F470A0AC",
@@ -50,7 +48,7 @@ class TestAptSrcAbs(VMBaseClass):
r"Christian Ehrhardt")
def test_source_files(self):
- "Check if the generated source.list files have the right content"
+ "test_source_files - Check generated .list files for correct content"
# hard coded deb lines
self.check_file_strippedline("byobu-ppa.list",
("deb http://ppa.launchpad.net/byobu/"
@@ -68,20 +66,20 @@ class TestAptSrcAbs(VMBaseClass):
"ppa/ubuntu %s main" % self.release))
def test_ignore_count(self):
- "Check if the files that should not be generated are missing"
+ "test_ignore_count - Check for files that should not be created"
self.check_file_strippedline("ignorecount", "0")
def test_apt_conf(self):
- "Check if the selected apt conf arrived"
+ "test_apt_conf - Check if the selected apt conf was set"
self.check_file_strippedline("aptconf", 'Acquire::Retries "3";')
class TestAptSrcCustom(TestAptSrcAbs):
- "TestAptSrcNormal - tests valid in the normal case"
+ "TestAptSrcNormal - tests valid in the custom sources.list case"
conf_file = "examples/tests/apt_source_custom.yaml"
def test_custom_source_list(self):
- "Check for custom sources.list with release/mirror replacement"
+ "test_custom_source_list - Check custom sources.list with replacement"
self.check_file_strippedline("sources.list",
"deb %s %s main restricted" %
(self.mirror, self.release))
@@ -103,7 +101,7 @@ class TestAptSrcPreserve(TestAptSrcAbs):
conf_file = "examples/tests/apt_source_preserve.yaml"
def test_preserved_source_list(self):
- "Check for sources.list to be preserved as-is"
+ "test_preserved_source_list - Check sources.list to be preserved as-is"
self.check_file_regex("sources.list",
r"this file is written by cloud-init")
@@ -112,8 +110,8 @@ class TestAptSrcBuiltin(TestAptSrcAbs):
"TestAptSrcPreserve - tests valid for the builtin sources.list template"
conf_file = "examples/tests/apt_source_builtin.yaml"
- def test_preserved_source_list(self):
- "Check for builtin source list with release/mirror replacement"
+ def test_builtin_source_list(self):
+ "test_builtin_source_list - Check builtin source.list with replacement"
self.check_file_regex("sources.list",
r"this file is written by curtin")