Merge lp://staging/~fwereade/juju-core/strawman-state-test-simplification into lp://staging/~juju/juju-core/trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~fwereade/juju-core/strawman-state-test-simplification |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
897 lines (+306/-361) 4 files modified
state/assign_test.go (+203/-353) state/conn_test.go (+92/-0) state/life_test.go (+1/-1) state/unit.go (+10/-7) |
To merge this branch: | bzr merge lp://staging/~fwereade/juju-core/strawman-state-test-simplification |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+138465@code.staging.launchpad.net |
Description of the change
state: more expressive testing proposal
This shouldn't go in on its own -- I should fix up the rest of the state
tests before I merge it (and I don't want to fix machine_test until we've
dropped the orgiginal WatchPrincipalUnits implementation) but I think that
AssignSuite was a good enough test bed to evaluate the sanity of this
approach.
In particular, I found that even a few lines saved here and there made it
much easier to follow the tests, and to notice both redundant tests and
missing ones; and that in some cases a *lot* of lines were saved.
I'm not sure AssignSuite uses all the new ConnSuite features yet (they were
originally written against machine_test, but then I got demoralised) but I'm
pretty sure that they will be useful; if not, of course, I'll trash them.
Unmerged revisions
- 768. By William Reade
-
tighten up AssignSuite using new additions to ConnSuite
- 767. By Ian Booth
-
Add more OpenStack provider implementation
This branch starts with the initial stub OpenStack provider and fleshes out more infrastructure and code. Initial impementations of Environ methods
Instances() and AllInstances() are done, as well as a bunch more boilerplate to glue in the provider config etc.The relevant goose library APIs are used to access a live Canonistack instance. For the purpose of the live tests, test server instances are create and destroyed. At the
moment, a knowm image is used to create the servers.There is at least one limitation in the underlying goose nova client which needs to be addressed - the ability to filter the results returned by ListServers(). This
is required to exclude deleted and other irrelevant servers from AllInstances() but there is no support yet for this in goose.I've also restructured the initial tests to hook into the juju test infrastructure so that the standard juju tests are run with this OpenStack provider. Of course,
they currently fail but will pass as soon as all of the provider methods are done. I've also included individual tests for each implemented API in the provider's
live test module. These compliment the juju tests which in this case appear more integration rather than unit focussed.R=niemeyer
CC=
https://codereview. appspot. com/6874049 - 766. By Dave Cheney
-
version: set development version to 1.9.4
- 765. By Dave Cheney
-
environs/ec2: specify public-
bucket- region Fixes LP #1083017
Our public bucket, juju-dist, lives in the us-east-1 region and can only be accessed via that endpoint. If you attempt to do so via another endpoint you get an unhelpful 301 error with an xml blob telling you how to request the bucket. The solution is to add a configuration option, with sensible default, to ec2/config.go to specify the region of the public bucket independantly of the private bucket.
R=jameinel, niemeyer
CC=
https://codereview. appspot. com/6854098 - 764. By William Reade
-
firewaller: skip flaky test
Note that the test itself is bascially fine; it exposes problems with the
firewaller initialization, which need to be addressed, but which would
respond well to expert attention.R=TheMue, niemeyer
CC=
https://codereview. appspot. com/6849126 - 763. By William Reade
-
state: UnitsWatcher always reports dead units
...instead of skipping them in the initial event, which is not helpful
behaviour.R=niemeyer
CC=
https://codereview. appspot. com/6846133 - 762. By William Reade
-
firewaller: use new style machine units watcher
After https:/
/code.launchpad .net/%7Earamh/ juju-core/ 120-firewaller- new-watcher- units7/ +merge/ 133269 Addresses comments made at https:/
/codereview. appspot. com/6820112/ R=niemeyer
CC=
https://codereview. appspot. com/6843128 - 761. By William Reade
-
state: MachineUnitsWatcher unwatches correct units
This means that stopped MUWs no longer end up blocking the watcher. To help
detect problems like this more easily in future, the watcher package now
panics when unwatching an unknown key.And I fixed RelationScopeWa
tcher, which was using the old'n'busted double-
loop style, and replaced "changeChan"s with "out"s for those watchers that
I expect to continue to exist (ie not MachinePrincipalUnitsWatcher) . Sorry,
I couldn't resist.R=ricky.kernberger
CC=
https://codereview. appspot. com/6856122 - 760. By Roger Peppe
-
various: use TLS
This enables TLS for everything.
R=fwereade, jameinel, niemeyer
CC=
https://codereview. appspot. com/6856105 - 759. By Roger Peppe
-
environs/jujutest: fix test
LiveTests.
TestStartStop did not work when called
with an already-bootstrapped environment.
Coincidentally, LiveTests.TestDestroy was
always called after the only other test to bootstrap,
so running all the tests worked.R=TheMue, gz
CC=
https://codereview. appspot. com/6850121
Reviewers: mp+138465_ code.launchpad. net,
Message:
Please take a look.
Description:
state: more expressive testing proposal
This shouldn't go in on its own -- I should fix up the rest of the state
tests before I merge it (and I don't want to fix machine_test until
we've
dropped the orgiginal WatchPrincipalUnits implementation) but I think
that
AssignSuite was a good enough test bed to evaluate the sanity of this
approach.
In particular, I found that even a few lines saved here and there made
it
much easier to follow the tests, and to notice both redundant tests and
missing ones; and that in some cases a *lot* of lines were saved.
I'm not sure AssignSuite uses all the new ConnSuite features yet (they
were
originally written against machine_test, but then I got demoralised) but
I'm
pretty sure that they will be useful; if not, of course, I'll trash
them.
https:/ /code.launchpad .net/~fwereade/ juju-core/ strawman- state-test- simplification/ +merge/ 138465
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6862053/
Affected files: test.go
A [revision details]
M state/assign_
M state/conn_test.go
M state/life_test.go
M state/unit.go