Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write to Stderr directly for error output. #51

Merged
merged 1 commit into from Apr 13, 2017

Conversation

howbazaar
Copy link
Contributor

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.

Copy link
Contributor

@anastasiamac anastasiamac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

p.pendingError = nil
return 0, err
}
panic("unreachable")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs in the 2nd import block.

gc "gopkg.in/check.v1"

"github.com/juju/cmd"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because this is the package.


// 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@howbazaar
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
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 logging-fix branch April 13, 2017 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants