Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4283)

Issue 14207046: environs/dummy: add state-id

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by rog
Modified:
10 years, 6 months ago
Reviewers:
mp+188643, fwereade
Visibility:
Public.

Description

environs/dummy: add state-id This makes the dummy provider more like the other providers in that the Environ does not refer directly to the bootstrapped state, but is looked up when operations are performed on it. This is also a test case for adding attributes at Prepare time - many tests needed changing to correctly deal with this. https://code.launchpad.net/~rogpeppe/juju-core/375-dummy-prepare-state-id/+merge/188643 Requires: https://code.launchpad.net/~rogpeppe/juju-core/426-environs-add-store-to-new/+merge/188409 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs/dummy: add state-id #

Total comments: 6

Patch Set 3 : environs/dummy: add state-id #

Unified diffs Side-by-side diffs Delta from patch set Stats (+382 lines, -186 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 chunk +2 lines, -1 line 0 comments Download
M cmd/juju/synctools_test.go View 2 chunks +3 lines, -3 lines 0 comments Download
M cmd/plugins/juju-metadata/toolsmetadata_test.go View 2 chunks +2 lines, -1 line 0 comments Download
M environs/bootstrap/bootstrap.go View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M environs/bootstrap/bootstrap_test.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M environs/config.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/config_test.go View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M environs/emptystorage_test.go View 1 3 chunks +8 lines, -2 lines 0 comments Download
M environs/imagemetadata/urls_test.go View 3 chunks +4 lines, -2 lines 0 comments Download
M environs/jujutest/tests.go View 1 chunk +6 lines, -2 lines 0 comments Download
M environs/open_test.go View 6 chunks +13 lines, -21 lines 0 comments Download
M environs/tools/urls_test.go View 3 chunks +4 lines, -2 lines 0 comments Download
M juju/apiconn_test.go View 6 chunks +33 lines, -22 lines 0 comments Download
M juju/conn_test.go View 3 chunks +5 lines, -4 lines 0 comments Download
M provider/dummy/config_test.go View 1 4 chunks +19 lines, -7 lines 0 comments Download
M provider/dummy/environs.go View 1 2 24 chunks +122 lines, -60 lines 0 comments Download
M provider/dummy/storage.go View 6 chunks +135 lines, -40 lines 0 comments Download
M provider/ec2/local_test.go View 3 chunks +3 lines, -3 lines 0 comments Download
A provider/error.go View 1 chunk +13 lines, -0 lines 0 comments Download
M provider/openstack/local_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
rog
Please take a look.
10 years, 6 months ago (2013-10-01 16:54:44 UTC) #1
fwereade
LGTM, although I'm a bit concerned about ErrNotPrepared. I kinda feel it's more of a ...
10 years, 6 months ago (2013-10-02 09:40:49 UTC) #2
rog
10 years, 6 months ago (2013-10-02 12:24:50 UTC) #3
Please take a look.

https://codereview.appspot.com/14207046/diff/3001/environs/config_test.go
File environs/config_test.go (left):

https://codereview.appspot.com/14207046/diff/3001/environs/config_test.go#old...
environs/config_test.go:224: env, err := environs.New(cfg)
On 2013/10/02 09:40:49, fwereade wrote:
> AFAICT this is just testing the dummy environ and has no ability to tell us
> anything useful about real code.
> 
> Individual tests for the individual provider configs, that unknown fields are
> preserved through all Prepare/Validate/SetConfig/Config sorts of ops, might be
> good; but I think they're out of scope here.

i've removed the test

https://codereview.appspot.com/14207046/diff/3001/environs/open_test.go
File environs/open_test.go (right):

https://codereview.appspot.com/14207046/diff/3001/environs/open_test.go#newco...
environs/open_test.go:104: c.Assert(err, gc.ErrorMatches, "environment is not
prepared")
On 2013/10/02 09:40:49, fwereade wrote:
> This is a bit of a baffling message if it leaks out to where a user can see
it.

It should not leak out to the user, but *can* do so in some situations, for
backward compatibility reasons (we want to allow a user to talk to an existing
bootstrapped environment with a current environments.yaml file even though they
didn't bootstrap locally and therefore do not have any environment info).

As discussed online, we'll leave this as is for the time being.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b