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

unit tests on commands #37

Closed
20 tasks done
vdemeester opened this issue May 7, 2017 · 10 comments
Closed
20 tasks done

unit tests on commands #37

vdemeester opened this issue May 7, 2017 · 10 comments

Comments

@vdemeester
Copy link
Collaborator

vdemeester commented May 7, 2017

Moving initial docker/docker issue moby/moby#31217 here

This issue is to keep track of unit test for the cli (i.e. cli/commands package and sub-packages).

The swarm, node and volume packages are example on how to write those tests (but they probably can be enhance, and enhancement are always welcome ).

  • In order to write tests for these, you'll have to create more builder (cli/internal/test/builders) for objects that are not yet there.
  • You can also use golden files (see examples)
  • For each of these package, there is some integration tests (in integration-cli) that could be removed. I tried to mark them when I saw them, but it's not complete yet. I'll try to update this issue with a list of integration test that could be gone for each packages.
@dnephin
Copy link
Contributor

dnephin commented May 26, 2017

We may need to move some of the fakeClient into cli/internal/test/ and export the struct and fields. There are some packages (stack, and service at least) that use parts of other clients.

@jeremcs
Copy link

jeremcs commented Jun 6, 2017

Some items on the list seem to be deprecated as they do not appear when setting the DOCKER_HIDE_LEGACY_COMMANDS variable:

  • bundlefile
  • inspect
  • prune
  • registry
  • task

Should we remove them from the list ?

(cc @kelu27)

@vdemeester
Copy link
Collaborator Author

@jeremcs I would say not (because some of them won't ever be removed).

@clook
Copy link

clook commented Jun 19, 2017

Starting working on service (#201)

@adshmh
Copy link
Contributor

adshmh commented Jun 27, 2017

#dibs on task package

@adshmh
Copy link
Contributor

adshmh commented Jun 30, 2017

#dibs on checkpoint package.

@Zebrilee
Copy link
Contributor

hi @vdemeester ,
I was working on prune test in the last hackergarten but I saw the commit two days ago which modify the prune.go file and add a prune_test.go too.
I believe this part is ok or is there something else to do?

@vdemeester
Copy link
Collaborator Author

@Zebrilee oh right yeah, I should mark it on the issue

@redpanda
Copy link
Contributor

#dibs on network package.

adshmh added a commit to adshmh/cli that referenced this issue Feb 14, 2018
…rk on docker#37

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
adshmh added a commit to adshmh/cli that referenced this issue Feb 15, 2018
…rk on docker#37

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
@vdemeester
Copy link
Collaborator Author

Closing this as all those packages have some test. We can enhance the coverage but I feel this issue can be considered as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants