Write to Stderr directly for error output. #51

Merged
merged 1 commit into from Apr 13, 2017

Conversation

Projects
None yet
3 participants
Owner

howbazaar commented Apr 12, 2017

Using the logger for error output was a bad call.

This branch also brings in the non-juju specific extra methods used for testing commands.

Looks really neat \o/
Just couple of comments but nothing blocking, I think :D
Thank you!

+
+// NewSeqPrompter returns a prompter that can be used to check a sequence of
+// IO interactions. Expected input from the user is marked with the
+// given user input marker (for example a distinctive unicode character
@anastasiamac

anastasiamac Apr 13, 2017

Member

Doesn't "for example,..." need a comma after it?

+ p.pendingError = nil
+ return 0, err
+ }
+ panic("unreachable")
@anastasiamac

anastasiamac Apr 13, 2017

Member

Is this really necessary here? It looks to me like you've covered all the possibilities - when would you expect to panic here now?

If you strongly believe in its necessity, I think we'd want to unit test that we can reach it ;D

@howbazaar

howbazaar Apr 13, 2017

Owner

These files were just copied from the juju/juju/cmd/cmdtesting, and the only thing I changed was the licence header.

+ jc "github.com/juju/testing/checkers"
+ gc "gopkg.in/check.v1"
+
+ "github.com/juju/cmd/cmdtesting"
@anastasiamac

anastasiamac Apr 13, 2017

Member

I think this belongs in the 2nd import block.

gc "gopkg.in/check.v1"
+
+ "github.com/juju/cmd"
@anastasiamac

anastasiamac Apr 13, 2017

Member

Maybe in the 2nd import block too?...

@howbazaar

howbazaar Apr 13, 2017

Owner

No, because this is the package.

Owner

howbazaar commented Apr 13, 2017

$$merge$$

Contributor

jujubot commented Apr 13, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-cmd

@jujubot jujubot merged commit e47739a into juju:master Apr 13, 2017

@howbazaar howbazaar deleted the howbazaar:logging-fix branch Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment