Skip to content

Commit 0ec16b8

Browse files
chore(deps): bump github.com/docker/cli from 27.5.1+incompatible to 28.0.1+incompatible (#3218)
* chore(deps): bump github.com/docker/cli Bumps [github.com/docker/cli](https://github.com/docker/cli) from 27.5.1+incompatible to 28.0.1+incompatible. - [Commits](docker/cli@v27.5.1...v28.0.1) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: remove deprecated types * chore: update unit tests --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qiao Han <[email protected]>
1 parent ef7ed65 commit 0ec16b8

File tree

18 files changed

+144
-131
lines changed

18 files changed

+144
-131
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ require (
1212
github.com/charmbracelet/glamour v0.7.0
1313
github.com/charmbracelet/lipgloss v0.12.1
1414
github.com/containers/common v0.62.0
15-
github.com/docker/cli v27.5.1+incompatible
16-
github.com/docker/docker v27.5.1+incompatible
15+
github.com/docker/cli v28.0.1+incompatible
16+
github.com/docker/docker v28.0.1+incompatible
1717
github.com/docker/go-connections v0.5.0
1818
github.com/docker/go-units v0.5.0
1919
github.com/ecies/go/v2 v2.0.10

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK
226226
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
227227
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
228228
github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
229-
github.com/docker/cli v27.5.1+incompatible h1:JB9cieUT9YNiMITtIsguaN55PLOHhBSz3LKVc6cqWaY=
230-
github.com/docker/cli v27.5.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
229+
github.com/docker/cli v28.0.1+incompatible h1:g0h5NQNda3/CxIsaZfH4Tyf6vpxFth7PYl3hgCPOKzs=
230+
github.com/docker/cli v28.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
231231
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
232232
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
233233
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
234-
github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8=
235-
github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
234+
github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0=
235+
github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
236236
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
237237
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
238238
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=

internal/db/branch/create/create_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"net/http"
66
"testing"
77

8-
"github.com/docker/docker/api/types"
8+
"github.com/docker/docker/api/types/container"
99
"github.com/h2non/gock"
1010
"github.com/spf13/afero"
1111
"github.com/stretchr/testify/assert"
@@ -60,7 +60,7 @@ func TestBranchCreation(t *testing.T) {
6060
// Run test
6161
err := createBranch(context.Background(), "test-branch")
6262
// Validate api
63-
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
63+
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
6464
assert.Empty(t, apitest.ListUnmatchedRequests())
6565
})
6666

@@ -71,7 +71,7 @@ func TestBranchCreation(t *testing.T) {
7171
gock.New(utils.Docker.DaemonHost()).
7272
Post("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/exec").
7373
Reply(http.StatusCreated).
74-
JSON(types.ContainerJSON{})
74+
JSON(container.InspectResponse{})
7575
// Run test
7676
err := createBranch(context.Background(), "test-branch")
7777
// Validate api

internal/db/branch/switch_/switch__test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77
"testing"
88

9-
"github.com/docker/docker/api/types"
9+
"github.com/docker/docker/api/types/container"
1010
"github.com/h2non/gock"
1111
"github.com/jackc/pgerrcode"
1212
"github.com/spf13/afero"
@@ -34,7 +34,7 @@ func TestSwitchCommand(t *testing.T) {
3434
gock.New(utils.Docker.DaemonHost()).
3535
Get("/v" + utils.Docker.ClientVersion() + "/containers").
3636
Reply(http.StatusOK).
37-
JSON(types.ContainerJSON{})
37+
JSON(container.InspectResponse{})
3838
gock.New(utils.Docker.DaemonHost()).
3939
Post("/v" + utils.Docker.ClientVersion() + "/containers").
4040
Reply(http.StatusServiceUnavailable)
@@ -99,7 +99,7 @@ func TestSwitchCommand(t *testing.T) {
9999
gock.New(utils.Docker.DaemonHost()).
100100
Get("/v" + utils.Docker.ClientVersion() + "/containers").
101101
Reply(http.StatusOK).
102-
JSON(types.ContainerJSON{})
102+
JSON(container.InspectResponse{})
103103
// Run test
104104
err := Run(context.Background(), "postgres", fsys)
105105
// Check error
@@ -117,7 +117,7 @@ func TestSwitchCommand(t *testing.T) {
117117
gock.New(utils.Docker.DaemonHost()).
118118
Get("/v" + utils.Docker.ClientVersion() + "/containers").
119119
Reply(http.StatusOK).
120-
JSON(types.ContainerJSON{})
120+
JSON(container.InspectResponse{})
121121
// Run test
122122
err := Run(context.Background(), "main", fsys)
123123
// Check error
@@ -135,7 +135,7 @@ func TestSwitchCommand(t *testing.T) {
135135
gock.New(utils.Docker.DaemonHost()).
136136
Get("/v" + utils.Docker.ClientVersion() + "/containers").
137137
Reply(http.StatusOK).
138-
JSON(types.ContainerJSON{})
138+
JSON(container.InspectResponse{})
139139
// Setup target branch
140140
branch := "main"
141141
branchPath := filepath.Join(filepath.Dir(utils.CurrBranchPath), branch)
@@ -159,7 +159,7 @@ func TestSwitchCommand(t *testing.T) {
159159
gock.New(utils.Docker.DaemonHost()).
160160
Get("/v" + utils.Docker.ClientVersion() + "/containers").
161161
Reply(http.StatusOK).
162-
JSON(types.ContainerJSON{})
162+
JSON(container.InspectResponse{})
163163
// Setup target branch
164164
branch := "target"
165165
branchPath := filepath.Join(filepath.Dir(utils.CurrBranchPath), branch)
@@ -183,7 +183,7 @@ func TestSwitchCommand(t *testing.T) {
183183
gock.New(utils.Docker.DaemonHost()).
184184
Get("/v" + utils.Docker.ClientVersion() + "/containers").
185185
Reply(http.StatusOK).
186-
JSON(types.ContainerJSON{})
186+
JSON(container.InspectResponse{})
187187
// Setup target branch
188188
branch := "main"
189189
branchPath := filepath.Join(filepath.Dir(utils.CurrBranchPath), branch)

internal/db/diff/diff_test.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"time"
1212

1313
"github.com/docker/docker/api/types"
14+
"github.com/docker/docker/api/types/container"
1415
"github.com/h2non/gock"
1516
"github.com/jackc/pgconn"
1617
"github.com/jackc/pgerrcode"
@@ -51,10 +52,10 @@ func TestRun(t *testing.T) {
5152
gock.New(utils.Docker.DaemonHost()).
5253
Get("/v" + utils.Docker.ClientVersion() + "/containers/test-shadow-db/json").
5354
Reply(http.StatusOK).
54-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
55-
State: &types.ContainerState{
55+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
56+
State: &container.State{
5657
Running: true,
57-
Health: &types.Health{Status: types.Healthy},
58+
Health: &container.Health{Status: types.Healthy},
5859
},
5960
}})
6061
apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.Config.Realtime.Image), "test-shadow-realtime")
@@ -218,8 +219,8 @@ func TestDiffDatabase(t *testing.T) {
218219
gock.New(utils.Docker.DaemonHost()).
219220
Get("/v" + utils.Docker.ClientVersion() + "/containers/test-shadow-db/json").
220221
Reply(http.StatusOK).
221-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
222-
State: &types.ContainerState{
222+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
223+
State: &container.State{
223224
Running: false,
224225
Status: "exited",
225226
},
@@ -248,10 +249,10 @@ func TestDiffDatabase(t *testing.T) {
248249
gock.New(utils.Docker.DaemonHost()).
249250
Get("/v" + utils.Docker.ClientVersion() + "/containers/test-shadow-db/json").
250251
Reply(http.StatusOK).
251-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
252-
State: &types.ContainerState{
252+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
253+
State: &container.State{
253254
Running: true,
254-
Health: &types.Health{Status: types.Healthy},
255+
Health: &container.Health{Status: types.Healthy},
255256
},
256257
}})
257258
gock.New(utils.Docker.DaemonHost()).
@@ -285,10 +286,10 @@ create schema public`)
285286
gock.New(utils.Docker.DaemonHost()).
286287
Get("/v" + utils.Docker.ClientVersion() + "/containers/test-shadow-db/json").
287288
Reply(http.StatusOK).
288-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
289-
State: &types.ContainerState{
289+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
290+
State: &container.State{
290291
Running: true,
291-
Health: &types.Health{Status: types.Healthy},
292+
Health: &container.Health{Status: types.Healthy},
292293
},
293294
}})
294295
gock.New(utils.Docker.DaemonHost()).

internal/db/dump/dump_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestPullCommand(t *testing.T) {
7272
// Run test
7373
err := Run(context.Background(), "", dbConfig, nil, nil, false, false, false, false, false, fsys)
7474
// Check error
75-
assert.ErrorContains(t, err, "request returned Service Unavailable for API route and version")
75+
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
7676
assert.Empty(t, apitest.ListUnmatchedRequests())
7777
})
7878

internal/db/lint/lint_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net/http"
88
"testing"
99

10-
"github.com/docker/docker/api/types"
10+
"github.com/docker/docker/api/types/container"
1111
"github.com/h2non/gock"
1212
"github.com/jackc/pgconn"
1313
"github.com/jackc/pgerrcode"
@@ -38,7 +38,7 @@ func TestLintCommand(t *testing.T) {
3838
gock.New(utils.Docker.DaemonHost()).
3939
Get("/v" + utils.Docker.ClientVersion() + "/containers").
4040
Reply(http.StatusOK).
41-
JSON(types.ContainerJSON{})
41+
JSON(container.InspectResponse{})
4242
// Setup db response
4343
expected := Result{
4444
Function: "22751",

internal/db/reset/reset_test.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/docker/docker/api/types"
13+
"github.com/docker/docker/api/types/container"
1314
"github.com/h2non/gock"
1415
"github.com/jackc/pgconn"
1516
"github.com/jackc/pgerrcode"
@@ -50,7 +51,7 @@ func TestResetCommand(t *testing.T) {
5051
gock.New(utils.Docker.DaemonHost()).
5152
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId).
5253
Reply(http.StatusOK).
53-
JSON(types.ContainerJSON{})
54+
JSON(container.InspectResponse{})
5455
gock.New(utils.Docker.DaemonHost()).
5556
Delete("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId).
5657
Reply(http.StatusOK)
@@ -61,10 +62,10 @@ func TestResetCommand(t *testing.T) {
6162
gock.New(utils.Docker.DaemonHost()).
6263
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
6364
Reply(http.StatusOK).
64-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
65-
State: &types.ContainerState{
65+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
66+
State: &container.State{
6667
Running: true,
67-
Health: &types.Health{Status: types.Healthy},
68+
Health: &container.Health{Status: types.Healthy},
6869
},
6970
}})
7071
// Setup mock postgres
@@ -84,10 +85,10 @@ func TestResetCommand(t *testing.T) {
8485
gock.New(utils.Docker.DaemonHost()).
8586
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.StorageId + "/json").
8687
Reply(http.StatusOK).
87-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
88-
State: &types.ContainerState{
88+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
89+
State: &container.State{
8990
Running: true,
90-
Health: &types.Health{Status: types.Healthy},
91+
Health: &container.Health{Status: types.Healthy},
9192
},
9293
}})
9394
gock.New(utils.Config.Api.ExternalUrl).
@@ -147,7 +148,7 @@ func TestResetCommand(t *testing.T) {
147148
gock.New(utils.Docker.DaemonHost()).
148149
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId).
149150
Reply(http.StatusOK).
150-
JSON(types.ContainerJSON{})
151+
JSON(container.InspectResponse{})
151152
gock.New(utils.Docker.DaemonHost()).
152153
Delete("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId).
153154
ReplyError(errors.New("network error"))
@@ -298,10 +299,10 @@ func TestRestartDatabase(t *testing.T) {
298299
gock.New(utils.Docker.DaemonHost()).
299300
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
300301
Reply(http.StatusOK).
301-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
302-
State: &types.ContainerState{
302+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
303+
State: &container.State{
303304
Running: true,
304-
Health: &types.Health{Status: types.Healthy},
305+
Health: &container.Health{Status: types.Healthy},
305306
},
306307
}})
307308
// Restarts services
@@ -333,10 +334,10 @@ func TestRestartDatabase(t *testing.T) {
333334
gock.New(utils.Docker.DaemonHost()).
334335
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
335336
Reply(http.StatusOK).
336-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
337-
State: &types.ContainerState{
337+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
338+
State: &container.State{
338339
Running: true,
339-
Health: &types.Health{Status: types.Healthy},
340+
Health: &container.Health{Status: types.Healthy},
340341
},
341342
}})
342343
// Restarts services
@@ -389,8 +390,8 @@ func TestRestartDatabase(t *testing.T) {
389390
gock.New(utils.Docker.DaemonHost()).
390391
Get("/v" + utils.Docker.ClientVersion() + "/containers/test-reset/json").
391392
Reply(http.StatusOK).
392-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
393-
State: &types.ContainerState{
393+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
394+
State: &container.State{
394395
Running: false,
395396
Status: "exited",
396397
},

internal/db/start/start_test.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"testing"
1010

1111
"github.com/docker/docker/api/types"
12+
"github.com/docker/docker/api/types/container"
1213
"github.com/docker/docker/api/types/volume"
1314
"github.com/h2non/gock"
1415
"github.com/spf13/afero"
@@ -71,10 +72,10 @@ func TestStartDatabase(t *testing.T) {
7172
gock.New(utils.Docker.DaemonHost()).
7273
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
7374
Reply(http.StatusOK).
74-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
75-
State: &types.ContainerState{
75+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
76+
State: &container.State{
7677
Running: true,
77-
Health: &types.Health{Status: types.Healthy},
78+
Health: &container.Health{Status: types.Healthy},
7879
},
7980
}})
8081
apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.Config.Realtime.Image), "test-realtime")
@@ -117,10 +118,10 @@ func TestStartDatabase(t *testing.T) {
117118
gock.New(utils.Docker.DaemonHost()).
118119
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
119120
Reply(http.StatusOK).
120-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
121-
State: &types.ContainerState{
121+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
122+
State: &container.State{
122123
Running: true,
123-
Health: &types.Health{Status: types.Healthy},
124+
Health: &container.Health{Status: types.Healthy},
124125
},
125126
}})
126127
// Run test
@@ -147,11 +148,11 @@ func TestStartDatabase(t *testing.T) {
147148
ReplyError(errors.New("network error"))
148149
gock.New(utils.Docker.DaemonHost()).
149150
Get("/v" + utils.Docker.ClientVersion() + "/images/" + utils.GetRegistryImageUrl(utils.Config.Db.Image) + "/json").
150-
Reply(http.StatusInternalServerError)
151+
Reply(http.StatusServiceUnavailable)
151152
// Run test
152153
err := StartDatabase(context.Background(), "", fsys, io.Discard)
153154
// Check error
154-
assert.ErrorContains(t, err, "request returned Internal Server Error for API route and version")
155+
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
155156
assert.Empty(t, apitest.ListUnmatchedRequests())
156157
})
157158
}
@@ -194,7 +195,7 @@ func TestStartCommand(t *testing.T) {
194195
gock.New(utils.Docker.DaemonHost()).
195196
Get("/v" + utils.Docker.ClientVersion() + "/containers/").
196197
Reply(http.StatusOK).
197-
JSON(types.ContainerJSON{})
198+
JSON(container.InspectResponse{})
198199
// Run test
199200
err := Run(context.Background(), "", fsys)
200201
// Check error
@@ -333,10 +334,10 @@ func TestStartDatabaseWithCustomSettings(t *testing.T) {
333334
gock.New(utils.Docker.DaemonHost()).
334335
Get("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId + "/json").
335336
Reply(http.StatusOK).
336-
JSON(types.ContainerJSON{ContainerJSONBase: &types.ContainerJSONBase{
337-
State: &types.ContainerState{
337+
JSON(container.InspectResponse{ContainerJSONBase: &container.ContainerJSONBase{
338+
State: &container.State{
338339
Running: true,
339-
Health: &types.Health{Status: types.Healthy},
340+
Health: &container.Health{Status: types.Healthy},
340341
},
341342
}})
342343

0 commit comments

Comments
 (0)