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

Issue 6482073: mstate: continued completion of machine_test.go (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by TheMue
Modified:
11 years, 8 months ago
Reviewers:
mp+121394
Visibility:
Public.

Description

mstate: continued completion of machine_test.go Added missing tests and changed InstanceId() to return a NotFoundError if it is empty. In case of a corrupt instance id it is set to "" too, so that the error here now also is a NotFoundError. Still some tests regarding the alive flag are missing, the implementation of those methods needs the presence package (or equiv). https://code.launchpad.net/~themue/juju-core/go-mstate-machine-test/+merge/121394 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : mstate: continued completion of machine_test.go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M mstate/machine.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mstate/machine_test.go View 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 3
TheMue
Please take a look.
11 years, 8 months ago (2012-08-27 10:21:37 UTC) #1
niemeyer
LGTM, keep it up! https://codereview.appspot.com/6482073/diff/1/mstate/machine.go File mstate/machine.go (right): https://codereview.appspot.com/6482073/diff/1/mstate/machine.go#newcode44 mstate/machine.go:44: if m.doc.InstanceId == "" { ...
11 years, 8 months ago (2012-08-27 16:03:36 UTC) #2
TheMue
11 years, 8 months ago (2012-08-27 16:18:03 UTC) #3
*** Submitted:

mstate: continued completion of machine_test.go

Added missing tests and changed InstanceId() to return
a NotFoundError if it is empty. In case of a corrupt
instance id it is set to "" too, so that the error here
now also is a NotFoundError. Still some tests regarding
the alive flag are missing, the implementation of those
methods needs the presence package (or equiv).

R=niemeyer
CC=
https://codereview.appspot.com/6482073

https://codereview.appspot.com/6482073/diff/1/mstate/machine.go
File mstate/machine.go (right):

https://codereview.appspot.com/6482073/diff/1/mstate/machine.go#newcode44
mstate/machine.go:44: if m.doc.InstanceId == "" {
On 2012/08/27 16:03:36, niemeyer wrote:
> msg := fmt.Sprintf(...)
> return "", &NotFoundError{msg}

Done.
Sign in to reply to this message.

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