Merge lp://staging/~wallyworld/juju-core/ec2-live-tests-fix into lp://staging/~juju/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | William Reade |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1218 |
Proposed branch: | lp://staging/~wallyworld/juju-core/ec2-live-tests-fix |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
51 lines (+13/-5) 1 file modified
environs/jujutest/livetests.go (+13/-5) |
To merge this branch: | bzr merge lp://staging/~wallyworld/juju-core/ec2-live-tests-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+160004@code.staging.launchpad.net |
Description of the change
Fix live tests
When setting up the environment for running live tests (on EC2), no default
series was specified. This meant that "precise" was used as a fallback to start
the bootstrap node. But later on, test asserts were being done with version.
which in my case was "raring" since I'm running on the latest Ubuntu. So the tests failed.
Since we want series to be precise if not otherwise specified, I've changed the asserts in
some tests to check for version with series = config.
change is than in the checkUpgrade() tests, the tools.Upload() was returning tools for
the series on which the tests are running. But we are only interested in the version
number. Rather than do a heavy weight solution to this like FORCE-VERSION, I just tweaked
the test code to set the series of the Upload() return value to match the expected series.
I think this is ok, but would like a 2nd opinon as I am not 100% sure of the exact
rational behind the FORCE-VERSION code.
I've also changed the TestBootstrapWi
"precise" is the default series if not otherwise specified. I tweaked it so that whether
runnung on precise or otherwise, the default-series env parameter is always set to
something other than the series on which the tests are run.
Reviewers: mp+160004_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix EC2 live tests - use correct series
When setting up the environment for running live tests on EC2, no CurrentSeries( ),
default
series was specified. This meant that "precise" was used as a fallback
to start
the bootstrap node. But later on, test asserts were being done with
version.
which in my case was "raring" since I'm running on the latest Ubuntu. So
the tests failed.
I've tweaked the live test setup for EC2 to explicitly specify
default-series as
version.Current(). I think this makes sense, since I'd prefer we use the
series from the
current running Ubuntu when testing. If we want to test with "precise" I
think that's best
done as part of setting up the landing bot.
https:/ /code.launchpad .net/~wallyworl d/juju- core/ec2- live-tests- fix/+merge/ 160004
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8904043/
Affected files: ec2/live_ test.go
A [revision details]
M environs/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision:
<email address hidden>
+New revision: <email address hidden>
Index: environs/ ec2/live_ test.go ec2/live_ test.go' ec2/live_ test.go 2013-04-10 00:11:24 +0000 ec2/live_ test.go 2013-04-22 04:38:01 +0000 net/juju- core/juju/ testing" net/juju- core/state" net/juju- core/testing" net/juju- core/version"
=== modified file 'environs/
--- environs/
+++ environs/
@@ -16,6 +16,7 @@
"launchpad.
"launchpad.
coretesting "launchpad.
+ "launchpad.
"strings"
)
@@ -46,6 +47,7 @@ bucket" : "juju-test-" + uniqueName, bucket" : "juju-public-test-" + uniqueName, CurrentSeries( ), private- key": coretesting.CAKey,
"control-
"public-
"admin-secret": "for real",
+ "default-series": version.
"ca-cert": coretesting.CACert,
"ca-
}