Migrate old state to new. #383

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

kyrofa commented Mar 21, 2016

This PR resolves LP: #1560158 by migrating the old state tracking mechanism seamlessly to use the new.

@kyrofa kyrofa closed this Mar 21, 2016

@kyrofa kyrofa reopened this Mar 21, 2016

snapcraft/tests/test_pluginhandler.py
+ for step in common.COMMAND_ORDER:
+ shutil.rmtree(common.get_partsdir())
+ with self.subTest('{} step'.format(step)):
+ part_name = 'foo'
@sergiusens

sergiusens Mar 21, 2016

Collaborator

just a very minor thing, this doesn't need to be nested in the context nor the loop

@kyrofa

kyrofa Mar 21, 2016

Member

Fixed.

snapcraft/tests/test_pluginhandler.py
@@ -301,6 +301,19 @@ def test_mark_done_clears_later_steps(self):
os.path.exists(handler._step_state_file(later_step)),
'Expected later step states to be cleared')
+ def test_state_file_migration(self):
+ for step in common.COMMAND_ORDER:
+ shutil.rmtree(common.get_partsdir())
@sergiusens

sergiusens Mar 21, 2016

Collaborator

Won't this fail on first run?

@kyrofa

kyrofa Mar 21, 2016

Member

No, it's created in the setUp().

Migrate old state to new.
LP: #1560158

Signed-off-by: Kyle Fazzari <kyle@canonical.com>

Coverage Status

Coverage remained the same at 95.38% when pulling a0cb335 on kyrofa:feature/1560158/migrate_state_tracking into 3cc0049 on ubuntu-core:master.

Collaborator

sergiusens commented Mar 21, 2016

Created PR #385 to rebase and land

@sergiusens sergiusens closed this Mar 21, 2016

@kyrofa kyrofa deleted the kyrofa:feature/1560158/migrate_state_tracking branch Apr 13, 2016

smoser pushed a commit to smoser/snapcraft that referenced this pull request Sep 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment