Make launch_path mandatory for packaged apps (bug 874522)

This commit is contained in:
Matt Basta 2013-05-23 16:32:24 -07:00
Родитель fb3a7110ce
Коммит d052cff875
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -180,6 +180,9 @@ class WebappSpec(Spec):
# version.
sparse_nodes = copy.deepcopy(sparse_nodes)
if err.get_resource("packaged"):
self.SPEC["required_nodes"].append("launch_path")
# Allow the developer to avoid localizing their name.
del sparse_nodes["developer"]["required_nodes"]
sparse_nodes["developer"]["allowed_once_nodes"].append("name")

Просмотреть файл

@ -327,6 +327,13 @@ class TestWebapps(TestCase):
self.assert_failed(with_errors=True)
self.assert_got_errid(("spec", "webapp", "iaf_bad_mrkt_protocol", ))
def test_launch_path_packaged(self):
"""Test that the launch path is present in a packaged app."""
del self.data["launch_path"]
self.resources.append(('packaged', True))
self.analyze()
self.assert_failed(with_errors=True)
def test_launch_path_not_string(self):
"""Test that the launch path is a string."""
self.data["launch_path"] = [123]