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

Improve buildx test coverage #1857

Open
19 of 35 tasks
jedevc opened this issue May 31, 2023 · 1 comment
Open
19 of 35 tasks

Improve buildx test coverage #1857

jedevc opened this issue May 31, 2023 · 1 comment
Labels
help wanted Extra attention is needed kind/tests
Milestone

Comments

@jedevc
Copy link
Collaborator

jedevc commented May 31, 2023

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:

@jedevc jedevc added help wanted Extra attention is needed kind/tests labels May 31, 2023
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 2, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 2, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 2, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 2, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 3, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
jsternberg added a commit to jsternberg/buildx that referenced this issue Aug 3, 2023
An integration test for `docker buildx version` has been created. The
integration test checks that there is one line output, the output is
composed of three sections, and that these sections could feasibly be
the package path, version, and revision information.

The intention of the checks is to find obvious errors in the output like
the package path not existing or the version and revision being swapped.
It is not intended to assert that these values must be certain values
because it is assumed these values may vary depending on the build
process for buildx.

Related to docker#1857.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
@crazy-max crazy-max pinned this issue Apr 5, 2024
@crazy-max
Copy link
Member

Updated issue description with new cases and ones fixed. Also pinned this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/tests
Projects
None yet
Development

No branches or pull requests

3 participants