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

Move output of stack rm to stdout #491

Merged
merged 1 commit into from
Sep 4, 2017
Merged

Conversation

FrenchBen
Copy link
Contributor

- What I did
Updated the output of docker stack rm to be sent to stdout.

Fixes #490

- How I did it
s/Err/Out

- How to verify it
With no errors, doing docker stack rm nginx 1>stdout.log 2>stderr.log should show all output in stdout

- Description for the changelog
docker stack rm now sends info messages to Stdout

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

@dnephin
Copy link
Contributor

dnephin commented Sep 1, 2017

Why should it go to stdout?

@FrenchBen
Copy link
Contributor Author

FrenchBen commented Sep 1, 2017

@codecov-io
Copy link

codecov-io commented Sep 1, 2017

Codecov Report

Merging #491 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master    #491   +/-   ##
======================================
  Coverage    48.8%   48.8%           
======================================
  Files         199     199           
  Lines       16389   16389           
======================================
  Hits         7998    7998           
  Misses       7976    7976           
  Partials      415     415

@dnephin
Copy link
Contributor

dnephin commented Sep 1, 2017

Ok, makes sense to be consistent with the other remove commands.

The e2e test needs to be fixed as well

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM with a squash

"Removing config bar_config1",
"Removing network bar_network1\n",
}
assert.Equal(t, strings.Join(expectedList, "\n"), fakeCli.OutBuffer().String())
assert.Contains(t, fakeCli.ErrBuffer().String(), "Nothing found in stack: foo\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, actually this seems weird. Why is it outputing both "nothing found in stack" and that it's removing things?

Not sure how this is passing. Something seems wrong

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, nevermind, I see it now. There are two stacks, one is empty, the other is not.

@FrenchBen
Copy link
Contributor Author

Can you squash on merge?

Signed-off-by: French Ben <frenchben@docker.com>

Update for the test to capture the proper removal

Signed-off-by: French Ben <frenchben@docker.com>

Satisfy lint length limit

Signed-off-by: French Ben <frenchben@docker.com>

Updated e2e test

Signed-off-by: French Ben <frenchben@docker.com>
Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐮

@vdemeester vdemeester merged commit 38c1895 into docker:master Sep 4, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.08.0 milestone Sep 4, 2017
@FrenchBen FrenchBen deleted the fix-stack branch September 5, 2017 22:24
This pull request was closed.
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.

6 participants