File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package udocker
22
33var (
4- DefaultVersion = EndpointVersion ("1.24" )
4+ // API version 1.48 = Docker 28.0 = 2025-02
5+ DefaultVersion = EndpointVersion ("1.48" )
56)
67
78type VersionedEndpoints struct {
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments