Merge lp://staging/~fwereade/juju-core/fix-quantal-test-1 into lp://staging/~juju/juju-core/trunk

Proposed by William Reade
Status: Merged
Merged at revision: 1175
Proposed branch: lp://staging/~fwereade/juju-core/fix-quantal-test-1
Merge into: lp://staging/~juju/juju-core/trunk
Diff against target: 86 lines (+9/-7)
3 files modified
environs/ec2/local_test.go (+3/-6)
environs/openstack/local_test.go (+1/-1)
environs/testing/tools.go (+5/-0)
To merge this branch: bzr merge lp://staging/~fwereade/juju-core/fix-quantal-test-1
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+159516@code.staging.launchpad.net

Description of the change

environs: fix precise assumptions

I missed a couple of cases somewhere in the pipeline. Sorry :(.

https://codereview.appspot.com/8804044/

To post a comment you must log in.
Revision history for this message
William Reade (fwereade) wrote :
Download full text (4.2 KiB)

Reviewers: mp+159516_code.launchpad.net,

Message:
Please take a look.

Description:
environs: fix precise assumptions

I missed a couple of cases somewhere in the pipeline. Sorry :(.

https://code.launchpad.net/~fwereade/juju-core/fix-quantal-test-1/+merge/159516

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/8804044/

Affected files:
   A [revision details]
   M environs/ec2/local_test.go
   M environs/openstack/local_test.go
   M environs/testing/tools.go

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/local_test.go
=== modified file 'environs/ec2/local_test.go'
--- environs/ec2/local_test.go 2013-04-14 22:12:49 +0000
+++ environs/ec2/local_test.go 2013-04-17 22:09:22 +0000
@@ -11,11 +11,9 @@
   "launchpad.net/goyaml"
   "launchpad.net/juju-core/constraints"
   "launchpad.net/juju-core/environs"
- "launchpad.net/juju-core/environs/config"
   "launchpad.net/juju-core/environs/ec2"
   "launchpad.net/juju-core/environs/jujutest"
   envtesting "launchpad.net/juju-core/environs/testing"
- "launchpad.net/juju-core/environs/tools"
   "launchpad.net/juju-core/state"
   "launchpad.net/juju-core/testing"
   "launchpad.net/juju-core/utils"
@@ -259,9 +257,8 @@
   policy := t.env.AssignmentPolicy()
   c.Assert(policy, Equals, state.AssignNew)

- _, err := tools.Upload(t.env.Storage(), nil)
- c.Assert(err, IsNil)
- err = environs.Bootstrap(t.env, constraints.Value{})
+ envtesting.UploadFakeTools(c, t.env.Storage())
+ err := environs.Bootstrap(t.env, constraints.Value{})
   c.Assert(err, IsNil)

   // check that the state holds the id of the bootstrap machine.
@@ -300,7 +297,7 @@
   // check that a new instance will be started without
   // zookeeper, with a machine agent, and without a
   // provisioning agent.
- series := config.DefaultSeries
+ series := t.env.Config().DefaultSeries()
   info.Tag = "machine-1"
   apiInfo.Tag = "machine-1"
   inst1, err := t.env.StartInstance("1", "fake_nonce", series,
constraints.Value{}, info, apiInfo)

Index: environs/openstack/local_test.go
=== modified file 'environs/openstack/local_test.go'
--- environs/openstack/local_test.go 2013-04-14 15:09:35 +0000
+++ environs/openstack/local_test.go 2013-04-17 20:41:15 +0000
@@ -387,7 +387,7 @@

   // check that a new instance will be started with a machine agent,
   // and without a provisioning agent.
- series := version.Current.Series
+ series := t.env.Config().DefaultSeries()
   info.Tag = "machine-1"
   apiInfo.Tag = "machine-1"
   inst1, err := t.env.StartInstance("1", "fake_nonce", series,
constraints.Value{}, info, apiInfo)

Index: environs/testing/tools.go
=== modified file 'environs/testing/tools.go'
--- environs/testing/tools.go 2013-04-13 19:05:08 +0000
+++ environs/testing/tools.go 2013-04-17 20:41:15 +0000
@@ -5,6 +5,7 @@
   "launchpad.net/juju-core/environs"
   "launchpad.net/juju-core/environs/config"
   "launchpad.net/...

Read more...

Revision history for this message
Tim Penhey (thumper) wrote :
Revision history for this message
Roger Peppe (rogpeppe) wrote :

LGTM with a couple of trivial remarks below

https://codereview.appspot.com/8804044/diff/1/environs/ec2/local_test.go
File environs/ec2/local_test.go (right):

https://codereview.appspot.com/8804044/diff/1/environs/ec2/local_test.go#newcode260
environs/ec2/local_test.go:260: envtesting.UploadFakeTools(c,
t.env.Storage())
this was a precise dependency?

https://codereview.appspot.com/8804044/diff/1/environs/testing/tools.go
File environs/testing/tools.go (right):

https://codereview.appspot.com/8804044/diff/1/environs/testing/tools.go#newcode78
environs/testing/tools.go:78: c.Logf("removing files: %v", names)
are these log messages all still worth it?

https://codereview.appspot.com/8804044/

Revision history for this message
William Reade (fwereade) wrote :

*** Submitted:

environs: fix precise assumptions

I missed a couple of cases somewhere in the pipeline. Sorry :(.

R=thumper, rog
CC=
https://codereview.appspot.com/8804044

https://codereview.appspot.com/8804044/diff/1/environs/ec2/local_test.go
File environs/ec2/local_test.go (right):

https://codereview.appspot.com/8804044/diff/1/environs/ec2/local_test.go#newcode260
environs/ec2/local_test.go:260: envtesting.UploadFakeTools(c,
t.env.Storage())
On 2013/04/17 22:33:28, rog wrote:
> this was a precise dependency?

openstack currently demands precise images, so without specifying
series..., yes it was.

https://codereview.appspot.com/8804044/diff/1/environs/testing/tools.go
File environs/testing/tools.go (right):

https://codereview.appspot.com/8804044/diff/1/environs/testing/tools.go#newcode17
environs/testing/tools.go:17: log.Noticef("environs/testing: uploading
FAKE tools %s", vers)
(FWIW, the thinking here is that this *could* be called in a non-test
context, and if it is I want it to be as clear as possible that
something crackful is going on.)

https://codereview.appspot.com/8804044/diff/1/environs/testing/tools.go#newcode78
environs/testing/tools.go:78: c.Logf("removing files: %v", names)
On 2013/04/17 22:33:28, rog wrote:
> are these log messages all still worth it?

Occasionally I've found myself in a tangle with dummy Resets and magic
tool uploads and it's nice to see what's actually happened when
strangeness occurs. And I'm logging uploads, may as well log clears :).

https://codereview.appspot.com/8804044/

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