Implement `snapcraft update` for parts #588

Merged
merged 6 commits into from Jun 23, 2016

Conversation

Projects
None yet
3 participants
Collaborator

sergiusens commented Jun 21, 2016

LP: #1594643

Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com

+class _Base:
+
+ def __init__(self):
+ self.parts_dir = os.path.join(BaseDirectory.xdg_data_home, 'snapcraft')
@josepht

josepht Jun 21, 2016

Contributor

Is it possible to have this logic in a single place? Same for "parts.yaml" and "headers.yaml".

@sergiusens

sergiusens Jun 21, 2016

Collaborator

If the duplication is only in the tests I actually prefer that as we would detect the change

Contributor

josepht commented Jun 21, 2016

Looks good to me.

sergiusens added some commits Jun 21, 2016

Implement `snapcraft update` for parts
LP: #1594643

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Collaborator

sergiusens commented Jun 22, 2016

retest this please

sergiusens added some commits Jun 23, 2016

Member

elopio commented Jun 23, 2016

integration tests are failing:

ERROR: test_curl_exists (test_parts.PartsTestCase)

test_parts.PartsTestCase.test_curl_exists

testtools.testresult.real._StringException: Traceback (most recent call last):
File "/tmp/adt-run.4uGBaN/build.j9u/real-tree/integration_tests/test_parts.py", line 44, in test_curl_exists
with open(self.parts_yaml) as parts_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/share/snapcraft/parts.yaml'

FAIL: test_update (test_parts.PartsTestCase)

test_parts.PartsTestCase.test_update

testtools.testresult.real._StringException: Traceback (most recent call last):
File "/tmp/adt-run.4uGBaN/build.j9u/real-tree/integration_tests/test_parts.py", line 37, in test_update
self.assertTrue(os.path.exists(self.parts_yaml))
File "/usr/lib/python3/dist-packages/unittest2/case.py", line 702, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true

Collaborator

sergiusens commented Jun 23, 2016

@elopio yeah, fix it fast, the environment mocking logic was different than in unit tests and was passing locally here as I do have a real cache enabled already

@sergiusens sergiusens merged commit b234942 into snapcore:master Jun 23, 2016

4 checks passed

Examples tests Success
Details
autopkgtest Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.09%) to 96.034%
Details

@sergiusens sergiusens deleted the sergiusens:feature/1594643/snapcraft-update branch Jun 23, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Implement `snapcraft update` for parts (#588)
LP: #1594643

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment