Skip to content

refactor stack list command unit tests to table-driven - #1287

Merged
silvin-lubecki merged 1 commit into
docker:masterfrom
adshmh:refactor-stack-list-unit-tests
Sep 20, 2018
Merged

refactor stack list command unit tests to table-driven#1287
silvin-lubecki merged 1 commit into
docker:masterfrom
adshmh:refactor-stack-list-unit-tests

Conversation

@adshmh

Copy link
Copy Markdown
Contributor

- What I did
Refactored unit tests of stack list command to table-driven

- How I did it
Modified the unit tests under cli/command/stack/list_test.go

- How to verify it

- Description for the changelog
Refactored stack list unit tests to table-driven

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

@codecov-io

codecov-io commented Aug 13, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1287 into master will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #1287 +/- ##
=======================================
Coverage 54.88% 54.88% =======================================
Files 293 293 Lines 19428 19428 =======================================
Hits 10663 10663 Misses 8089 8089 Partials 676 676

@vdemeestervdemeester left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🐸

Comment threadcli/command/stack/list_test.go Outdated
},
for _, tc := range testCases {
t.Run(tc.doc, func(t *testing.T) {
services := []swarm.Service{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: var services []swarm.Service

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thank you for the review. I have updated the PR.

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
@adshmh
adshmhforce-pushed the refactor-stack-list-unit-tests branch from d24d4ea to e9dc229CompareSeptember 20, 2018 02:17

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@silvin-lubecki
silvin-lubecki merged commit b23272f into docker:masterSep 20, 2018
@GordonTheTurtleGordonTheTurtle added this to the 19.03.0 milestone Sep 20, 2018
@silvin-lubecki

Copy link
Copy Markdown
Contributor

Thank you @adshmh !!!

lifubang pushed a commit to lifubang/cli that referenced this pull request Oct 12, 2018
…ests
refactor stack list command unit tests to table-driven
Signed-off-by: Lifubang <lifubang@acmcoder.com>
Sign up for freeto 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

@adshmh@codecov-io@silvin-lubecki@vdemeester@thaJeztah@GordonTheTurtle