From 24de3363bfaa06278e2c8bf4cebec952d17afb27 Mon Sep 17 00:00:00 2001 From: Alexei Ledenev Date: Thu, 7 Sep 2023 12:18:21 +0300 Subject: [PATCH] bump Go and Linter version; update vulnarable packages --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yaml | 2 +- Makefile | 2 +- docker/Dockerfile | 2 +- go.mod | 41 ++- go.sum | 153 +++------ mocks/APIClient.go | 523 +++++++++++++++++++++++-------- mocks/ContainerAPIClient.go | 158 +++++++--- mocks/ImageAPIClient.go | 88 +++++- pkg/container/docker_client.go | 8 +- pkg/container/mock_Client.go | 30 +- pkg/container/mock_FilterFunc.go | 16 +- 12 files changed, 687 insertions(+), 338 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 170f1a9f..80d784f5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: - name: setup Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: lint and test shell: sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9babf773..2e4c9c17 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ jobs: build: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest - container: golang:1.19-alpine + container: golang:1.21-alpine steps: - name: checkout diff --git a/Makefile b/Makefile index 7d8c171f..4301317c 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ release: clean ; $(info $(M) building binaries for multiple os/arch...) @ ## Bui setup-tools: setup-lint setup-gocov setup-gocov-xml setup-go-junit-report setup-lint: - $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 + $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 setup-gocov: $(GO) install github.com/axw/gocov/gocov@v1.1.0 setup-gocov-xml: diff --git a/docker/Dockerfile b/docker/Dockerfile index 04578539..73c02a0e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # # ----- Go Builder Image ------ # -FROM --platform=$BUILDPLATFORM golang:1.19 AS builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder # curl git bash RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/go.mod b/go.mod index b5eecbe1..52fd25ec 100644 --- a/go.mod +++ b/go.mod @@ -1,43 +1,42 @@ module github.com/alexei-led/pumba require ( - github.com/docker/docker v20.10.10+incompatible + github.com/docker/docker v23.0.3+incompatible github.com/docker/go-connections v0.4.0 github.com/johntdyer/slackrus v0.0.0-20210521205746-42486fb4c48c - github.com/opencontainers/image-spec v1.0.2 + github.com/opencontainers/image-spec v1.1.0-rc4 github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.9.0 - github.com/stretchr/testify v1.8.1 - github.com/urfave/cli v1.22.10 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + github.com/sirupsen/logrus v1.9.3 + github.com/stretchr/testify v1.8.4 + github.com/urfave/cli v1.22.12 + golang.org/x/sync v0.3.0 ) require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/containerd/containerd v1.5.16 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.8.0+incompatible // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.0 // indirect - github.com/gorilla/mux v1.8.0 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22 // indirect - github.com/kr/pretty v0.2.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/stretchr/objx v0.5.0 // indirect - golang.org/x/net v0.0.0-20211111083644-e5c967477495 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect - google.golang.org/grpc v1.33.2 // indirect - google.golang.org/protobuf v1.27.1 // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/time v0.1.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.0.2 // indirect ) -go 1.19 +go 1.21 diff --git a/go.sum b/go.sum index b9bb0146..9b67bd95 100644 --- a/go.sum +++ b/go.sum @@ -1,193 +1,120 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/containerd/containerd v1.5.16 h1:WsTS9tV0vQmRxkWAiiaoasHJ20jqVxVA15s93Bs4GIU= -github.com/containerd/containerd v1.5.16/go.mod h1:bVZZA+0blg2Lw6+I4xDml7L3gum0LsFKe3TnFELlSFw= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= -github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.10+incompatible h1:GKkP0T7U4ks6X3lmmHKC2QDprnpRJor2Z5a8m62R9ZM= -github.com/docker/docker v20.10.10+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= +github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22 h1:jKUP9TQ0c7X3w6+IPyMit07RE42MtTWNd77sN2cHngQ= github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22/go.mod h1:u0Jo4f2dNlTJeeOywkM6bLwxq6gC3pZ9rEFHn3AhTdk= github.com/johntdyer/slackrus v0.0.0-20210521205746-42486fb4c48c h1:4eD0DM7IEOQI5egyzKdPXncs61BxMtYwwzJPCRQFU0Y= github.com/johntdyer/slackrus v0.0.0-20210521205746-42486fb4c48c/go.mod h1:j1kV/8f3jowErEq4XyeypkCdvg5EeHkf0YCKCcq5Ybo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= +github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk= -github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= +github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20211111083644-e5c967477495 h1:cjxxlQm6d4kYbhpZ2ghvmI8xnq0AG+jXmzrhzfkyu5A= -golang.org/x/net v0.0.0-20211111083644-e5c967477495/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/mocks/APIClient.go b/mocks/APIClient.go index e7d756d5..7a873df9 100644 --- a/mocks/APIClient.go +++ b/mocks/APIClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.30.16. DO NOT EDIT. package mocks @@ -27,8 +27,6 @@ import ( swarm "github.com/docker/docker/api/types/swarm" - time "time" - types "github.com/docker/docker/api/types" v1 "github.com/opencontainers/image-spec/specs-go/v1" @@ -46,6 +44,10 @@ func (_m *APIClient) BuildCachePrune(ctx context.Context, opts types.BuildCacheP ret := _m.Called(ctx, opts) var r0 *types.BuildCachePruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)); ok { + return rf(ctx, opts) + } if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) *types.BuildCachePruneReport); ok { r0 = rf(ctx, opts) } else { @@ -54,7 +56,6 @@ func (_m *APIClient) BuildCachePrune(ctx context.Context, opts types.BuildCacheP } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.BuildCachePruneOptions) error); ok { r1 = rf(ctx, opts) } else { @@ -111,6 +112,10 @@ func (_m *APIClient) CheckpointList(ctx context.Context, _a1 string, options typ ret := _m.Called(ctx, _a1, options) var r0 []types.Checkpoint + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointListOptions) ([]types.Checkpoint, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.CheckpointListOptions) []types.Checkpoint); ok { r0 = rf(ctx, _a1, options) } else { @@ -119,7 +124,6 @@ func (_m *APIClient) CheckpointList(ctx context.Context, _a1 string, options typ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.CheckpointListOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -162,13 +166,16 @@ func (_m *APIClient) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) ret := _m.Called(ctx, config) var r0 types.ConfigCreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, swarm.ConfigSpec) (types.ConfigCreateResponse, error)); ok { + return rf(ctx, config) + } if rf, ok := ret.Get(0).(func(context.Context, swarm.ConfigSpec) types.ConfigCreateResponse); ok { r0 = rf(ctx, config) } else { r0 = ret.Get(0).(types.ConfigCreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, swarm.ConfigSpec) error); ok { r1 = rf(ctx, config) } else { @@ -183,13 +190,17 @@ func (_m *APIClient) ConfigInspectWithRaw(ctx context.Context, name string) (swa ret := _m.Called(ctx, name) var r0 swarm.Config + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Config, []byte, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Config); ok { r0 = rf(ctx, name) } else { r0 = ret.Get(0).(swarm.Config) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, name) } else { @@ -198,7 +209,6 @@ func (_m *APIClient) ConfigInspectWithRaw(ctx context.Context, name string) (swa } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, name) } else { @@ -213,6 +223,10 @@ func (_m *APIClient) ConfigList(ctx context.Context, options types.ConfigListOpt ret := _m.Called(ctx, options) var r0 []swarm.Config + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ConfigListOptions) ([]swarm.Config, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ConfigListOptions) []swarm.Config); ok { r0 = rf(ctx, options) } else { @@ -221,7 +235,6 @@ func (_m *APIClient) ConfigList(ctx context.Context, options types.ConfigListOpt } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ConfigListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -264,13 +277,16 @@ func (_m *APIClient) ContainerAttach(ctx context.Context, _a1 string, options ty ret := _m.Called(ctx, _a1, options) var r0 types.HijackedResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) (types.HijackedResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) types.HijackedResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.HijackedResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerAttachOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -285,13 +301,16 @@ func (_m *APIClient) ContainerCommit(ctx context.Context, _a1 string, options ty ret := _m.Called(ctx, _a1, options) var r0 types.IDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) (types.IDResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) types.IDResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.IDResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerCommitOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -302,17 +321,20 @@ func (_m *APIClient) ContainerCommit(ctx context.Context, _a1 string, options ty } // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName -func (_m *APIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.ContainerCreateCreatedBody, error) { +func (_m *APIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error) { ret := _m.Called(ctx, config, hostConfig, networkingConfig, platform, containerName) - var r0 container.ContainerCreateCreatedBody - if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.ContainerCreateCreatedBody); ok { + var r0 container.CreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) (container.CreateResponse, error)); ok { + return rf(ctx, config, hostConfig, networkingConfig, platform, containerName) + } + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.CreateResponse); ok { r0 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) } else { - r0 = ret.Get(0).(container.ContainerCreateCreatedBody) + r0 = ret.Get(0).(container.CreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) error); ok { r1 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) } else { @@ -327,6 +349,10 @@ func (_m *APIClient) ContainerDiff(ctx context.Context, _a1 string) ([]container ret := _m.Called(ctx, _a1) var r0 []container.ContainerChangeResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]container.ContainerChangeResponseItem, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) []container.ContainerChangeResponseItem); ok { r0 = rf(ctx, _a1) } else { @@ -335,7 +361,6 @@ func (_m *APIClient) ContainerDiff(ctx context.Context, _a1 string) ([]container } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -350,13 +375,16 @@ func (_m *APIClient) ContainerExecAttach(ctx context.Context, execID string, con ret := _m.Called(ctx, execID, config) var r0 types.HijackedResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) (types.HijackedResponse, error)); ok { + return rf(ctx, execID, config) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) types.HijackedResponse); ok { r0 = rf(ctx, execID, config) } else { r0 = ret.Get(0).(types.HijackedResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecStartCheck) error); ok { r1 = rf(ctx, execID, config) } else { @@ -371,13 +399,16 @@ func (_m *APIClient) ContainerExecCreate(ctx context.Context, _a1 string, config ret := _m.Called(ctx, _a1, config) var r0 types.IDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) (types.IDResponse, error)); ok { + return rf(ctx, _a1, config) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) types.IDResponse); ok { r0 = rf(ctx, _a1, config) } else { r0 = ret.Get(0).(types.IDResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecConfig) error); ok { r1 = rf(ctx, _a1, config) } else { @@ -392,13 +423,16 @@ func (_m *APIClient) ContainerExecInspect(ctx context.Context, execID string) (t ret := _m.Called(ctx, execID) var r0 types.ContainerExecInspect + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerExecInspect, error)); ok { + return rf(ctx, execID) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerExecInspect); ok { r0 = rf(ctx, execID) } else { r0 = ret.Get(0).(types.ContainerExecInspect) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, execID) } else { @@ -441,6 +475,10 @@ func (_m *APIClient) ContainerExport(ctx context.Context, _a1 string) (io.ReadCl ret := _m.Called(ctx, _a1) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok { r0 = rf(ctx, _a1) } else { @@ -449,7 +487,6 @@ func (_m *APIClient) ContainerExport(ctx context.Context, _a1 string) (io.ReadCl } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -464,13 +501,16 @@ func (_m *APIClient) ContainerInspect(ctx context.Context, _a1 string) (types.Co ret := _m.Called(ctx, _a1) var r0 types.ContainerJSON + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerJSON, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ContainerJSON) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -485,13 +525,17 @@ func (_m *APIClient) ContainerInspectWithRaw(ctx context.Context, _a1 string, ge ret := _m.Called(ctx, _a1, getSize) var r0 types.ContainerJSON + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerJSON, []byte, error)); ok { + return rf(ctx, _a1, getSize) + } if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerJSON); ok { r0 = rf(ctx, _a1, getSize) } else { r0 = ret.Get(0).(types.ContainerJSON) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string, bool) []byte); ok { r1 = rf(ctx, _a1, getSize) } else { @@ -500,7 +544,6 @@ func (_m *APIClient) ContainerInspectWithRaw(ctx context.Context, _a1 string, ge } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, bool) error); ok { r2 = rf(ctx, _a1, getSize) } else { @@ -529,6 +572,10 @@ func (_m *APIClient) ContainerList(ctx context.Context, options types.ContainerL ret := _m.Called(ctx, options) var r0 []types.Container + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) ([]types.Container, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) []types.Container); ok { r0 = rf(ctx, options) } else { @@ -537,7 +584,6 @@ func (_m *APIClient) ContainerList(ctx context.Context, options types.ContainerL } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ContainerListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -552,6 +598,10 @@ func (_m *APIClient) ContainerLogs(ctx context.Context, _a1 string, options type ret := _m.Called(ctx, _a1, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { r0 = rf(ctx, _a1, options) } else { @@ -560,7 +610,6 @@ func (_m *APIClient) ContainerLogs(ctx context.Context, _a1 string, options type } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -626,13 +675,13 @@ func (_m *APIClient) ContainerResize(ctx context.Context, _a1 string, options ty return r0 } -// ContainerRestart provides a mock function with given fields: ctx, _a1, timeout -func (_m *APIClient) ContainerRestart(ctx context.Context, _a1 string, timeout *time.Duration) error { - ret := _m.Called(ctx, _a1, timeout) +// ContainerRestart provides a mock function with given fields: ctx, _a1, options +func (_m *APIClient) ContainerRestart(ctx context.Context, _a1 string, options container.StopOptions) error { + ret := _m.Called(ctx, _a1, options) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, *time.Duration) error); ok { - r0 = rf(ctx, _a1, timeout) + if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { + r0 = rf(ctx, _a1, options) } else { r0 = ret.Error(0) } @@ -659,13 +708,16 @@ func (_m *APIClient) ContainerStatPath(ctx context.Context, _a1 string, path str ret := _m.Called(ctx, _a1, path) var r0 types.ContainerPathStat + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (types.ContainerPathStat, error)); ok { + return rf(ctx, _a1, path) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) types.ContainerPathStat); ok { r0 = rf(ctx, _a1, path) } else { r0 = ret.Get(0).(types.ContainerPathStat) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, _a1, path) } else { @@ -680,13 +732,16 @@ func (_m *APIClient) ContainerStats(ctx context.Context, _a1 string, stream bool ret := _m.Called(ctx, _a1, stream) var r0 types.ContainerStats + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerStats, error)); ok { + return rf(ctx, _a1, stream) + } if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerStats); ok { r0 = rf(ctx, _a1, stream) } else { r0 = ret.Get(0).(types.ContainerStats) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { r1 = rf(ctx, _a1, stream) } else { @@ -701,13 +756,16 @@ func (_m *APIClient) ContainerStatsOneShot(ctx context.Context, _a1 string) (typ ret := _m.Called(ctx, _a1) var r0 types.ContainerStats + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerStats, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerStats); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ContainerStats) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -717,13 +775,13 @@ func (_m *APIClient) ContainerStatsOneShot(ctx context.Context, _a1 string) (typ return r0, r1 } -// ContainerStop provides a mock function with given fields: ctx, _a1, timeout -func (_m *APIClient) ContainerStop(ctx context.Context, _a1 string, timeout *time.Duration) error { - ret := _m.Called(ctx, _a1, timeout) +// ContainerStop provides a mock function with given fields: ctx, _a1, options +func (_m *APIClient) ContainerStop(ctx context.Context, _a1 string, options container.StopOptions) error { + ret := _m.Called(ctx, _a1, options) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, *time.Duration) error); ok { - r0 = rf(ctx, _a1, timeout) + if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { + r0 = rf(ctx, _a1, options) } else { r0 = ret.Error(0) } @@ -736,13 +794,16 @@ func (_m *APIClient) ContainerTop(ctx context.Context, _a1 string, arguments []s ret := _m.Called(ctx, _a1, arguments) var r0 container.ContainerTopOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, []string) (container.ContainerTopOKBody, error)); ok { + return rf(ctx, _a1, arguments) + } if rf, ok := ret.Get(0).(func(context.Context, string, []string) container.ContainerTopOKBody); ok { r0 = rf(ctx, _a1, arguments) } else { r0 = ret.Get(0).(container.ContainerTopOKBody) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok { r1 = rf(ctx, _a1, arguments) } else { @@ -771,13 +832,16 @@ func (_m *APIClient) ContainerUpdate(ctx context.Context, _a1 string, updateConf ret := _m.Called(ctx, _a1, updateConfig) var r0 container.ContainerUpdateOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)); ok { + return rf(ctx, _a1, updateConfig) + } if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) container.ContainerUpdateOKBody); ok { r0 = rf(ctx, _a1, updateConfig) } else { r0 = ret.Get(0).(container.ContainerUpdateOKBody) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, container.UpdateConfig) error); ok { r1 = rf(ctx, _a1, updateConfig) } else { @@ -788,19 +852,22 @@ func (_m *APIClient) ContainerUpdate(ctx context.Context, _a1 string, updateConf } // ContainerWait provides a mock function with given fields: ctx, _a1, condition -func (_m *APIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) { +func (_m *APIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { ret := _m.Called(ctx, _a1, condition) - var r0 <-chan container.ContainerWaitOKBody - if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.ContainerWaitOKBody); ok { + var r0 <-chan container.WaitResponse + var r1 <-chan error + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)); ok { + return rf(ctx, _a1, condition) + } + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.WaitResponse); ok { r0 = rf(ctx, _a1, condition) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan container.ContainerWaitOKBody) + r0 = ret.Get(0).(<-chan container.WaitResponse) } } - var r1 <-chan error if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { r1 = rf(ctx, _a1, condition) } else { @@ -817,13 +884,16 @@ func (_m *APIClient) ContainersPrune(ctx context.Context, pruneFilters filters.A ret := _m.Called(ctx, pruneFilters) var r0 types.ContainersPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ContainersPruneReport, error)); ok { + return rf(ctx, pruneFilters) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ContainersPruneReport); ok { r0 = rf(ctx, pruneFilters) } else { r0 = ret.Get(0).(types.ContainersPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilters) } else { @@ -838,6 +908,11 @@ func (_m *APIClient) CopyFromContainer(ctx context.Context, _a1 string, srcPath ret := _m.Called(ctx, _a1, srcPath) var r0 io.ReadCloser + var r1 types.ContainerPathStat + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.ReadCloser, types.ContainerPathStat, error)); ok { + return rf(ctx, _a1, srcPath) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { r0 = rf(ctx, _a1, srcPath) } else { @@ -846,14 +921,12 @@ func (_m *APIClient) CopyFromContainer(ctx context.Context, _a1 string, srcPath } } - var r1 types.ContainerPathStat if rf, ok := ret.Get(1).(func(context.Context, string, string) types.ContainerPathStat); ok { r1 = rf(ctx, _a1, srcPath) } else { r1 = ret.Get(1).(types.ContainerPathStat) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok { r2 = rf(ctx, _a1, srcPath) } else { @@ -896,6 +969,10 @@ func (_m *APIClient) DialHijack(ctx context.Context, url string, proto string, m ret := _m.Called(ctx, url, proto, meta) var r0 net.Conn + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string][]string) (net.Conn, error)); ok { + return rf(ctx, url, proto, meta) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string][]string) net.Conn); ok { r0 = rf(ctx, url, proto, meta) } else { @@ -904,7 +981,6 @@ func (_m *APIClient) DialHijack(ctx context.Context, url string, proto string, m } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string][]string) error); ok { r1 = rf(ctx, url, proto, meta) } else { @@ -930,20 +1006,23 @@ func (_m *APIClient) Dialer() func(context.Context) (net.Conn, error) { return r0 } -// DiskUsage provides a mock function with given fields: ctx -func (_m *APIClient) DiskUsage(ctx context.Context) (types.DiskUsage, error) { - ret := _m.Called(ctx) +// DiskUsage provides a mock function with given fields: ctx, options +func (_m *APIClient) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) { + ret := _m.Called(ctx, options) var r0 types.DiskUsage - if rf, ok := ret.Get(0).(func(context.Context) types.DiskUsage); ok { - r0 = rf(ctx) + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.DiskUsageOptions) (types.DiskUsage, error)); ok { + return rf(ctx, options) + } + if rf, ok := ret.Get(0).(func(context.Context, types.DiskUsageOptions) types.DiskUsage); ok { + r0 = rf(ctx, options) } else { r0 = ret.Get(0).(types.DiskUsage) } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) + if rf, ok := ret.Get(1).(func(context.Context, types.DiskUsageOptions) error); ok { + r1 = rf(ctx, options) } else { r1 = ret.Error(1) } @@ -956,13 +1035,16 @@ func (_m *APIClient) DistributionInspect(ctx context.Context, _a1 string, encode ret := _m.Called(ctx, _a1, encodedRegistryAuth) var r0 registry.DistributionInspect + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (registry.DistributionInspect, error)); ok { + return rf(ctx, _a1, encodedRegistryAuth) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) registry.DistributionInspect); ok { r0 = rf(ctx, _a1, encodedRegistryAuth) } else { r0 = ret.Get(0).(registry.DistributionInspect) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, _a1, encodedRegistryAuth) } else { @@ -977,6 +1059,10 @@ func (_m *APIClient) Events(ctx context.Context, options types.EventsOptions) (< ret := _m.Called(ctx, options) var r0 <-chan events.Message + var r1 <-chan error + if rf, ok := ret.Get(0).(func(context.Context, types.EventsOptions) (<-chan events.Message, <-chan error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.EventsOptions) <-chan events.Message); ok { r0 = rf(ctx, options) } else { @@ -985,7 +1071,6 @@ func (_m *APIClient) Events(ctx context.Context, options types.EventsOptions) (< } } - var r1 <-chan error if rf, ok := ret.Get(1).(func(context.Context, types.EventsOptions) <-chan error); ok { r1 = rf(ctx, options) } else { @@ -1018,13 +1103,16 @@ func (_m *APIClient) ImageBuild(ctx context.Context, _a1 io.Reader, options type ret := _m.Called(ctx, _a1, options) var r0 types.ImageBuildResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) types.ImageBuildResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.ImageBuildResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, io.Reader, types.ImageBuildOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -1039,6 +1127,10 @@ func (_m *APIClient) ImageCreate(ctx context.Context, parentReference string, op ret := _m.Called(ctx, parentReference, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) (io.ReadCloser, error)); ok { + return rf(ctx, parentReference, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) io.ReadCloser); ok { r0 = rf(ctx, parentReference, options) } else { @@ -1047,7 +1139,6 @@ func (_m *APIClient) ImageCreate(ctx context.Context, parentReference string, op } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageCreateOptions) error); ok { r1 = rf(ctx, parentReference, options) } else { @@ -1062,6 +1153,10 @@ func (_m *APIClient) ImageHistory(ctx context.Context, _a1 string) ([]image.Hist ret := _m.Called(ctx, _a1) var r0 []image.HistoryResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]image.HistoryResponseItem, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) []image.HistoryResponseItem); ok { r0 = rf(ctx, _a1) } else { @@ -1070,7 +1165,6 @@ func (_m *APIClient) ImageHistory(ctx context.Context, _a1 string) ([]image.Hist } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -1085,6 +1179,10 @@ func (_m *APIClient) ImageImport(ctx context.Context, source types.ImageImportSo ret := _m.Called(ctx, source, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) (io.ReadCloser, error)); ok { + return rf(ctx, source, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) io.ReadCloser); ok { r0 = rf(ctx, source, ref, options) } else { @@ -1093,7 +1191,6 @@ func (_m *APIClient) ImageImport(ctx context.Context, source types.ImageImportSo } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) error); ok { r1 = rf(ctx, source, ref, options) } else { @@ -1108,13 +1205,17 @@ func (_m *APIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) (types ret := _m.Called(ctx, _a1) var r0 types.ImageInspect + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ImageInspect, []byte, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ImageInspect) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, _a1) } else { @@ -1123,7 +1224,6 @@ func (_m *APIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) (types } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, _a1) } else { @@ -1138,6 +1238,10 @@ func (_m *APIClient) ImageList(ctx context.Context, options types.ImageListOptio ret := _m.Called(ctx, options) var r0 []types.ImageSummary + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) ([]types.ImageSummary, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) []types.ImageSummary); ok { r0 = rf(ctx, options) } else { @@ -1146,7 +1250,6 @@ func (_m *APIClient) ImageList(ctx context.Context, options types.ImageListOptio } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ImageListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -1161,13 +1264,16 @@ func (_m *APIClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) ret := _m.Called(ctx, input, quiet) var r0 types.ImageLoadResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) (types.ImageLoadResponse, error)); ok { + return rf(ctx, input, quiet) + } if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) types.ImageLoadResponse); ok { r0 = rf(ctx, input, quiet) } else { r0 = ret.Get(0).(types.ImageLoadResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, io.Reader, bool) error); ok { r1 = rf(ctx, input, quiet) } else { @@ -1182,6 +1288,10 @@ func (_m *APIClient) ImagePull(ctx context.Context, ref string, options types.Im ret := _m.Called(ctx, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) (io.ReadCloser, error)); ok { + return rf(ctx, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) io.ReadCloser); ok { r0 = rf(ctx, ref, options) } else { @@ -1190,7 +1300,6 @@ func (_m *APIClient) ImagePull(ctx context.Context, ref string, options types.Im } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePullOptions) error); ok { r1 = rf(ctx, ref, options) } else { @@ -1205,6 +1314,10 @@ func (_m *APIClient) ImagePush(ctx context.Context, ref string, options types.Im ret := _m.Called(ctx, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) (io.ReadCloser, error)); ok { + return rf(ctx, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) io.ReadCloser); ok { r0 = rf(ctx, ref, options) } else { @@ -1213,7 +1326,6 @@ func (_m *APIClient) ImagePush(ctx context.Context, ref string, options types.Im } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePushOptions) error); ok { r1 = rf(ctx, ref, options) } else { @@ -1228,6 +1340,10 @@ func (_m *APIClient) ImageRemove(ctx context.Context, _a1 string, options types. ret := _m.Called(ctx, _a1, options) var r0 []types.ImageDeleteResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) []types.ImageDeleteResponseItem); ok { r0 = rf(ctx, _a1, options) } else { @@ -1236,7 +1352,6 @@ func (_m *APIClient) ImageRemove(ctx context.Context, _a1 string, options types. } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageRemoveOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -1251,6 +1366,10 @@ func (_m *APIClient) ImageSave(ctx context.Context, images []string) (io.ReadClo ret := _m.Called(ctx, images) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []string) (io.ReadCloser, error)); ok { + return rf(ctx, images) + } if rf, ok := ret.Get(0).(func(context.Context, []string) io.ReadCloser); ok { r0 = rf(ctx, images) } else { @@ -1259,7 +1378,6 @@ func (_m *APIClient) ImageSave(ctx context.Context, images []string) (io.ReadClo } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { r1 = rf(ctx, images) } else { @@ -1274,6 +1392,10 @@ func (_m *APIClient) ImageSearch(ctx context.Context, term string, options types ret := _m.Called(ctx, term, options) var r0 []registry.SearchResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) ([]registry.SearchResult, error)); ok { + return rf(ctx, term, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) []registry.SearchResult); ok { r0 = rf(ctx, term, options) } else { @@ -1282,7 +1404,6 @@ func (_m *APIClient) ImageSearch(ctx context.Context, term string, options types } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageSearchOptions) error); ok { r1 = rf(ctx, term, options) } else { @@ -1311,13 +1432,16 @@ func (_m *APIClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) ret := _m.Called(ctx, pruneFilter) var r0 types.ImagesPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ImagesPruneReport, error)); ok { + return rf(ctx, pruneFilter) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ImagesPruneReport); ok { r0 = rf(ctx, pruneFilter) } else { r0 = ret.Get(0).(types.ImagesPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilter) } else { @@ -1332,13 +1456,16 @@ func (_m *APIClient) Info(ctx context.Context) (types.Info, error) { ret := _m.Called(ctx) var r0 types.Info + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (types.Info, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) types.Info); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(types.Info) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -1377,13 +1504,16 @@ func (_m *APIClient) NetworkCreate(ctx context.Context, name string, options typ ret := _m.Called(ctx, name, options) var r0 types.NetworkCreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) (types.NetworkCreateResponse, error)); ok { + return rf(ctx, name, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) types.NetworkCreateResponse); ok { r0 = rf(ctx, name, options) } else { r0 = ret.Get(0).(types.NetworkCreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkCreate) error); ok { r1 = rf(ctx, name, options) } else { @@ -1412,13 +1542,16 @@ func (_m *APIClient) NetworkInspect(ctx context.Context, _a1 string, options typ ret := _m.Called(ctx, _a1, options) var r0 types.NetworkResource + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) (types.NetworkResource, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) types.NetworkResource); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.NetworkResource) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkInspectOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -1433,13 +1566,17 @@ func (_m *APIClient) NetworkInspectWithRaw(ctx context.Context, _a1 string, opti ret := _m.Called(ctx, _a1, options) var r0 types.NetworkResource + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) (types.NetworkResource, []byte, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkInspectOptions) types.NetworkResource); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.NetworkResource) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkInspectOptions) []byte); ok { r1 = rf(ctx, _a1, options) } else { @@ -1448,7 +1585,6 @@ func (_m *APIClient) NetworkInspectWithRaw(ctx context.Context, _a1 string, opti } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, types.NetworkInspectOptions) error); ok { r2 = rf(ctx, _a1, options) } else { @@ -1463,6 +1599,10 @@ func (_m *APIClient) NetworkList(ctx context.Context, options types.NetworkListO ret := _m.Called(ctx, options) var r0 []types.NetworkResource + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) ([]types.NetworkResource, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok { r0 = rf(ctx, options) } else { @@ -1471,7 +1611,6 @@ func (_m *APIClient) NetworkList(ctx context.Context, options types.NetworkListO } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -1500,13 +1639,16 @@ func (_m *APIClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args ret := _m.Called(ctx, pruneFilter) var r0 types.NetworksPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.NetworksPruneReport, error)); ok { + return rf(ctx, pruneFilter) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.NetworksPruneReport); ok { r0 = rf(ctx, pruneFilter) } else { r0 = ret.Get(0).(types.NetworksPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilter) } else { @@ -1521,13 +1663,17 @@ func (_m *APIClient) NodeInspectWithRaw(ctx context.Context, nodeID string) (swa ret := _m.Called(ctx, nodeID) var r0 swarm.Node + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Node, []byte, error)); ok { + return rf(ctx, nodeID) + } if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Node); ok { r0 = rf(ctx, nodeID) } else { r0 = ret.Get(0).(swarm.Node) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, nodeID) } else { @@ -1536,7 +1682,6 @@ func (_m *APIClient) NodeInspectWithRaw(ctx context.Context, nodeID string) (swa } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, nodeID) } else { @@ -1551,6 +1696,10 @@ func (_m *APIClient) NodeList(ctx context.Context, options types.NodeListOptions ret := _m.Called(ctx, options) var r0 []swarm.Node + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.NodeListOptions) ([]swarm.Node, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.NodeListOptions) []swarm.Node); ok { r0 = rf(ctx, options) } else { @@ -1559,7 +1708,6 @@ func (_m *APIClient) NodeList(ctx context.Context, options types.NodeListOptions } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.NodeListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -1602,13 +1750,16 @@ func (_m *APIClient) Ping(ctx context.Context) (types.Ping, error) { ret := _m.Called(ctx) var r0 types.Ping + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (types.Ping, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) types.Ping); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(types.Ping) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -1665,6 +1816,11 @@ func (_m *APIClient) PluginInspectWithRaw(ctx context.Context, name string) (*ty ret := _m.Called(ctx, name) var r0 *types.Plugin + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*types.Plugin, []byte, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) *types.Plugin); ok { r0 = rf(ctx, name) } else { @@ -1673,7 +1829,6 @@ func (_m *APIClient) PluginInspectWithRaw(ctx context.Context, name string) (*ty } } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, name) } else { @@ -1682,7 +1837,6 @@ func (_m *APIClient) PluginInspectWithRaw(ctx context.Context, name string) (*ty } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, name) } else { @@ -1697,6 +1851,10 @@ func (_m *APIClient) PluginInstall(ctx context.Context, name string, options typ ret := _m.Called(ctx, name, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) (io.ReadCloser, error)); ok { + return rf(ctx, name, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) io.ReadCloser); ok { r0 = rf(ctx, name, options) } else { @@ -1705,7 +1863,6 @@ func (_m *APIClient) PluginInstall(ctx context.Context, name string, options typ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.PluginInstallOptions) error); ok { r1 = rf(ctx, name, options) } else { @@ -1720,6 +1877,10 @@ func (_m *APIClient) PluginList(ctx context.Context, filter filters.Args) (types ret := _m.Called(ctx, filter) var r0 types.PluginsListResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.PluginsListResponse, error)); ok { + return rf(ctx, filter) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.PluginsListResponse); ok { r0 = rf(ctx, filter) } else { @@ -1728,7 +1889,6 @@ func (_m *APIClient) PluginList(ctx context.Context, filter filters.Args) (types } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, filter) } else { @@ -1743,6 +1903,10 @@ func (_m *APIClient) PluginPush(ctx context.Context, name string, registryAuth s ret := _m.Called(ctx, name, registryAuth) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.ReadCloser, error)); ok { + return rf(ctx, name, registryAuth) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { r0 = rf(ctx, name, registryAuth) } else { @@ -1751,7 +1915,6 @@ func (_m *APIClient) PluginPush(ctx context.Context, name string, registryAuth s } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, name, registryAuth) } else { @@ -1794,6 +1957,10 @@ func (_m *APIClient) PluginUpgrade(ctx context.Context, name string, options typ ret := _m.Called(ctx, name, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) (io.ReadCloser, error)); ok { + return rf(ctx, name, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.PluginInstallOptions) io.ReadCloser); ok { r0 = rf(ctx, name, options) } else { @@ -1802,7 +1969,6 @@ func (_m *APIClient) PluginUpgrade(ctx context.Context, name string, options typ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.PluginInstallOptions) error); ok { r1 = rf(ctx, name, options) } else { @@ -1817,13 +1983,16 @@ func (_m *APIClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) ( ret := _m.Called(ctx, auth) var r0 registry.AuthenticateOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.AuthConfig) (registry.AuthenticateOKBody, error)); ok { + return rf(ctx, auth) + } if rf, ok := ret.Get(0).(func(context.Context, types.AuthConfig) registry.AuthenticateOKBody); ok { r0 = rf(ctx, auth) } else { r0 = ret.Get(0).(registry.AuthenticateOKBody) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.AuthConfig) error); ok { r1 = rf(ctx, auth) } else { @@ -1838,13 +2007,16 @@ func (_m *APIClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) ret := _m.Called(ctx, secret) var r0 types.SecretCreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, swarm.SecretSpec) (types.SecretCreateResponse, error)); ok { + return rf(ctx, secret) + } if rf, ok := ret.Get(0).(func(context.Context, swarm.SecretSpec) types.SecretCreateResponse); ok { r0 = rf(ctx, secret) } else { r0 = ret.Get(0).(types.SecretCreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, swarm.SecretSpec) error); ok { r1 = rf(ctx, secret) } else { @@ -1859,13 +2031,17 @@ func (_m *APIClient) SecretInspectWithRaw(ctx context.Context, name string) (swa ret := _m.Called(ctx, name) var r0 swarm.Secret + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Secret, []byte, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Secret); ok { r0 = rf(ctx, name) } else { r0 = ret.Get(0).(swarm.Secret) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, name) } else { @@ -1874,7 +2050,6 @@ func (_m *APIClient) SecretInspectWithRaw(ctx context.Context, name string) (swa } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, name) } else { @@ -1889,6 +2064,10 @@ func (_m *APIClient) SecretList(ctx context.Context, options types.SecretListOpt ret := _m.Called(ctx, options) var r0 []swarm.Secret + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.SecretListOptions) ([]swarm.Secret, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.SecretListOptions) []swarm.Secret); ok { r0 = rf(ctx, options) } else { @@ -1897,7 +2076,6 @@ func (_m *APIClient) SecretList(ctx context.Context, options types.SecretListOpt } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.SecretListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -1940,13 +2118,16 @@ func (_m *APIClient) ServerVersion(ctx context.Context) (types.Version, error) { ret := _m.Called(ctx) var r0 types.Version + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (types.Version, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) types.Version); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(types.Version) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -1961,13 +2142,16 @@ func (_m *APIClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpe ret := _m.Called(ctx, service, options) var r0 types.ServiceCreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) (types.ServiceCreateResponse, error)); ok { + return rf(ctx, service, options) + } if rf, ok := ret.Get(0).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) types.ServiceCreateResponse); ok { r0 = rf(ctx, service, options) } else { r0 = ret.Get(0).(types.ServiceCreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, swarm.ServiceSpec, types.ServiceCreateOptions) error); ok { r1 = rf(ctx, service, options) } else { @@ -1982,13 +2166,17 @@ func (_m *APIClient) ServiceInspectWithRaw(ctx context.Context, serviceID string ret := _m.Called(ctx, serviceID, options) var r0 swarm.Service + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ServiceInspectOptions) (swarm.Service, []byte, error)); ok { + return rf(ctx, serviceID, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ServiceInspectOptions) swarm.Service); ok { r0 = rf(ctx, serviceID, options) } else { r0 = ret.Get(0).(swarm.Service) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string, types.ServiceInspectOptions) []byte); ok { r1 = rf(ctx, serviceID, options) } else { @@ -1997,7 +2185,6 @@ func (_m *APIClient) ServiceInspectWithRaw(ctx context.Context, serviceID string } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, types.ServiceInspectOptions) error); ok { r2 = rf(ctx, serviceID, options) } else { @@ -2012,6 +2199,10 @@ func (_m *APIClient) ServiceList(ctx context.Context, options types.ServiceListO ret := _m.Called(ctx, options) var r0 []swarm.Service + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ServiceListOptions) ([]swarm.Service, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ServiceListOptions) []swarm.Service); ok { r0 = rf(ctx, options) } else { @@ -2020,7 +2211,6 @@ func (_m *APIClient) ServiceList(ctx context.Context, options types.ServiceListO } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ServiceListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -2035,6 +2225,10 @@ func (_m *APIClient) ServiceLogs(ctx context.Context, serviceID string, options ret := _m.Called(ctx, serviceID, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { + return rf(ctx, serviceID, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { r0 = rf(ctx, serviceID, options) } else { @@ -2043,7 +2237,6 @@ func (_m *APIClient) ServiceLogs(ctx context.Context, serviceID string, options } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { r1 = rf(ctx, serviceID, options) } else { @@ -2072,13 +2265,16 @@ func (_m *APIClient) ServiceUpdate(ctx context.Context, serviceID string, versio ret := _m.Called(ctx, serviceID, version, service, options) var r0 types.ServiceUpdateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)); ok { + return rf(ctx, serviceID, version, service, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) types.ServiceUpdateResponse); ok { r0 = rf(ctx, serviceID, version, service, options) } else { r0 = ret.Get(0).(types.ServiceUpdateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, swarm.Version, swarm.ServiceSpec, types.ServiceUpdateOptions) error); ok { r1 = rf(ctx, serviceID, version, service, options) } else { @@ -2093,13 +2289,16 @@ func (_m *APIClient) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKe ret := _m.Called(ctx) var r0 types.SwarmUnlockKeyResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (types.SwarmUnlockKeyResponse, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) types.SwarmUnlockKeyResponse); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(types.SwarmUnlockKeyResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -2114,13 +2313,16 @@ func (_m *APIClient) SwarmInit(ctx context.Context, req swarm.InitRequest) (stri ret := _m.Called(ctx, req) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, swarm.InitRequest) (string, error)); ok { + return rf(ctx, req) + } if rf, ok := ret.Get(0).(func(context.Context, swarm.InitRequest) string); ok { r0 = rf(ctx, req) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, swarm.InitRequest) error); ok { r1 = rf(ctx, req) } else { @@ -2135,13 +2337,16 @@ func (_m *APIClient) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { ret := _m.Called(ctx) var r0 swarm.Swarm + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (swarm.Swarm, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) swarm.Swarm); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(swarm.Swarm) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -2212,13 +2417,17 @@ func (_m *APIClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swa ret := _m.Called(ctx, taskID) var r0 swarm.Task + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (swarm.Task, []byte, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, string) swarm.Task); ok { r0 = rf(ctx, taskID) } else { r0 = ret.Get(0).(swarm.Task) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, taskID) } else { @@ -2227,7 +2436,6 @@ func (_m *APIClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swa } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, taskID) } else { @@ -2242,6 +2450,10 @@ func (_m *APIClient) TaskList(ctx context.Context, options types.TaskListOptions ret := _m.Called(ctx, options) var r0 []swarm.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.TaskListOptions) ([]swarm.Task, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.TaskListOptions) []swarm.Task); ok { r0 = rf(ctx, options) } else { @@ -2250,7 +2462,6 @@ func (_m *APIClient) TaskList(ctx context.Context, options types.TaskListOptions } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.TaskListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -2265,6 +2476,10 @@ func (_m *APIClient) TaskLogs(ctx context.Context, taskID string, options types. ret := _m.Called(ctx, taskID, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { + return rf(ctx, taskID, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { r0 = rf(ctx, taskID, options) } else { @@ -2273,7 +2488,6 @@ func (_m *APIClient) TaskLogs(ctx context.Context, taskID string, options types. } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { r1 = rf(ctx, taskID, options) } else { @@ -2284,18 +2498,21 @@ func (_m *APIClient) TaskLogs(ctx context.Context, taskID string, options types. } // VolumeCreate provides a mock function with given fields: ctx, options -func (_m *APIClient) VolumeCreate(ctx context.Context, options volume.VolumeCreateBody) (types.Volume, error) { +func (_m *APIClient) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) { ret := _m.Called(ctx, options) - var r0 types.Volume - if rf, ok := ret.Get(0).(func(context.Context, volume.VolumeCreateBody) types.Volume); ok { + var r0 volume.Volume + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, volume.CreateOptions) (volume.Volume, error)); ok { + return rf(ctx, options) + } + if rf, ok := ret.Get(0).(func(context.Context, volume.CreateOptions) volume.Volume); ok { r0 = rf(ctx, options) } else { - r0 = ret.Get(0).(types.Volume) + r0 = ret.Get(0).(volume.Volume) } - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, volume.VolumeCreateBody) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, volume.CreateOptions) error); ok { r1 = rf(ctx, options) } else { r1 = ret.Error(1) @@ -2305,17 +2522,20 @@ func (_m *APIClient) VolumeCreate(ctx context.Context, options volume.VolumeCrea } // VolumeInspect provides a mock function with given fields: ctx, volumeID -func (_m *APIClient) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error) { +func (_m *APIClient) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) { ret := _m.Called(ctx, volumeID) - var r0 types.Volume - if rf, ok := ret.Get(0).(func(context.Context, string) types.Volume); ok { + var r0 volume.Volume + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (volume.Volume, error)); ok { + return rf(ctx, volumeID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) volume.Volume); ok { r0 = rf(ctx, volumeID) } else { - r0 = ret.Get(0).(types.Volume) + r0 = ret.Get(0).(volume.Volume) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, volumeID) } else { @@ -2326,17 +2546,21 @@ func (_m *APIClient) VolumeInspect(ctx context.Context, volumeID string) (types. } // VolumeInspectWithRaw provides a mock function with given fields: ctx, volumeID -func (_m *APIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) { +func (_m *APIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) (volume.Volume, []byte, error) { ret := _m.Called(ctx, volumeID) - var r0 types.Volume - if rf, ok := ret.Get(0).(func(context.Context, string) types.Volume); ok { + var r0 volume.Volume + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (volume.Volume, []byte, error)); ok { + return rf(ctx, volumeID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) volume.Volume); ok { r0 = rf(ctx, volumeID) } else { - r0 = ret.Get(0).(types.Volume) + r0 = ret.Get(0).(volume.Volume) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, volumeID) } else { @@ -2345,7 +2569,6 @@ func (_m *APIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, volumeID) } else { @@ -2356,17 +2579,20 @@ func (_m *APIClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) } // VolumeList provides a mock function with given fields: ctx, filter -func (_m *APIClient) VolumeList(ctx context.Context, filter filters.Args) (volume.VolumeListOKBody, error) { +func (_m *APIClient) VolumeList(ctx context.Context, filter filters.Args) (volume.ListResponse, error) { ret := _m.Called(ctx, filter) - var r0 volume.VolumeListOKBody - if rf, ok := ret.Get(0).(func(context.Context, filters.Args) volume.VolumeListOKBody); ok { + var r0 volume.ListResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (volume.ListResponse, error)); ok { + return rf(ctx, filter) + } + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) volume.ListResponse); ok { r0 = rf(ctx, filter) } else { - r0 = ret.Get(0).(volume.VolumeListOKBody) + r0 = ret.Get(0).(volume.ListResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, filter) } else { @@ -2390,18 +2616,35 @@ func (_m *APIClient) VolumeRemove(ctx context.Context, volumeID string, force bo return r0 } +// VolumeUpdate provides a mock function with given fields: ctx, volumeID, version, options +func (_m *APIClient) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error { + ret := _m.Called(ctx, volumeID, version, options) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, swarm.Version, volume.UpdateOptions) error); ok { + r0 = rf(ctx, volumeID, version, options) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // VolumesPrune provides a mock function with given fields: ctx, pruneFilter func (_m *APIClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error) { ret := _m.Called(ctx, pruneFilter) var r0 types.VolumesPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.VolumesPruneReport, error)); ok { + return rf(ctx, pruneFilter) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.VolumesPruneReport); ok { r0 = rf(ctx, pruneFilter) } else { r0 = ret.Get(0).(types.VolumesPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilter) } else { @@ -2410,3 +2653,17 @@ func (_m *APIClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) return r0, r1 } + +// NewAPIClient creates a new instance of APIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *APIClient { + mock := &APIClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/ContainerAPIClient.go b/mocks/ContainerAPIClient.go index 54270618..05cdc71c 100644 --- a/mocks/ContainerAPIClient.go +++ b/mocks/ContainerAPIClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.30.16. DO NOT EDIT. package mocks @@ -15,8 +15,6 @@ import ( network "github.com/docker/docker/api/types/network" - time "time" - types "github.com/docker/docker/api/types" v1 "github.com/opencontainers/image-spec/specs-go/v1" @@ -32,13 +30,16 @@ func (_m *ContainerAPIClient) ContainerAttach(ctx context.Context, _a1 string, o ret := _m.Called(ctx, _a1, options) var r0 types.HijackedResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) (types.HijackedResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) types.HijackedResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.HijackedResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerAttachOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -53,13 +54,16 @@ func (_m *ContainerAPIClient) ContainerCommit(ctx context.Context, _a1 string, o ret := _m.Called(ctx, _a1, options) var r0 types.IDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) (types.IDResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerCommitOptions) types.IDResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.IDResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerCommitOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -70,17 +74,20 @@ func (_m *ContainerAPIClient) ContainerCommit(ctx context.Context, _a1 string, o } // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName -func (_m *ContainerAPIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.ContainerCreateCreatedBody, error) { +func (_m *ContainerAPIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error) { ret := _m.Called(ctx, config, hostConfig, networkingConfig, platform, containerName) - var r0 container.ContainerCreateCreatedBody - if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.ContainerCreateCreatedBody); ok { + var r0 container.CreateResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) (container.CreateResponse, error)); ok { + return rf(ctx, config, hostConfig, networkingConfig, platform, containerName) + } + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.CreateResponse); ok { r0 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) } else { - r0 = ret.Get(0).(container.ContainerCreateCreatedBody) + r0 = ret.Get(0).(container.CreateResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) error); ok { r1 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) } else { @@ -95,6 +102,10 @@ func (_m *ContainerAPIClient) ContainerDiff(ctx context.Context, _a1 string) ([] ret := _m.Called(ctx, _a1) var r0 []container.ContainerChangeResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]container.ContainerChangeResponseItem, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) []container.ContainerChangeResponseItem); ok { r0 = rf(ctx, _a1) } else { @@ -103,7 +114,6 @@ func (_m *ContainerAPIClient) ContainerDiff(ctx context.Context, _a1 string) ([] } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -118,13 +128,16 @@ func (_m *ContainerAPIClient) ContainerExecAttach(ctx context.Context, execID st ret := _m.Called(ctx, execID, config) var r0 types.HijackedResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) (types.HijackedResponse, error)); ok { + return rf(ctx, execID, config) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) types.HijackedResponse); ok { r0 = rf(ctx, execID, config) } else { r0 = ret.Get(0).(types.HijackedResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecStartCheck) error); ok { r1 = rf(ctx, execID, config) } else { @@ -139,13 +152,16 @@ func (_m *ContainerAPIClient) ContainerExecCreate(ctx context.Context, _a1 strin ret := _m.Called(ctx, _a1, config) var r0 types.IDResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) (types.IDResponse, error)); ok { + return rf(ctx, _a1, config) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) types.IDResponse); ok { r0 = rf(ctx, _a1, config) } else { r0 = ret.Get(0).(types.IDResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecConfig) error); ok { r1 = rf(ctx, _a1, config) } else { @@ -160,13 +176,16 @@ func (_m *ContainerAPIClient) ContainerExecInspect(ctx context.Context, execID s ret := _m.Called(ctx, execID) var r0 types.ContainerExecInspect + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerExecInspect, error)); ok { + return rf(ctx, execID) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerExecInspect); ok { r0 = rf(ctx, execID) } else { r0 = ret.Get(0).(types.ContainerExecInspect) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, execID) } else { @@ -209,6 +228,10 @@ func (_m *ContainerAPIClient) ContainerExport(ctx context.Context, _a1 string) ( ret := _m.Called(ctx, _a1) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok { r0 = rf(ctx, _a1) } else { @@ -217,7 +240,6 @@ func (_m *ContainerAPIClient) ContainerExport(ctx context.Context, _a1 string) ( } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -232,13 +254,16 @@ func (_m *ContainerAPIClient) ContainerInspect(ctx context.Context, _a1 string) ret := _m.Called(ctx, _a1) var r0 types.ContainerJSON + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerJSON, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ContainerJSON) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -253,13 +278,17 @@ func (_m *ContainerAPIClient) ContainerInspectWithRaw(ctx context.Context, _a1 s ret := _m.Called(ctx, _a1, getSize) var r0 types.ContainerJSON + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerJSON, []byte, error)); ok { + return rf(ctx, _a1, getSize) + } if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerJSON); ok { r0 = rf(ctx, _a1, getSize) } else { r0 = ret.Get(0).(types.ContainerJSON) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string, bool) []byte); ok { r1 = rf(ctx, _a1, getSize) } else { @@ -268,7 +297,6 @@ func (_m *ContainerAPIClient) ContainerInspectWithRaw(ctx context.Context, _a1 s } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, bool) error); ok { r2 = rf(ctx, _a1, getSize) } else { @@ -297,6 +325,10 @@ func (_m *ContainerAPIClient) ContainerList(ctx context.Context, options types.C ret := _m.Called(ctx, options) var r0 []types.Container + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) ([]types.Container, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) []types.Container); ok { r0 = rf(ctx, options) } else { @@ -305,7 +337,6 @@ func (_m *ContainerAPIClient) ContainerList(ctx context.Context, options types.C } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ContainerListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -320,6 +351,10 @@ func (_m *ContainerAPIClient) ContainerLogs(ctx context.Context, _a1 string, opt ret := _m.Called(ctx, _a1, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { r0 = rf(ctx, _a1, options) } else { @@ -328,7 +363,6 @@ func (_m *ContainerAPIClient) ContainerLogs(ctx context.Context, _a1 string, opt } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -394,13 +428,13 @@ func (_m *ContainerAPIClient) ContainerResize(ctx context.Context, _a1 string, o return r0 } -// ContainerRestart provides a mock function with given fields: ctx, _a1, timeout -func (_m *ContainerAPIClient) ContainerRestart(ctx context.Context, _a1 string, timeout *time.Duration) error { - ret := _m.Called(ctx, _a1, timeout) +// ContainerRestart provides a mock function with given fields: ctx, _a1, options +func (_m *ContainerAPIClient) ContainerRestart(ctx context.Context, _a1 string, options container.StopOptions) error { + ret := _m.Called(ctx, _a1, options) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, *time.Duration) error); ok { - r0 = rf(ctx, _a1, timeout) + if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { + r0 = rf(ctx, _a1, options) } else { r0 = ret.Error(0) } @@ -427,13 +461,16 @@ func (_m *ContainerAPIClient) ContainerStatPath(ctx context.Context, _a1 string, ret := _m.Called(ctx, _a1, path) var r0 types.ContainerPathStat + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (types.ContainerPathStat, error)); ok { + return rf(ctx, _a1, path) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) types.ContainerPathStat); ok { r0 = rf(ctx, _a1, path) } else { r0 = ret.Get(0).(types.ContainerPathStat) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, _a1, path) } else { @@ -448,13 +485,16 @@ func (_m *ContainerAPIClient) ContainerStats(ctx context.Context, _a1 string, st ret := _m.Called(ctx, _a1, stream) var r0 types.ContainerStats + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (types.ContainerStats, error)); ok { + return rf(ctx, _a1, stream) + } if rf, ok := ret.Get(0).(func(context.Context, string, bool) types.ContainerStats); ok { r0 = rf(ctx, _a1, stream) } else { r0 = ret.Get(0).(types.ContainerStats) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { r1 = rf(ctx, _a1, stream) } else { @@ -469,13 +509,16 @@ func (_m *ContainerAPIClient) ContainerStatsOneShot(ctx context.Context, _a1 str ret := _m.Called(ctx, _a1) var r0 types.ContainerStats + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerStats, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerStats); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ContainerStats) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -485,13 +528,13 @@ func (_m *ContainerAPIClient) ContainerStatsOneShot(ctx context.Context, _a1 str return r0, r1 } -// ContainerStop provides a mock function with given fields: ctx, _a1, timeout -func (_m *ContainerAPIClient) ContainerStop(ctx context.Context, _a1 string, timeout *time.Duration) error { - ret := _m.Called(ctx, _a1, timeout) +// ContainerStop provides a mock function with given fields: ctx, _a1, options +func (_m *ContainerAPIClient) ContainerStop(ctx context.Context, _a1 string, options container.StopOptions) error { + ret := _m.Called(ctx, _a1, options) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, *time.Duration) error); ok { - r0 = rf(ctx, _a1, timeout) + if rf, ok := ret.Get(0).(func(context.Context, string, container.StopOptions) error); ok { + r0 = rf(ctx, _a1, options) } else { r0 = ret.Error(0) } @@ -504,13 +547,16 @@ func (_m *ContainerAPIClient) ContainerTop(ctx context.Context, _a1 string, argu ret := _m.Called(ctx, _a1, arguments) var r0 container.ContainerTopOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, []string) (container.ContainerTopOKBody, error)); ok { + return rf(ctx, _a1, arguments) + } if rf, ok := ret.Get(0).(func(context.Context, string, []string) container.ContainerTopOKBody); ok { r0 = rf(ctx, _a1, arguments) } else { r0 = ret.Get(0).(container.ContainerTopOKBody) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok { r1 = rf(ctx, _a1, arguments) } else { @@ -539,13 +585,16 @@ func (_m *ContainerAPIClient) ContainerUpdate(ctx context.Context, _a1 string, u ret := _m.Called(ctx, _a1, updateConfig) var r0 container.ContainerUpdateOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)); ok { + return rf(ctx, _a1, updateConfig) + } if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) container.ContainerUpdateOKBody); ok { r0 = rf(ctx, _a1, updateConfig) } else { r0 = ret.Get(0).(container.ContainerUpdateOKBody) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, container.UpdateConfig) error); ok { r1 = rf(ctx, _a1, updateConfig) } else { @@ -556,19 +605,22 @@ func (_m *ContainerAPIClient) ContainerUpdate(ctx context.Context, _a1 string, u } // ContainerWait provides a mock function with given fields: ctx, _a1, condition -func (_m *ContainerAPIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) { +func (_m *ContainerAPIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { ret := _m.Called(ctx, _a1, condition) - var r0 <-chan container.ContainerWaitOKBody - if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.ContainerWaitOKBody); ok { + var r0 <-chan container.WaitResponse + var r1 <-chan error + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)); ok { + return rf(ctx, _a1, condition) + } + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.WaitResponse); ok { r0 = rf(ctx, _a1, condition) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan container.ContainerWaitOKBody) + r0 = ret.Get(0).(<-chan container.WaitResponse) } } - var r1 <-chan error if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { r1 = rf(ctx, _a1, condition) } else { @@ -585,13 +637,16 @@ func (_m *ContainerAPIClient) ContainersPrune(ctx context.Context, pruneFilters ret := _m.Called(ctx, pruneFilters) var r0 types.ContainersPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ContainersPruneReport, error)); ok { + return rf(ctx, pruneFilters) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ContainersPruneReport); ok { r0 = rf(ctx, pruneFilters) } else { r0 = ret.Get(0).(types.ContainersPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilters) } else { @@ -606,6 +661,11 @@ func (_m *ContainerAPIClient) CopyFromContainer(ctx context.Context, _a1 string, ret := _m.Called(ctx, _a1, srcPath) var r0 io.ReadCloser + var r1 types.ContainerPathStat + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (io.ReadCloser, types.ContainerPathStat, error)); ok { + return rf(ctx, _a1, srcPath) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { r0 = rf(ctx, _a1, srcPath) } else { @@ -614,14 +674,12 @@ func (_m *ContainerAPIClient) CopyFromContainer(ctx context.Context, _a1 string, } } - var r1 types.ContainerPathStat if rf, ok := ret.Get(1).(func(context.Context, string, string) types.ContainerPathStat); ok { r1 = rf(ctx, _a1, srcPath) } else { r1 = ret.Get(1).(types.ContainerPathStat) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok { r2 = rf(ctx, _a1, srcPath) } else { @@ -644,3 +702,17 @@ func (_m *ContainerAPIClient) CopyToContainer(ctx context.Context, _a1 string, p return r0 } + +// NewContainerAPIClient creates a new instance of ContainerAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContainerAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ContainerAPIClient { + mock := &ContainerAPIClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mocks/ImageAPIClient.go b/mocks/ImageAPIClient.go index ac4a5238..4ffce2bc 100644 --- a/mocks/ImageAPIClient.go +++ b/mocks/ImageAPIClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.30.16. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *ImageAPIClient) BuildCachePrune(ctx context.Context, opts types.BuildC ret := _m.Called(ctx, opts) var r0 *types.BuildCachePruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)); ok { + return rf(ctx, opts) + } if rf, ok := ret.Get(0).(func(context.Context, types.BuildCachePruneOptions) *types.BuildCachePruneReport); ok { r0 = rf(ctx, opts) } else { @@ -35,7 +39,6 @@ func (_m *ImageAPIClient) BuildCachePrune(ctx context.Context, opts types.BuildC } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.BuildCachePruneOptions) error); ok { r1 = rf(ctx, opts) } else { @@ -64,13 +67,16 @@ func (_m *ImageAPIClient) ImageBuild(ctx context.Context, _a1 io.Reader, options ret := _m.Called(ctx, _a1, options) var r0 types.ImageBuildResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, io.Reader, types.ImageBuildOptions) types.ImageBuildResponse); ok { r0 = rf(ctx, _a1, options) } else { r0 = ret.Get(0).(types.ImageBuildResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, io.Reader, types.ImageBuildOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -85,6 +91,10 @@ func (_m *ImageAPIClient) ImageCreate(ctx context.Context, parentReference strin ret := _m.Called(ctx, parentReference, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) (io.ReadCloser, error)); ok { + return rf(ctx, parentReference, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageCreateOptions) io.ReadCloser); ok { r0 = rf(ctx, parentReference, options) } else { @@ -93,7 +103,6 @@ func (_m *ImageAPIClient) ImageCreate(ctx context.Context, parentReference strin } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageCreateOptions) error); ok { r1 = rf(ctx, parentReference, options) } else { @@ -108,6 +117,10 @@ func (_m *ImageAPIClient) ImageHistory(ctx context.Context, _a1 string) ([]image ret := _m.Called(ctx, _a1) var r0 []image.HistoryResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]image.HistoryResponseItem, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) []image.HistoryResponseItem); ok { r0 = rf(ctx, _a1) } else { @@ -116,7 +129,6 @@ func (_m *ImageAPIClient) ImageHistory(ctx context.Context, _a1 string) ([]image } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, _a1) } else { @@ -131,6 +143,10 @@ func (_m *ImageAPIClient) ImageImport(ctx context.Context, source types.ImageImp ret := _m.Called(ctx, source, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) (io.ReadCloser, error)); ok { + return rf(ctx, source, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) io.ReadCloser); ok { r0 = rf(ctx, source, ref, options) } else { @@ -139,7 +155,6 @@ func (_m *ImageAPIClient) ImageImport(ctx context.Context, source types.ImageImp } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) error); ok { r1 = rf(ctx, source, ref, options) } else { @@ -154,13 +169,17 @@ func (_m *ImageAPIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) ( ret := _m.Called(ctx, _a1) var r0 types.ImageInspect + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ImageInspect, []byte, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(types.ImageInspect) } - var r1 []byte if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = rf(ctx, _a1) } else { @@ -169,7 +188,6 @@ func (_m *ImageAPIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) ( } } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, _a1) } else { @@ -184,6 +202,10 @@ func (_m *ImageAPIClient) ImageList(ctx context.Context, options types.ImageList ret := _m.Called(ctx, options) var r0 []types.ImageSummary + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) ([]types.ImageSummary, error)); ok { + return rf(ctx, options) + } if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) []types.ImageSummary); ok { r0 = rf(ctx, options) } else { @@ -192,7 +214,6 @@ func (_m *ImageAPIClient) ImageList(ctx context.Context, options types.ImageList } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, types.ImageListOptions) error); ok { r1 = rf(ctx, options) } else { @@ -207,13 +228,16 @@ func (_m *ImageAPIClient) ImageLoad(ctx context.Context, input io.Reader, quiet ret := _m.Called(ctx, input, quiet) var r0 types.ImageLoadResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) (types.ImageLoadResponse, error)); ok { + return rf(ctx, input, quiet) + } if rf, ok := ret.Get(0).(func(context.Context, io.Reader, bool) types.ImageLoadResponse); ok { r0 = rf(ctx, input, quiet) } else { r0 = ret.Get(0).(types.ImageLoadResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, io.Reader, bool) error); ok { r1 = rf(ctx, input, quiet) } else { @@ -228,6 +252,10 @@ func (_m *ImageAPIClient) ImagePull(ctx context.Context, ref string, options typ ret := _m.Called(ctx, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) (io.ReadCloser, error)); ok { + return rf(ctx, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) io.ReadCloser); ok { r0 = rf(ctx, ref, options) } else { @@ -236,7 +264,6 @@ func (_m *ImageAPIClient) ImagePull(ctx context.Context, ref string, options typ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePullOptions) error); ok { r1 = rf(ctx, ref, options) } else { @@ -251,6 +278,10 @@ func (_m *ImageAPIClient) ImagePush(ctx context.Context, ref string, options typ ret := _m.Called(ctx, ref, options) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) (io.ReadCloser, error)); ok { + return rf(ctx, ref, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePushOptions) io.ReadCloser); ok { r0 = rf(ctx, ref, options) } else { @@ -259,7 +290,6 @@ func (_m *ImageAPIClient) ImagePush(ctx context.Context, ref string, options typ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePushOptions) error); ok { r1 = rf(ctx, ref, options) } else { @@ -274,6 +304,10 @@ func (_m *ImageAPIClient) ImageRemove(ctx context.Context, _a1 string, options t ret := _m.Called(ctx, _a1, options) var r0 []types.ImageDeleteResponseItem + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)); ok { + return rf(ctx, _a1, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageRemoveOptions) []types.ImageDeleteResponseItem); ok { r0 = rf(ctx, _a1, options) } else { @@ -282,7 +316,6 @@ func (_m *ImageAPIClient) ImageRemove(ctx context.Context, _a1 string, options t } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageRemoveOptions) error); ok { r1 = rf(ctx, _a1, options) } else { @@ -297,6 +330,10 @@ func (_m *ImageAPIClient) ImageSave(ctx context.Context, images []string) (io.Re ret := _m.Called(ctx, images) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []string) (io.ReadCloser, error)); ok { + return rf(ctx, images) + } if rf, ok := ret.Get(0).(func(context.Context, []string) io.ReadCloser); ok { r0 = rf(ctx, images) } else { @@ -305,7 +342,6 @@ func (_m *ImageAPIClient) ImageSave(ctx context.Context, images []string) (io.Re } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { r1 = rf(ctx, images) } else { @@ -320,6 +356,10 @@ func (_m *ImageAPIClient) ImageSearch(ctx context.Context, term string, options ret := _m.Called(ctx, term, options) var r0 []registry.SearchResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) ([]registry.SearchResult, error)); ok { + return rf(ctx, term, options) + } if rf, ok := ret.Get(0).(func(context.Context, string, types.ImageSearchOptions) []registry.SearchResult); ok { r0 = rf(ctx, term, options) } else { @@ -328,7 +368,6 @@ func (_m *ImageAPIClient) ImageSearch(ctx context.Context, term string, options } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, types.ImageSearchOptions) error); ok { r1 = rf(ctx, term, options) } else { @@ -357,13 +396,16 @@ func (_m *ImageAPIClient) ImagesPrune(ctx context.Context, pruneFilter filters.A ret := _m.Called(ctx, pruneFilter) var r0 types.ImagesPruneReport + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) (types.ImagesPruneReport, error)); ok { + return rf(ctx, pruneFilter) + } if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.ImagesPruneReport); ok { r0 = rf(ctx, pruneFilter) } else { r0 = ret.Get(0).(types.ImagesPruneReport) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { r1 = rf(ctx, pruneFilter) } else { @@ -372,3 +414,17 @@ func (_m *ImageAPIClient) ImagesPrune(ctx context.Context, pruneFilter filters.A return r0, r1 } + +// NewImageAPIClient creates a new instance of ImageAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewImageAPIClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ImageAPIClient { + mock := &ImageAPIClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/container/docker_client.go b/pkg/container/docker_client.go index 6b252c94..fc0b2406 100644 --- a/pkg/container/docker_client.go +++ b/pkg/container/docker_client.go @@ -161,7 +161,9 @@ func (client dockerClient) RestartContainer(ctx context.Context, c *Container, t "dryrun": dryrun, }).Info("restart container") if !dryrun { - if err := client.containerAPI.ContainerRestart(ctx, c.ID(), &timeout); err != nil { + // convert timeout to seconds + timeoutSec := int(timeout.Seconds()) + if err := client.containerAPI.ContainerRestart(ctx, c.ID(), ctypes.StopOptions{Timeout: &timeoutSec}); err != nil { return errors.Wrap(err, "failed to restart container") } } @@ -220,7 +222,9 @@ func (client dockerClient) StopContainerWithID(ctx context.Context, containerID "dryrun": dryrun, }).Info("stopping container") if !dryrun { - err := client.containerAPI.ContainerStop(ctx, containerID, &timeout) + // convert timeout to seconds + timeoutSec := int(timeout.Seconds()) + err := client.containerAPI.ContainerStop(ctx, containerID, ctypes.StopOptions{Timeout: &timeoutSec}) if err != nil { return errors.Wrap(err, "failed to stop container") } diff --git a/pkg/container/mock_Client.go b/pkg/container/mock_Client.go index e8ea622d..096ca43a 100644 --- a/pkg/container/mock_Client.go +++ b/pkg/container/mock_Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.30.16. DO NOT EDIT. package container @@ -49,6 +49,10 @@ func (_m *MockClient) ListContainers(_a0 context.Context, _a1 FilterFunc, _a2 Li ret := _m.Called(_a0, _a1, _a2) var r0 []*Container + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, FilterFunc, ListOpts) ([]*Container, error)); ok { + return rf(_a0, _a1, _a2) + } if rf, ok := ret.Get(0).(func(context.Context, FilterFunc, ListOpts) []*Container); ok { r0 = rf(_a0, _a1, _a2) } else { @@ -57,7 +61,6 @@ func (_m *MockClient) ListContainers(_a0 context.Context, _a1 FilterFunc, _a2 Li } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, FilterFunc, ListOpts) error); ok { r1 = rf(_a0, _a1, _a2) } else { @@ -184,13 +187,18 @@ func (_m *MockClient) StressContainer(_a0 context.Context, _a1 *Container, _a2 [ ret := _m.Called(_a0, _a1, _a2, _a3, _a4, _a5, _a6) var r0 string + var r1 <-chan string + var r2 <-chan error + var r3 error + if rf, ok := ret.Get(0).(func(context.Context, *Container, []string, string, bool, time.Duration, bool) (string, <-chan string, <-chan error, error)); ok { + return rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6) + } if rf, ok := ret.Get(0).(func(context.Context, *Container, []string, string, bool, time.Duration, bool) string); ok { r0 = rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6) } else { r0 = ret.Get(0).(string) } - var r1 <-chan string if rf, ok := ret.Get(1).(func(context.Context, *Container, []string, string, bool, time.Duration, bool) <-chan string); ok { r1 = rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6) } else { @@ -199,7 +207,6 @@ func (_m *MockClient) StressContainer(_a0 context.Context, _a1 *Container, _a2 [ } } - var r2 <-chan error if rf, ok := ret.Get(2).(func(context.Context, *Container, []string, string, bool, time.Duration, bool) <-chan error); ok { r2 = rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6) } else { @@ -208,7 +215,6 @@ func (_m *MockClient) StressContainer(_a0 context.Context, _a1 *Container, _a2 [ } } - var r3 error if rf, ok := ret.Get(3).(func(context.Context, *Container, []string, string, bool, time.Duration, bool) error); ok { r3 = rf(_a0, _a1, _a2, _a3, _a4, _a5, _a6) } else { @@ -231,3 +237,17 @@ func (_m *MockClient) UnpauseContainer(_a0 context.Context, _a1 *Container, _a2 return r0 } + +// NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockClient { + mock := &MockClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/container/mock_FilterFunc.go b/pkg/container/mock_FilterFunc.go index 2533f615..da719d8c 100644 --- a/pkg/container/mock_FilterFunc.go +++ b/pkg/container/mock_FilterFunc.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.30.16. DO NOT EDIT. package container @@ -22,3 +22,17 @@ func (_m *MockFilterFunc) Execute(_a0 *Container) bool { return r0 } + +// NewMockFilterFunc creates a new instance of MockFilterFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockFilterFunc(t interface { + mock.TestingT + Cleanup(func()) +}) *MockFilterFunc { + mock := &MockFilterFunc{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +}