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

Issue 6305081: state: add additional test for machine.InstanceId (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by dave
Modified:
12 years, 7 months ago
Reviewers:
mp+109550, fwereade, niemeyer
Visibility:
Public.

Description

state: add additional test for machine.InstanceId For reasons I don't understand the PA is not seeing the InstanceId's recorded by previous runs. I wrote this test to verify the behavior does work, so it should probably make it into the tree. https://code.launchpad.net/~dave-cheney/juju-core/go-state-machine-id-fix/+merge/109550 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : state: add additional test for machine.InstanceId #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -2 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/state_test.go View 3 chunks +30 lines, -2 lines 0 comments Download

Messages

Total messages: 3
dave_cheney.net
Please take a look.
12 years, 7 months ago (2012-06-11 01:30:45 UTC) #1
fwereade
https://codereview.appspot.com/6305081/diff/1/state/state_test.go File state/state_test.go (right): https://codereview.appspot.com/6305081/diff/1/state/state_test.go#newcode255 state/state_test.go:255: // scoped to ensure vars aren't reused. I'm not ...
12 years, 7 months ago (2012-06-11 08:06:57 UTC) #2
niemeyer
12 years, 7 months ago (2012-06-11 18:20:01 UTC) #3
https://codereview.appspot.com/6305081/diff/1/state/state_test.go
File state/state_test.go (right):

https://codereview.appspot.com/6305081/diff/1/state/state_test.go#newcode251
state/state_test.go:251: func (s *StateSuite)
TestMachineSetInstanceIdIsPersistent(c *C) {
This is a pretty awkward test. We have a SetInstanceId test above, verifying
that it works. Why would this not work?

If this was ever broken, we need a better explanation of what this is really
verifying. If it's not broken, we already have tests verifying that
SetInstanceId works above.

The "reuse of variables" below also smells like mirrors and shadow. Reusing a
variable name shouldn't cause code to misbehave, unless the compiler has a bug.
Sign in to reply to this message.

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