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

context: produce consistent output on context create. #1874

Merged
merged 1 commit into from
May 13, 2019

Conversation

ijc
Copy link
Contributor

@ijc ijc commented May 13, 2019

Refactor RunCreate slightly so that all three paths always produce the same
output, namely the name of the new context of stdout (for scripting) and the
success log message on stderr.

Validate by extending the existing unit tests to always check the output is as
expected.

Signed-off-by: Ian Campbell ijc@docker.com

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@silvin-lubecki
Copy link
Contributor

Linter is complaining

internal/test/cli.go:172:1:warning: exported method FakeCli.ResetOutputBuffers should have comment or be unexported (golint)

@ijc ijc force-pushed the consistent-output-on-context-create branch from 24b6c8a to bd7882e Compare May 13, 2019 15:34
@ijc
Copy link
Contributor Author

ijc commented May 13, 2019

Oops, I got distracted right at the point I was supposed to write that comment. Now done.

@codecov-io
Copy link

Codecov Report

Merging #1874 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
+ Coverage   56.74%   56.76%   +0.01%     
==========================================
  Files         309      309              
  Lines       21676    21676              
==========================================
+ Hits        12301    12305       +4     
+ Misses       8476     8472       -4     
  Partials      899      899

Refactor `RunCreate` slightly so that all three paths always produce the same
output, namely the name of the new context of `stdout` (for scripting) and the
success log message on `stderr`.

Validate by extending the existing unit tests to always check the output is as
expected.

Signed-off-by: Ian Campbell <ijc@docker.com>
@ijc ijc force-pushed the consistent-output-on-context-create branch from bd7882e to ff44305 Compare May 13, 2019 15:42
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM 🐴

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 1454f56 into docker:master May 13, 2019
@GordonTheTurtle GordonTheTurtle added this to the 19.09.0 milestone May 13, 2019
@ijc ijc deleted the consistent-output-on-context-create branch May 14, 2019 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants