Skip to content

Commit 7b12576

Browse files
committed
udocker: bump Docker API version to 1.48 (= 2025-02)
1 parent bda704f commit 7b12576

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

app/udocker/endpoints.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package udocker
22

33
var (
4-
DefaultVersion = EndpointVersion("1.24")
4+
// API version 1.48 = Docker 28.0 = 2025-02
5+
DefaultVersion = EndpointVersion("1.48")
56
)
67

78
type VersionedEndpoints struct {

app/udocker/endpoints_test.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package udocker
2+
3+
import (
4+
"strings"
5+
"testing"
6+
7+
"github.com/function61/gokit/testing/assert"
8+
)
9+
10+
func TestEndpointVersion(t *testing.T) {
11+
urls := func(version VersionedEndpoints) string {
12+
return strings.Join([]string{
13+
version.ListContainersEndpoint(),
14+
version.ContainerInspectEndpoint("CONTAINER_ID"),
15+
version.TasksEndpoint(),
16+
version.ServicesEndpoint(),
17+
version.NodesEndpoint(),
18+
version.NetworkInspectEndpoint("NETWORK_ID"),
19+
}, "\n")
20+
}
21+
22+
assert.Equal(t, "\n"+urls(DefaultVersion), `
23+
/v1.48/containers/json
24+
/v1.48/containers/CONTAINER_ID/json
25+
/v1.48/tasks?filters=%7B%22desired-state%22%3A%5B%22running%22%5D%7D
26+
/v1.48/services
27+
/v1.48/nodes
28+
/v1.48/networks/NETWORK_ID`)
29+
30+
assert.Equal(t, "\n"+urls(EndpointVersion("1.69")), `
31+
/v1.69/containers/json
32+
/v1.69/containers/CONTAINER_ID/json
33+
/v1.69/tasks?filters=%7B%22desired-state%22%3A%5B%22running%22%5D%7D
34+
/v1.69/services
35+
/v1.69/nodes
36+
/v1.69/networks/NETWORK_ID`)
37+
}

0 commit comments

Comments
 (0)