Skip to content

unit tests on commands #37

@vdemeester

Description

@vdemeester

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions