mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-28 00:17:42 +08:00
test: register docker worker with containerd snapshotter
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
7147463418
commit
2235ebce2f
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -66,6 +66,7 @@ jobs:
|
||||
matrix:
|
||||
worker:
|
||||
- docker
|
||||
- docker\+containerd # same as docker, but with containerd snapshotter
|
||||
- docker-container
|
||||
- remote
|
||||
pkg:
|
||||
@ -101,8 +102,8 @@ jobs:
|
||||
export TEST_REPORT_SUFFIX=-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.worker }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]')
|
||||
./hack/test
|
||||
env:
|
||||
TEST_DOCKERD: "${{ (matrix.worker == 'docker' || matrix.worker == 'docker-container') && '1' || '0' }}"
|
||||
TESTFLAGS: "${{ (matrix.worker == 'docker') && env.TESTFLAGS_DOCKER || env.TESTFLAGS }} --run=//worker=${{ matrix.worker }}$"
|
||||
TEST_DOCKERD: "${{ startsWith(matrix.worker, 'docker') && '1' || '0' }}"
|
||||
TESTFLAGS: "${{ (matrix.worker == 'docker' || matrix.worker == 'docker\\+containerd') && env.TESTFLAGS_DOCKER || env.TESTFLAGS }} --run=//worker=${{ matrix.worker }}$"
|
||||
TESTPKGS: "${{ matrix.pkg }}"
|
||||
SKIP_INTEGRATION_TESTS: "${{ matrix.skip-integration-tests }}"
|
||||
-
|
||||
|
@ -14,10 +14,15 @@ func InitDockerWorker() {
|
||||
integration.Register(&dockerWorker{
|
||||
id: "docker",
|
||||
})
|
||||
integration.Register(&dockerWorker{
|
||||
id: "docker+containerd",
|
||||
containerdSnapshotter: true,
|
||||
})
|
||||
}
|
||||
|
||||
type dockerWorker struct {
|
||||
id string
|
||||
id string
|
||||
containerdSnapshotter bool
|
||||
}
|
||||
|
||||
func (c dockerWorker) Name() string {
|
||||
@ -30,7 +35,8 @@ func (c dockerWorker) Rootless() bool {
|
||||
|
||||
func (c dockerWorker) New(ctx context.Context, cfg *integration.BackendConfig) (b integration.Backend, cl func() error, err error) {
|
||||
moby := integration.Moby{
|
||||
ID: c.id,
|
||||
ID: c.id,
|
||||
ContainerdSnapshotter: c.containerdSnapshotter,
|
||||
}
|
||||
bk, bkclose, err := moby.New(ctx, cfg)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user