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

Unified Diff: state/apiserver/common/ensuredead_test.go

Issue 62230043: state/..., worker/..., utils/...: use errgo
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « state/apiserver/common/ensuredead.go ('k') | state/apiserver/common/environmachineswatcher.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/apiserver/common/ensuredead_test.go
=== modified file 'state/apiserver/common/ensuredead_test.go'
--- state/apiserver/common/ensuredead_test.go 2013-08-07 11:18:03 +0000
+++ state/apiserver/common/ensuredead_test.go 2014-02-10 21:28:38 +0000
@@ -4,8 +4,7 @@
package common_test
import (
- "fmt"
-
+ "launchpad.net/errgo/errors"
gc "launchpad.net/gocheck"
"launchpad.net/juju-core/state"
@@ -36,7 +35,7 @@
func (*deadEnsurerSuite) TestEnsureDead(c *gc.C) {
st := &fakeState{
entities: map[string]entityWithError{
- "x0": &fakeDeadEnsurer{life: state.Dying, err: fmt.Errorf("x0 fails")},
+ "x0": &fakeDeadEnsurer{life: state.Dying, err: errors.Newf("x0 fails")},
"x1": &fakeDeadEnsurer{life: state.Alive},
"x2": &fakeDeadEnsurer{life: state.Dying},
"x3": &fakeDeadEnsurer{life: state.Dead},
@@ -72,7 +71,7 @@
func (*deadEnsurerSuite) TestEnsureDeadError(c *gc.C) {
getCanModify := func() (common.AuthFunc, error) {
- return nil, fmt.Errorf("pow")
+ return nil, errors.Newf("pow")
}
d := common.NewDeadEnsurer(&fakeState{}, getCanModify)
_, err := d.EnsureDead(params.Entities{[]params.Entity{{"x0"}}})
@@ -81,7 +80,7 @@
func (*removeSuite) TestEnsureDeadNoArgsNoError(c *gc.C) {
getCanModify := func() (common.AuthFunc, error) {
- return nil, fmt.Errorf("pow")
+ return nil, errors.Newf("pow")
}
d := common.NewDeadEnsurer(&fakeState{}, getCanModify)
result, err := d.EnsureDead(params.Entities{})
« no previous file with comments | « state/apiserver/common/ensuredead.go ('k') | state/apiserver/common/environmachineswatcher.go » ('j') | no next file with comments »

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