Merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fixture_unset_env into lp:ubuntu-ui-toolkit/staging
| Status: | Merged |
|---|---|
| Approved by: | Christian Dywan on 2015-07-06 |
| Approved revision: | 1517 |
| Merged at revision: | 1548 |
| Proposed branch: | lp:~canonical-platform-qa/ubuntu-ui-toolkit/fixture_unset_env |
| Merge into: | lp:ubuntu-ui-toolkit/staging |
| Diff against target: |
264 lines (+87/-144) 2 files modified
tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+6/-2) tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py (+81/-142) |
| To merge this branch: | bzr merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/fixture_unset_env |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Approve on 2015-07-06 | |
| Zoltan Balogh (community) | 2015-05-12 | Approve on 2015-06-30 | |
| Vincent Ladeuil (community) | 2015-05-12 | Approve on 2015-05-15 | |
|
Review via email:
|
|||
Commit Message
In the initctl test fixture, add the option to unset an environment variable.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1509
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Leo Arias (elopio) wrote : | # |
I've pushed an updated version. Thanks!
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1510
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Vincent Ladeuil (vila) wrote : | # |
Scenarios keys, while descriptive, should stay short, see inline comment.
On the overall, and I realize this MP doesn't introduce the issue, the scenarios look far too complex.
https:/
May be I'm missing something about what is tested in this MP but the difference between the two is worth discussing.
| Leo Arias (elopio) wrote : | # |
Yes, I didn't like to write this test. I have an idea that might make it better. Back to work in progress.
| Leo Arias (elopio) wrote : | # |
Back to needs review. Please take another look vila.
| Vincent Ladeuil (vila) wrote : | # |
Far better !
There is still a lot of duplicated code in the tests that should either go to setUp or specific helpers, mostly around defining and running the inner test and check it was successful but the test setup itself could benefit from a helper to highlight the test specifics more clearly (setting or unsetting the env var IIRC).
I tried to find how to run the tests locally before doing that refactoring myself but get lost >-/ Can you help ?
Overall it's already pretty clear so you can land as is but I think that can be made crystal clear without too much effort.
| Leo Arias (elopio) wrote : | # |
Yes, you don't need to do much as this is only python:
bzr branch lp:~canonical-platform-qa/ubuntu-ui-toolkit/fixture_unset_env
cd fixture_
autopilot3 run ubuntuuitoolkit
I want crystal clear, so please show me the refactorings you have in mind if you have some time.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1511
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Vincent Ladeuil (vila) wrote : | # |
@Leo: I've pushed the refactoring I was talking about, feel free to revisit.
The resulting diff is not that clear so looking at the branch history may be easier to understand how I got there.
The end result really focus on what the tests do, pushing down (and sharing !) the implementation details into the helpers.
The tests now can ignore that 'testenvvarforf
This also ensures that all the tests share the details on how they test without the risk of divergence if the tests are modified later.
Funnily enough, this refactoring revealed that one addCleanup() call was useless (see history).
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1517
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Leo Arias (elopio) wrote : | # |
Wow, 3 lines and 4 lines. Thanks Vila!

FAILED: Continuous integration, rev:1508 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1758/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 2749/console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-amd64- ci/486/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-armhf- ci/488/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-i386- ci/485/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 2747/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1758/ rebuild
http://