Make launch_path mandatory for packaged apps (bug 874522)
This commit is contained in:
Родитель
fb3a7110ce
Коммит
d052cff875
|
@ -180,6 +180,9 @@ class WebappSpec(Spec):
|
||||||
# version.
|
# version.
|
||||||
sparse_nodes = copy.deepcopy(sparse_nodes)
|
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.
|
# Allow the developer to avoid localizing their name.
|
||||||
del sparse_nodes["developer"]["required_nodes"]
|
del sparse_nodes["developer"]["required_nodes"]
|
||||||
sparse_nodes["developer"]["allowed_once_nodes"].append("name")
|
sparse_nodes["developer"]["allowed_once_nodes"].append("name")
|
||||||
|
|
|
@ -327,6 +327,13 @@ class TestWebapps(TestCase):
|
||||||
self.assert_failed(with_errors=True)
|
self.assert_failed(with_errors=True)
|
||||||
self.assert_got_errid(("spec", "webapp", "iaf_bad_mrkt_protocol", ))
|
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):
|
def test_launch_path_not_string(self):
|
||||||
"""Test that the launch path is a string."""
|
"""Test that the launch path is a string."""
|
||||||
self.data["launch_path"] = [123]
|
self.data["launch_path"] = [123]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче