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

Unified Diff: cmd/jujud/run_test.go

Issue 51450047: Preliminary support for basic juju id commands: (Closed)
Patch Set: Preliminary support for basic juju id commands: Created 11 years, 8 months 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 | « cmd/jujud/run.go ('k') | cmd/package_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/jujud/run_test.go
=== modified file 'cmd/jujud/run_test.go'
--- cmd/jujud/run_test.go 2014-03-13 07:54:56 +0000
+++ cmd/jujud/run_test.go 2014-03-14 03:05:26 +0000
@@ -14,6 +14,7 @@
gc "launchpad.net/gocheck"
"launchpad.net/juju-core/cmd"
+ "launchpad.net/juju-core/errors"
"launchpad.net/juju-core/testing"
"launchpad.net/juju-core/testing/testbase"
"launchpad.net/juju-core/utils/exec"
@@ -104,7 +105,7 @@
resultChannel := make(chan *cmd.Context)
go func() {
ctx, err := testing.RunCommand(c, &RunCommand{}, params)
- c.Assert(err, jc.Satisfies, cmd.IsRcPassthroughError)
+ c.Assert(err, jc.Satisfies, errors.IsRcPassthroughError)
c.Assert(err, gc.ErrorMatches, "rc: 0")
resultChannel <- ctx
close(resultChannel)
@@ -117,7 +118,7 @@
s.PatchValue(&AgentDir, c.MkDir())
ctx, err := testing.RunCommand(c, &RunCommand{}, []string{"--no-context", "echo done"})
- c.Assert(err, jc.Satisfies, cmd.IsRcPassthroughError)
+ c.Assert(err, jc.Satisfies, errors.IsRcPassthroughError)
c.Assert(err, gc.ErrorMatches, "rc: 0")
c.Assert(testing.Stdout(ctx), gc.Equals, "done\n")
}
@@ -167,7 +168,7 @@
s.runListenerForAgent(c, "foo")
ctx, err := testing.RunCommand(c, &RunCommand{}, []string{"foo", "bar"})
- c.Check(cmd.IsRcPassthroughError(err), jc.IsTrue)
+ c.Check(errors.IsRcPassthroughError(err), jc.IsTrue)
c.Assert(err, gc.ErrorMatches, "rc: 42")
c.Assert(testing.Stdout(ctx), gc.Equals, "bar stdout")
c.Assert(testing.Stderr(ctx), gc.Equals, "bar stderr")
« no previous file with comments | « cmd/jujud/run.go ('k') | cmd/package_test.go » ('j') | no next file with comments »

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