Merge lp://qastaging/~sil2100/ubuntu-system-image/server_script_testability into lp://qastaging/ubuntu-system-image/server

Proposed by Łukasz Zemczak
Status: Needs review
Proposed branch: lp://qastaging/~sil2100/ubuntu-system-image/server_script_testability
Merge into: lp://qastaging/ubuntu-system-image/server
Diff against target: 2040 lines (+1340/-531)
12 files modified
bin/copy-image (+11/-277)
bin/set-phased-percentage (+8/-72)
bin/tag-image (+4/-178)
lib/systemimage/script.py (+269/-0)
lib/systemimage/scripts/script_copy_image.py (+187/-0)
lib/systemimage/scripts/script_set_phased_percentage.py (+83/-0)
lib/systemimage/scripts/script_tag_image.py (+127/-0)
lib/systemimage/tests/test_scripts.py (+590/-0)
lib/systemimage/tests/test_tools.py (+41/-0)
lib/systemimage/tests/test_tree.py (+1/-1)
lib/systemimage/tools.py (+15/-0)
lib/systemimage/tree.py (+4/-3)
To merge this branch: bzr merge lp://qastaging/~sil2100/ubuntu-system-image/server_script_testability
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+285041@code.qastaging.launchpad.net

Commit message

Make scripts implemented as part of a Script class, making them more easily testable. Add some basic tests for the first two migrated - copy-image and tag-image.

Description of the change

The general script-testability branch. It's something I'm working on part-time between all other things - so far only two scripts are being migrated. Submitting for early review.

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I wouldn't land this right now even without writing more tests, but I'd like to gather some feedback in the meantime when I'm busy with other duties.

Revision history for this message
Barry Warsaw (barry) wrote :

In general I really like the direction you're going in with this. More tests == better!

review: Approve
287. By Łukasz Zemczak

Add test for the script execute for tag-image. Fix a bug in setting the phased percentage after tagging (detected thanks to the unit test).

288. By Łukasz Zemczak

Add more tests for scripts.

289. By Łukasz Zemczak

Move the script classes to a separate script directory. Update copyright.

290. By Łukasz Zemczak

Fix script tests. Port the phased percentage script to the new framework, add tests.

291. By Łukasz Zemczak

Actually use the new script in the bin/ script of phased percentage.

292. By Łukasz Zemczak

Merge trunk.

293. By Łukasz Zemczak

Backport the new per-device redirect checks to scripts, add tests for those cases. Fix a few existing test failures.

294. By Łukasz Zemczak

pep8 fixes.

Unmerged revisions

294. By Łukasz Zemczak

pep8 fixes.

293. By Łukasz Zemczak

Backport the new per-device redirect checks to scripts, add tests for those cases. Fix a few existing test failures.

292. By Łukasz Zemczak

Merge trunk.

291. By Łukasz Zemczak

Actually use the new script in the bin/ script of phased percentage.

290. By Łukasz Zemczak

Fix script tests. Port the phased percentage script to the new framework, add tests.

289. By Łukasz Zemczak

Move the script classes to a separate script directory. Update copyright.

288. By Łukasz Zemczak

Add more tests for scripts.

287. By Łukasz Zemczak

Add test for the script execute for tag-image. Fix a bug in setting the phased percentage after tagging (detected thanks to the unit test).

286. By Łukasz Zemczak

PEP8 fixes to scripts.py.

285. By Łukasz Zemczak

Add arg parsing tests for the tag script as well. Do some PEP8 syntax fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches