docker / docker/buildx

Improve buildx test coverage

Open
#1,857 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted kind/tests
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

We've now merged #1770 to add support for integration tests 🎉 However, buildx has been around for several years before these tests, so we don't have anywhere near the amount of test coverage that we want. These tests are essential to track regressions, detect changes in behavior as we refactor and build new functionality, and add new modes and drivers.

In general, all new functionality should be added with tests wherever feasible, but we need a plan to work through the existing backlog of code with no tests. This issue is to track what broad groups of tests we need, and how far along we are. This list isn't currently complete -- but as a general rule of thumb, if we document the behavior on https://docs.docker.com, we should be testing it.

Ideally, each sub-point in the list would end up as a PR, though maybe it makes sense to group some of the smaller ones together, or split some of the larger ones up.

(note to maintainers, feel free to add anything that you think is missing 🥳)


The first type of tests that we need are for the top-level commands package - at the time of writing, these currently reside in the top-level tests package. These are designed to test each of the buildx subcommands, such as build, bake, inspect, etc.

The areas that we need coverage for:

The second type of tests that we need are for the top-level driver package. These drivers allow connecting to buildkit running in different configurations. Each driver supports lots of different types of options, and so we should have tests that test for configuring and setting up buildkit with these different options. Currently, we don't have any tests of this format.

The areas that we need coverage for:

  • docker driver
    • overlayfs graph driver
    • containerd snapshotter (#1897)
  • docker-container driver (see docs)
  • kubernetes driver (see docs)
  • remote driver (see docs)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by reviewing the top-level tests package and driver package, using the unchecked command and driver areas in this issue as the scope. Run the integration tests introduced by #1770 and select a focused unchecked area. Done means adding coverage for the documented behavior and tracking it with a PR.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devtools, testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.