Merge lp:~sergiusens/snapcraft/mapnames into lp:~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 185
Merged at revision: 185
Proposed branch: lp:~sergiusens/snapcraft/mapnames
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 517 lines (+97/-142)
15 files modified
examples/downloader-with-wiki-parts/snapcraft.yaml (+2/-1)
examples/godd/snapcraft.yaml (+2/-1)
examples/gopaste/snapcraft.yaml (+1/-1)
examples/java-hello-world/snapcraft.yaml (+1/-1)
examples/libpipeline/snapcraft.yaml (+2/-1)
examples/py2-project/snapcraft.yaml (+2/-1)
examples/py3-project/snapcraft.yaml (+2/-1)
examples/qmldemo/snapcraft.yaml (+1/-1)
examples/tomcat-maven-webapp/snapcraft.yaml (+1/-1)
examples/webcam-webui/snapcraft.yaml (+1/-1)
integration-tests/data/assemble/snapcraft.yaml (+5/-5)
schema/snapcraft.yaml (+13/-16)
snapcraft/meta.py (+22/-16)
snapcraft/tests/test_meta.py (+24/-66)
snapcraft/tests/test_yaml.py (+18/-29)
To merge this branch: bzr merge lp:~sergiusens/snapcraft/mapnames
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Daniel Holbach Pending
Michael Vogt Pending
Review via email: mp+271799@code.launchpad.net

This proposal supersedes a proposal from 2015-09-21.

Commit message

Using a map instead of list for binaries and services as defined by the spec

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

Looks good.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote : Posted in a previous version of this proposal

Looks good.

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote : Posted in a previous version of this proposal

More than one proposal found for merge of https://code.launchpad.net/~sergiusens/snapcraft/config into https://code.launchpad.net/~snappy-dev/snapcraft/core, which is not Superseded.

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote : Posted in a previous version of this proposal

More than one proposal found for merge of https://code.launchpad.net/~sergiusens/snapcraft/config into https://code.launchpad.net/~snappy-dev/snapcraft/core, which is not Superseded.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I resubmitted to get rid of the tarmac issue

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/downloader-with-wiki-parts/snapcraft.yaml'
--- examples/downloader-with-wiki-parts/snapcraft.yaml 2015-09-15 15:20:24 +0000
+++ examples/downloader-with-wiki-parts/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -5,7 +5,8 @@
5description: this is an example package5description: this is an example package
6icon: icon.png6icon: icon.png
7binaries:7binaries:
8 - name: bin/test8 test:
9 exec: bin/test
910
10parts:11parts:
11 main:12 main:
1213
=== modified file 'examples/godd/snapcraft.yaml'
--- examples/godd/snapcraft.yaml 2015-09-18 14:53:03 +0000
+++ examples/godd/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,8 @@
2version: 1.02version: 1.0
3vendor: Michael Vogt <mvo@ubuntu.com>3vendor: Michael Vogt <mvo@ubuntu.com>
4binaries:4binaries:
5 - name: ./bin/godd5 godd:
6 exec: ./bin/godd
6summary: Simple dd like tool7summary: Simple dd like tool
7description: written in go so it is self contained and really portable, you would need to use hw-assign to access devices.8description: written in go so it is self contained and really portable, you would need to use hw-assign to access devices.
8icon: icon.png9icon: icon.png
910
=== modified file 'examples/gopaste/snapcraft.yaml'
--- examples/gopaste/snapcraft.yaml 2015-09-08 21:06:47 +0000
+++ examples/gopaste/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,7 @@
2version: 1.02version: 1.0
3vendor: Michael Terry <mterry@ubuntu.com>3vendor: Michael Terry <mterry@ubuntu.com>
4services:4services:
5 - name: gopaste5 gopaste:
6 description: "gopaste"6 description: "gopaste"
7 start: bin/gopasted7 start: bin/gopasted
8summary: Simple pasting tool8summary: Simple pasting tool
99
=== modified file 'examples/java-hello-world/snapcraft.yaml'
--- examples/java-hello-world/snapcraft.yaml 2015-09-15 09:43:13 +0000
+++ examples/java-hello-world/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,7 @@
2version: 02version: 0
3vendor: Michael Terry <mterry@ubuntu.com>3vendor: Michael Terry <mterry@ubuntu.com>
4binaries:4binaries:
5 - name: hello5 hello:
6 exec: bin/wrapper6 exec: bin/wrapper
7summary: A java example7summary: A java example
8description: this is not much more than an example8description: this is not much more than an example
99
=== modified file 'examples/libpipeline/snapcraft.yaml'
--- examples/libpipeline/snapcraft.yaml 2015-09-08 11:48:30 +0000
+++ examples/libpipeline/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,8 @@
2version: 1.02version: 1.0
3vendor: Mike Terry <mterry@ubuntu.com>3vendor: Mike Terry <mterry@ubuntu.com>
4binaries:4binaries:
5 - name: ./bin/pipelinetest5 pipelinetest:
6 exec: ./bin/pipelinetest
6summary: Libpipeline example7summary: Libpipeline example
7description: this is an example package of an autotools project built with snapcraft using8description: this is an example package of an autotools project built with snapcraft using
8icon: icon.png9icon: icon.png
910
=== modified file 'examples/py2-project/snapcraft.yaml'
--- examples/py2-project/snapcraft.yaml 2015-09-08 11:48:30 +0000
+++ examples/py2-project/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,8 @@
2version: 02version: 0
3vendor: Michael Vogt <michael.vogt@ubuntu.com>3vendor: Michael Vogt <michael.vogt@ubuntu.com>
4binaries:4binaries:
5 - name: ./bin/sha3sum5 sha3sum:
6 exec: ./bin/sha3sum
6summary: A python sha3 implementation7summary: A python sha3 implementation
7description: A python2 project using snapcraft8description: A python2 project using snapcraft
8icon: icon.png9icon: icon.png
910
=== modified file 'examples/py3-project/snapcraft.yaml'
--- examples/py3-project/snapcraft.yaml 2015-09-08 11:48:30 +0000
+++ examples/py3-project/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -2,7 +2,8 @@
2version: 02version: 0
3vendor: Michael Vogt <michael.vogt@ubuntu.com>3vendor: Michael Vogt <michael.vogt@ubuntu.com>
4binaries:4binaries:
5 - name: bin/sha3sum5 sha3sum:
6 exec: bin/sha3sum
6summary: A python sha3 implementation7summary: A python sha3 implementation
7description: A python2 project using snapcraft8description: A python2 project using snapcraft
8icon: icon.png9icon: icon.png
910
=== modified file 'examples/qmldemo/snapcraft.yaml'
--- examples/qmldemo/snapcraft.yaml 2015-09-08 11:50:21 +0000
+++ examples/qmldemo/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -4,7 +4,7 @@
4frameworks:4frameworks:
5 - mir5 - mir
6binaries:6binaries:
7 - name: qmldemo7 qmldemo:
8 exec: qmlscene demo.qml --8 exec: qmlscene demo.qml --
9 caps:9 caps:
10 - mir_client10 - mir_client
1111
=== modified file 'examples/tomcat-maven-webapp/snapcraft.yaml'
--- examples/tomcat-maven-webapp/snapcraft.yaml 2015-09-08 11:50:21 +0000
+++ examples/tomcat-maven-webapp/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -4,7 +4,7 @@
4architectures:4architectures:
5 - amd645 - amd64
6services:6services:
7 - name: tomcat7 tomcat:
8 start: bin/wrapper8 start: bin/wrapper
9 caps:9 caps:
10 - networking10 - networking
1111
=== modified file 'examples/webcam-webui/snapcraft.yaml'
--- examples/webcam-webui/snapcraft.yaml 2015-09-20 14:34:08 +0000
+++ examples/webcam-webui/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -5,7 +5,7 @@
5description: Exposes your webcam over a web UI5description: Exposes your webcam over a web UI
6icon: icon.png6icon: icon.png
7services:7services:
8 - name: webcam-webui8 webcam-webui:
9 start: bin/webcam-webui9 start: bin/webcam-webui
10config: usr/bin/config.py10config: usr/bin/config.py
1111
1212
=== modified file 'integration-tests/data/assemble/snapcraft.yaml'
--- integration-tests/data/assemble/snapcraft.yaml 2015-09-01 19:04:49 +0000
+++ integration-tests/data/assemble/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -5,12 +5,12 @@
5description: a longer description5description: a longer description
6icon: icon.png6icon: icon.png
7binaries:7binaries:
8 - exec: binary18 assemble-bin:
9 name: assemble-bin9 exec: binary1
10 - exec: subdir/binary210 binary2:
11 name: binary211 exec: subdir/binary2
12services:12services:
13 - name: assemble-service13 assemble-service:
14 start: service-start14 start: service-start
15 stop: service-stop with args15 stop: service-stop with args
1616
1717
=== modified file 'schema/snapcraft.yaml'
--- schema/snapcraft.yaml 2015-09-16 19:31:05 +0000
+++ schema/snapcraft.yaml 2015-09-21 11:41:30 +0000
@@ -56,16 +56,14 @@
56 type: string56 type: string
57 description: path to a configure hook to expose configuration for the package57 description: path to a configure hook to expose configuration for the package
58 services:58 services:
59 type: array59 type: object
60 items:60 additionalProperties: false
61 - type: object61 patternProperties:
62 "^[A-Za-z0-9:-]*$":
63 type: object
62 required:64 required:
63 - name
64 - start65 - start
65 properties:66 properties:
66 name:
67 type: string
68 pattern: "^[A-Za-z0-9/.:-]*$"
69 start:67 start:
70 type: string68 type: string
71 description: command executed to start the service69 description: command executed to start the service
@@ -77,18 +75,17 @@
77 security-override:75 security-override:
78 $ref: "#definitions/security"76 $ref: "#definitions/security"
79 binaries:77 binaries:
80 type: array78 type: object
81 items:79 additionalProperties: false
82 - type: object80 patternProperties:
81 "^[A-Za-z0-9:-]*$":
82 type: object
83 required:83 required:
84 - name84 - exec
85 properties:85 properties:
86 name:
87 type: string
88 pattern: "^[A-Za-z0-9/.:-]*$"
89 exec:86 exec:
90 type: string87 type: string
91 description: command executed to start the service88 description: command executed to run the binary
92 security-policy:89 security-policy:
93 $ref: "#definitions/security"90 $ref: "#definitions/security"
94 security-override:91 security-override:
@@ -96,6 +93,7 @@
96 parts:93 parts:
97 type: object94 type: object
98 minProperties: 195 minProperties: 1
96 additionalProperties: false
99 patternProperties:97 patternProperties:
100 ^[a-z0-9][a-z0-9+-]*$:98 ^[a-z0-9][a-z0-9+-]*$:
101 type: object99 type: object
@@ -116,7 +114,6 @@
116 # required:114 # required:
117 # - plugin115 # - plugin
118 # - source116 # - source
119 addtionalProperties: false
120required:117required:
121 - name118 - name
122 - version119 - version
123120
=== modified file 'snapcraft/meta.py'
--- snapcraft/meta.py 2015-09-16 19:31:05 +0000
+++ snapcraft/meta.py 2015-09-21 11:41:30 +0000
@@ -130,16 +130,26 @@
130 package_yaml['architectures'] = arches130 package_yaml['architectures'] = arches
131131
132 if 'binaries' in config_data:132 if 'binaries' in config_data:
133 package_yaml['binaries'] = _wrap_binaries(config_data['binaries'])133 binaries = config_data['binaries']
134 package_yaml['binaries'] = _copy_security_profiles(meta_dir, config_data['binaries'])134 binaries = _wrap_binaries(binaries)
135 package_yaml['binaries'] = _copy_security_profiles(meta_dir, _repack_names(binaries))
135136
136 if 'services' in config_data:137 if 'services' in config_data:
137 package_yaml['services'] = _wrap_services(config_data['services'])138 services = config_data['services']
138 package_yaml['services'] = _copy_security_profiles(meta_dir, config_data['services'])139 services = _wrap_services(services)
140 package_yaml['services'] = _copy_security_profiles(meta_dir, _repack_names(services))
139141
140 return package_yaml142 return package_yaml
141143
142144
145def _repack_names(names):
146 repack = []
147 for name in names:
148 names[name].update({'name': name})
149 repack.append(names[name])
150 return repack
151
152
143def _compose_readme(config_data):153def _compose_readme(config_data):
144 return '{config[summary]}\n{config[description]}\n'.format(config=config_data)154 return '{config[summary]}\n{config[description]}\n'.format(config=config_data)
145155
@@ -199,29 +209,25 @@
199209
200210
201def _wrap_binaries(binaries):211def _wrap_binaries(binaries):
202 for binary in binaries:212 for name in binaries:
203 execparts = shlex.split(binary.get('exec', binary['name']))213 execparts = shlex.split(binaries[name]['exec'])
204 execwrap = _wrap_exe(execparts[0])214 execwrap = _wrap_exe(execparts[0])
205 if 'exec' in binary:215 binaries[name]['exec'] = _replace_cmd(execparts, execwrap)
206 binary['exec'] = _replace_cmd(execparts, execwrap)
207 else:
208 binary['name'] = os.path.basename(binary['name'])
209 binary['exec'] = _replace_cmd(execparts, execwrap)
210216
211 return binaries217 return binaries
212218
213219
214def _wrap_services(services):220def _wrap_services(services):
215 for binary in services:221 for name in services:
216 startpath = binary.get('start')222 startpath = services[name].get('start')
217 if startpath:223 if startpath:
218 startparts = shlex.split(startpath)224 startparts = shlex.split(startpath)
219 startwrap = _wrap_exe(startparts[0])225 startwrap = _wrap_exe(startparts[0])
220 binary['start'] = _replace_cmd(startparts, startwrap)226 services[name]['start'] = _replace_cmd(startparts, startwrap)
221 stoppath = binary.get('stop')227 stoppath = services[name].get('stop')
222 if stoppath:228 if stoppath:
223 stopparts = shlex.split(stoppath)229 stopparts = shlex.split(stoppath)
224 stopwrap = _wrap_exe(stopparts[0])230 stopwrap = _wrap_exe(stopparts[0])
225 binary['stop'] = _replace_cmd(stopparts, stopwrap)231 services[name]['stop'] = _replace_cmd(stopparts, stopwrap)
226232
227 return services233 return services
228234
=== modified file 'snapcraft/tests/test_meta.py'
--- snapcraft/tests/test_meta.py 2015-09-16 19:31:05 +0000
+++ snapcraft/tests/test_meta.py 2015-09-21 11:41:30 +0000
@@ -69,79 +69,38 @@
69 self.assertEqual(y, expected)69 self.assertEqual(y, expected)
7070
71 def test_with_binaries(self):71 def test_with_binaries(self):
72 self.config_data['binaries'] = [72 self.config_data['binaries'] = {
73 {73 'binary1': {'exec': 'binary1.sh go'},
74 'name': 'binary1',74 'binary2': {'exec': 'binary2.sh'},
75 'exec': 'binary1.sh go',75 }
76 },
77 {
78 'name': 'binary2',
79 },
80 ]
8176
82 y = meta._compose_package_yaml('meta', self.config_data, ['armhf', 'amd64'])77 y = meta._compose_package_yaml('meta', self.config_data, ['armhf', 'amd64'])
8378
84 expected = {79 self.assertEqual(len(y['binaries']), 2)
85 'name': 'my-package',80 for b in y['binaries']:
86 'version': '1.0',81 if b['name'] is 'binary1':
87 'vendor': 'Sergio Schvezov <sergio.schvezov@canonical.com>',82 self.assertEqual(b['exec'], 'binary.wrapped go')
88 'icon': 'my-icon.png',83 else:
89 'architectures': ['armhf', 'amd64'],84 self.assertEqual(b['exec'], 'binary.wrapped')
90 'binaries': [
91 {
92 'name': 'binary1',
93 'exec': 'binary.wrapped go',
94 },
95 {
96 'name': 'binary2',
97 'exec': 'binary.wrapped',
98 },
99 ],
100 }
101
102 self.assertEqual(y, expected)
10385
104 def test_with_services(self):86 def test_with_services(self):
105 self.config_data['services'] = [87 self.config_data['services'] = {
106 {88 'service1': {'start': 'binary1'},
107 'name': 'service1',89 'service2': {
108 'start': 'binary1',
109 },
110 {
111 'name': 'service2',
112 'start': 'binary2 --start',90 'start': 'binary2 --start',
113 'stop': 'binary2 --stop',91 'stop': 'binary2 --stop',
114 },92 },
115 {93 }
116 'name': 'service3',
117 },
118 ]
11994
120 y = meta._compose_package_yaml('meta', self.config_data, ['armhf', 'amd64'])95 y = meta._compose_package_yaml('meta', self.config_data, ['armhf', 'amd64'])
12196
122 expected = {97 self.assertEqual(len(y['services']), 2)
123 'name': 'my-package',98 for b in y['services']:
124 'version': '1.0',99 if b['name'] is 'service1':
125 'vendor': 'Sergio Schvezov <sergio.schvezov@canonical.com>',100 self.assertEqual(b['start'], 'binary.wrapped')
126 'icon': 'my-icon.png',101 else:
127 'architectures': ['armhf', 'amd64'],102 self.assertEqual(b['start'], 'binary.wrapped --start')
128 'services': [103 self.assertEqual(b['stop'], 'binary.wrapped --stop')
129 {
130 'name': 'service1',
131 'start': 'binary.wrapped',
132 },
133 {
134 'name': 'service2',
135 'start': 'binary.wrapped --start',
136 'stop': 'binary.wrapped --stop',
137 },
138 {
139 'name': 'service3',
140 }
141 ],
142 }
143
144 self.assertEqual(y, expected)
145104
146 def test_plain_no_binaries_or_services_with_optionals(self):105 def test_plain_no_binaries_or_services_with_optionals(self):
147 self.config_data['frameworks'] = ['mir', ]106 self.config_data['frameworks'] = ['mir', ]
@@ -200,16 +159,15 @@
200 'summary': 'my summary',159 'summary': 'my summary',
201 'icon': 'my-icon.png',160 'icon': 'my-icon.png',
202 'config': 'bin/config',161 'config': 'bin/config',
203 'binaries': [162 'binaries': {
204 {163 'bash': {
205 'name': 'bash',
206 'exec': 'bin/bash',164 'exec': 'bin/bash',
207 'security-policy': {165 'security-policy': {
208 'apparmor': 'file.apparmor',166 'apparmor': 'file.apparmor',
209 'seccomp': 'file.seccomp',167 'seccomp': 'file.seccomp',
210 },168 },
211 }169 }
212 ]170 }
213 }171 }
214172
215 self.meta_dir = os.path.join(os.path.abspath(os.curdir), 'snap', 'meta')173 self.meta_dir = os.path.join(os.path.abspath(os.curdir), 'snap', 'meta')
216174
=== modified file 'snapcraft/tests/test_yaml.py'
--- snapcraft/tests/test_yaml.py 2015-09-15 14:45:57 +0000
+++ snapcraft/tests/test_yaml.py 2015-09-21 11:41:30 +0000
@@ -369,72 +369,61 @@
369 self.assertEqual(raised.exception.message, expected_message, msg=data)369 self.assertEqual(raised.exception.message, expected_message, msg=data)
370370
371 def test_valid_services(self):371 def test_valid_services(self):
372 self.data['services'] = [372 self.data['services'] = {
373 {373 'service1': {'start': 'binary1 start'},
374 'name': 'service1',374 'service2': {
375 'start': 'binary1 start',
376 },
377 {
378 'name': 'service2',
379 'start': 'binary2',375 'start': 'binary2',
380 'stop': 'binary2 --stop',376 'stop': 'binary2 --stop',
381 },377 },
382 {378 }
383 'name': 'service3',
384 }
385 ]
386379
387 snapcraft.yaml._validate_snapcraft_yaml(self.data)380 snapcraft.yaml._validate_snapcraft_yaml(self.data)
388381
389 def test_invalid_binary_names(self):382 def test_invalid_binary_names(self):
390 invalid_names = {383 invalid_names = {
391 '#': {'name': 'qwe#rty', 'exec': '1'},384 'qwe#rty': {'exec': '1'},
392 '_': {'name': 'qwe_rty', 'exec': '1'},385 'qwe_rty': {'exec': '1'},
393 'space': {'name': 'qwe rty', 'exec': '1'},386 'que rty': {'exec': '1'},
394 'spaces': {'name': 'qwe rty', 'exec': '1'},387 'que rty': {'exec': '1'},
395 }388 }
396389
397 for t in invalid_names:390 for t in invalid_names:
398 data = self.data.copy()391 data = self.data.copy()
399 with self.subTest(key=t):392 with self.subTest(key=t):
400 data['binaries'] = [invalid_names[t]]393 data['binaries'] = {t: invalid_names[t]}
401394
402 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:395 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
403 snapcraft.yaml._validate_snapcraft_yaml(data)396 snapcraft.yaml._validate_snapcraft_yaml(data)
404397
405 expected_message = '\'{}\' does not match \'^[A-Za-z0-9/.:-]*$\''.format(invalid_names[t]['name'])398 expected_message = 'Additional properties are not allowed (\'{}\' was unexpected)'.format(t)
406 self.assertEqual(raised.exception.message, expected_message, msg=data)399 self.assertEqual(raised.exception.message, expected_message, msg=data)
407400
408 def test_invalid_service_names(self):401 def test_invalid_service_names(self):
409 invalid_names = {402 invalid_names = {
410 '#': {'name': 'qwe#rty', 'start': '1'},403 'qwe#rty': {'start': '1'},
411 '_': {'name': 'qwe_rty', 'start': '1'},404 'qwe_rty': {'start': '1'},
412 'space': {'name': 'qwe rty', 'start': '1'},405 'que_rty': {'start': '1'},
413 'spaces': {'name': 'qwe rty', 'start': '1'},406 'quer ty': {'start': '1'},
414 }407 }
415408
416 for t in invalid_names:409 for t in invalid_names:
417 data = self.data.copy()410 data = self.data.copy()
418 with self.subTest(key=t):411 with self.subTest(key=t):
419 data['services'] = [invalid_names[t]]412 data['services'] = {t: invalid_names[t]}
420413
421 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:414 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
422 snapcraft.yaml._validate_snapcraft_yaml(data)415 snapcraft.yaml._validate_snapcraft_yaml(data)
423416
424 expected_message = '\'{}\' does not match \'^[A-Za-z0-9/.:-]*$\''.format(invalid_names[t]['name'])417 expected_message = 'Additional properties are not allowed (\'{}\' was unexpected)'.format(t)
425 self.assertEqual(raised.exception.message, expected_message, msg=data)418 self.assertEqual(raised.exception.message, expected_message, msg=data)
426419
427 def test_services_required_properties(self):420 def test_services_required_properties(self):
428 self.data['services'] = [421 self.data['services'] = {'service1': {}}
429 {
430 'start': 'binary1 start',
431 }
432 ]
433422
434 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:423 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
435 snapcraft.yaml._validate_snapcraft_yaml(self.data)424 snapcraft.yaml._validate_snapcraft_yaml(self.data)
436425
437 expected_message = '\'name\' is a required property'426 expected_message = '\'start\' is a required property'
438 self.assertEqual(raised.exception.message, expected_message, msg=self.data)427 self.assertEqual(raised.exception.message, expected_message, msg=self.data)
439428
440 def test_schema_file_not_found(self):429 def test_schema_file_not_found(self):

Subscribers

People subscribed via source and target branches