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

[19.03 backport] context: produce consistent output on context create. #1985

Conversation

thaJeztah
Copy link
Member

backport of #1874

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.

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>
(cherry picked from commit ff44305)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-io
Copy link

Codecov Report

Merging #1985 into 19.03 will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            19.03    #1985      +/-   ##
==========================================
+ Coverage   56.71%   56.72%   +<.01%     
==========================================
  Files         310      310              
  Lines       21789    21793       +4     
==========================================
+ Hits        12357    12361       +4     
  Misses       8519     8519              
  Partials      913      913

@thaJeztah thaJeztah modified the milestones: 19.03.0, 19.03.1 Jul 18, 2019
@thaJeztah thaJeztah modified the milestones: 19.03.1, 19.03.2 Jul 26, 2019
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

SGTM

@kolyshkin
Copy link
Contributor

@silvin-lubecki PTAL

@thaJeztah
Copy link
Member Author

Merging this one, because currently, no output is produced at all in some cases, e.g.:

docker context create --from=default mynewcontext
# no output

@thaJeztah thaJeztah merged commit df1fe15 into docker:19.03 Aug 22, 2019
@thaJeztah thaJeztah deleted the 19.03_backport_consistent_output_on_context_create branch August 22, 2019 08:19
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.

None yet

4 participants