Merge lp:~sergiusens/snapcraft/validation into lp:~snappy-dev/snapcraft/core
| Status: | Merged |
|---|---|
| Approved by: | Leo Arias on 2015-08-27 |
| Approved revision: | 151 |
| Merged at revision: | 141 |
| Proposed branch: | lp:~sergiusens/snapcraft/validation |
| Merge into: | lp:~snappy-dev/snapcraft/core |
| Prerequisite: | lp:~sergiusens/snapcraft/meta-all-yaml |
| Diff against target: |
551 lines (+394/-9) 9 files modified
debian/control (+3/-1) integration-tests/data/local-plugin/snapcraft.yaml (+1/-0) schema/snapcraft.yaml (+89/-0) setup.py (+5/-2) snapcraft/common.py (+11/-0) snapcraft/dirs.py (+1/-0) snapcraft/tests/__init__.py (+1/-0) snapcraft/tests/test_yaml.py (+251/-6) snapcraft/yaml.py (+32/-0) |
| To merge this branch: | bzr merge lp:~sergiusens/snapcraft/validation |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| John Lenton | Approve on 2015-08-27 | ||
| Leo Arias | 2015-08-25 | Approve on 2015-08-27 | |
|
Review via email:
|
|||
Commit Message
Initial json schema support
Description of the Change
I'm just not sure where to add the tests here, so please advise during the review :-)
| Leo Arias (elopio) wrote : | # |
| Zygmunt Krynicki (zyga) wrote : | # |
One more comment below
| Leo Arias (elopio) wrote : | # |
This is great. I left some IMO comments. The only one I feel strong about is splitting the tests in scenarios or subtests.
| Sergio Schvezov (sergiusens) wrote : | # |
Hey you asked me for subtests a lot and I had them added explained as in the documentation you linked to ;-)
| Leo Arias (elopio) wrote : | # |
how did I not see the subtests??? Sorry about that.
So the only thing that's missing is bumping the dependency to python3 (>= 3.4),
| Leo Arias (elopio) wrote : | # |
Once this lands, the guys from erle and spreed have to be notified about the new format, right?
| Snappy Tarmac (snappydevtarmac) wrote : | # |
The attempt to merge lp:~sergiusens/snapcraft/validation into lp:snapcraft failed. Below is the output from the failed tests.
wget -c http://
cp --preserve=all -R zzz /tmp/tmpo5btu74
cp --preserve=all -R src /tmp/tmpyoazun5
cp --preserve=all -R src /tmp/tmprwukoxq
.......
Connecting to 0.0.0.0:39937... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22 [text/html]
Saving to: ‘test.tar’
0K 100% 4.74M=0s
2015-08-27 19:50:49 (4.74 MB/s) - ‘test.tar’ saved [22/22]
.E.....
.............E
=======
ERROR: snapcraft.
-------
Traceback (most recent call last):
File "/usr/lib/
yield
File "/usr/lib/
testMethod()
File "/usr/lib/
raise exception
ImportError: Failed to import test module: snapcraft.
Traceback (most recent call last):
File "/usr/lib/
module = self._get_
File "/usr/lib/
__import_
File "/tmp/tarmac/
from snapcraft import (
File "/tmp/tarmac/
import snapcraft.yaml
File "/tmp/tarmac/
import jsonschema
ImportError: No module named 'jsonschema'
=======
ERROR: snapcraft.
-------
Traceback (most recent call last):
File "/usr/lib/
yield
File "/usr/lib/
testMethod()
File "/usr/lib/
raise exception
ImportError: Failed to import test module: snapcraft.
Traceback (most recent call last):
File "/usr/lib/
module = self._get_
File "/usr/lib/
__import_
File "/tmp/tarmac/
import jsonschema
ImportError: No module named 'jsonschema'
-------
Ran 44 tests in 1.155s
FAILED (errors=2)
| Sergio Schvezov (sergiusens) wrote : | # |
On Thu, Aug 27, 2015 at 4:47 PM, Leo Arias <email address hidden> wrote:
> Once this lands, the guys from erle and spreed have to be notified about
> the new format, right?
I've disabled daily builds for now


To test, I think you should encapsulate your additions to the Config.__init__ in a validate method. Then we can pass valid and invalid yamls to it.
Some comments in the diff.