• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dhui / dktest / 17080458550

19 Aug 2025 08:00PM UTC coverage: 58.636% (-7.5%) from 66.136%
17080458550

Pull #45

github

dhui
Support Go 1.25 and drop support for Go 1.23
Pull Request #45: Support Go 1.25 and drop support for Go 1.23

258 of 440 relevant lines covered (58.64%)

64.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/mockdockerclient/image_api_client.go
1
package mockdockerclient
2

3
import (
4
        "context"
5
        "io"
6

7
        "github.com/docker/docker/api/types"
8
        "github.com/docker/docker/api/types/filters"
9
        "github.com/docker/docker/api/types/image"
10
        "github.com/docker/docker/api/types/registry"
11
)
12

13
// ImageAPIClient is a mock implementation of the Docker's client.ImageAPIClient interface
14
type ImageAPIClient struct {
15
        PullResp io.ReadCloser
16
}
17

18
// ImageBuild is a mock implementation of Docker's client.ImageAPIClient.ImageBuild()
19
//
20
// TODO: properly implement
21
func (c *ImageAPIClient) ImageBuild(context.Context, io.Reader,
22
        types.ImageBuildOptions) (types.ImageBuildResponse, error) {
23
        return types.ImageBuildResponse{}, nil
24
}
25

×
26
// BuildCachePrune is a mock implementation of Docker's client.ImageAPIClient.BuildCachePrune()
×
27
//
×
28
// TODO: properly implement
29
func (c *ImageAPIClient) BuildCachePrune(context.Context,
30
        types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) {
31
        return nil, nil
32
}
33

×
34
// BuildCancel is a mock implementation of Docker's client.ImageAPIClient.BuildCancel()
×
35
//
×
36
// TODO: properly implement
37
func (c *ImageAPIClient) BuildCancel(context.Context, string) error { return nil }
38

39
// ImageCreate is a mock implementation of Docker's client.ImageAPIClient.ImageCreate()
40
//
×
41
// TODO: properly implement
42
func (c *ImageAPIClient) ImageCreate(context.Context, string,
43
        image.CreateOptions) (io.ReadCloser, error) {
44
        return nil, nil
45
}
46

×
47
// ImageHistory is a mock implementation of Docker's client.ImageAPIClient.ImageHistory()
×
48
//
×
49
// TODO: properly implement
50
func (c *ImageAPIClient) ImageHistory(context.Context, string) ([]image.HistoryResponseItem, error) {
51
        return nil, nil
52
}
53

×
54
// ImageImport is a mock implementation of Docker's client.ImageAPIClient.ImageImport()
×
55
//
×
56
// TODO: properly implement
57
func (c *ImageAPIClient) ImageImport(context.Context, image.ImportSource, string,
58
        image.ImportOptions) (io.ReadCloser, error) {
59
        return nil, nil
60
}
61

×
62
// ImageInspectWithRaw is a mock implementation of Docker's client.ImageAPIClient.ImageInspectWithRaw()
×
63
//
×
64
// TODO: properly implement
65
func (c *ImageAPIClient) ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error) {
66
        return types.ImageInspect{}, nil, nil
67
}
68

×
69
// ImageList is a mock implementation of Docker's client.ImageAPIClient.ImageList()
×
70
//
×
71
// TODO: properly implement
72
func (c *ImageAPIClient) ImageList(context.Context, image.ListOptions) ([]image.Summary, error) {
73
        return nil, nil
74
}
75

×
76
// ImageLoad is a mock implementation of Docker's client.ImageAPIClient.ImageLoad()
×
77
//
×
78
// TODO: properly implement
79
func (c *ImageAPIClient) ImageLoad(context.Context, io.Reader, bool) (image.LoadResponse, error) {
80
        return image.LoadResponse{}, nil
81
}
82

×
83
// ImagePull is a mock implementation of Docker's client.ImageAPIClient.ImagePull()
×
84
func (c *ImageAPIClient) ImagePull(context.Context, string, image.PullOptions) (io.ReadCloser, error) {
×
85
        if c.PullResp == nil {
86
                return nil, Err
87
        }
×
88
        return c.PullResp, nil
×
89
}
×
90

×
91
// ImagePush is a mock implementation of Docker's client.ImageAPIClient.ImagePush()
×
92
//
93
// TODO: properly implement
94
func (c *ImageAPIClient) ImagePush(context.Context, string, image.PushOptions) (io.ReadCloser, error) {
95
        return nil, nil
96
}
97

×
98
// ImageRemove is a mock implementation of Docker's client.ImageAPIClient.ImageRemove()
×
99
//
×
100
// TODO: properly implement
101
func (c *ImageAPIClient) ImageRemove(context.Context, string,
102
        image.RemoveOptions) ([]image.DeleteResponse, error) {
103
        return nil, nil
104
}
105

×
106
// ImageSearch is a mock implementation of Docker's client.ImageAPIClient.ImageSearch()
×
107
//
×
108
// TODO: properly implement
109
func (c *ImageAPIClient) ImageSearch(context.Context, string,
110
        registry.SearchOptions) ([]registry.SearchResult, error) {
111
        return nil, nil
112
}
113

×
114
// ImageSave is a mock implementation of Docker's client.ImageAPIClient.ImageSave()
×
115
//
×
116
// TODO: properly implement
117
func (c *ImageAPIClient) ImageSave(context.Context, []string) (io.ReadCloser, error) {
118
        return nil, nil
119
}
120

×
121
// ImageTag is a mock implementation of Docker's client.ImageAPIClient.ImageTag()
×
122
//
×
123
// TODO: properly implement
124
func (c *ImageAPIClient) ImageTag(context.Context, string, string) error { return nil }
125

126
// ImagesPrune is a mock implementation of Docker's client.ImageAPIClient.ImagesPrune()
127
//
×
128
// TODO: properly implement
129
func (c *ImageAPIClient) ImagesPrune(context.Context, filters.Args) (image.PruneReport, error) {
130
        return image.PruneReport{}, nil
131
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc