From 030374a047281fe4492ccfc479549d7a4a7c0d6c Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 27 Nov 2023 14:05:44 +0100 Subject: [PATCH] Do less pings to grpc (#3) --- Makefile | 2 +- go.mod | 18 +- go.sum | 164 ++---------------- pkg/apis/v1/cluster.pb.go | 2 +- pkg/apis/v1/common.pb.go | 2 +- pkg/apis/v1/info.pb.go | 2 +- pkg/apis/v1/ip.pb.go | 2 +- pkg/apis/v1/network_traffic.pb.go | 2 +- pkg/apis/v1/pod.pb.go | 2 +- pkg/apis/v1/postgres.pb.go | 2 +- pkg/apis/v1/s3.pb.go | 2 +- pkg/apis/v1/volume.pb.go | 2 +- pkg/client/client.go | 10 +- proto/buf.gen.yaml | 2 +- test/mocks/v1/ClusterServiceClient.go | 27 ++- test/mocks/v1/ClusterServiceServer.go | 27 ++- test/mocks/v1/IPServiceClient.go | 27 ++- test/mocks/v1/IPServiceServer.go | 27 ++- test/mocks/v1/InfoServiceClient.go | 19 +- test/mocks/v1/InfoServiceServer.go | 19 +- test/mocks/v1/NetworkTrafficServiceClient.go | 19 +- test/mocks/v1/NetworkTrafficServiceServer.go | 19 +- test/mocks/v1/PodServiceClient.go | 27 ++- test/mocks/v1/PodServiceServer.go | 27 ++- test/mocks/v1/PostgresServiceClient.go | 27 ++- test/mocks/v1/PostgresServiceServer.go | 27 ++- test/mocks/v1/S3ServiceClient.go | 19 +- test/mocks/v1/S3ServiceServer.go | 19 +- test/mocks/v1/UnsafeClusterServiceServer.go | 11 +- test/mocks/v1/UnsafeIPServiceServer.go | 11 +- test/mocks/v1/UnsafeInfoServiceServer.go | 11 +- .../v1/UnsafeNetworkTrafficServiceServer.go | 11 +- test/mocks/v1/UnsafePodServiceServer.go | 11 +- test/mocks/v1/UnsafePostgresServiceServer.go | 11 +- test/mocks/v1/UnsafeS3ServiceServer.go | 11 +- test/mocks/v1/UnsafeVolumeServiceServer.go | 11 +- test/mocks/v1/VolumeServiceClient.go | 27 ++- test/mocks/v1/VolumeServiceServer.go | 27 ++- 38 files changed, 371 insertions(+), 315 deletions(-) diff --git a/Makefile b/Makefile index fece39e..a0d4800 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ proto: .PHONY: mocks mocks: rm -rf test/mocks - docker run --rm --user $$(id -u):$$(id -g) -w /work -v ${PWD}:/work vektra/mockery:v2.22.1 --keeptree --all --dir pkg/apis --output test/mocks + docker run --rm --user $$(id -u):$$(id -g) -w /work -v ${PWD}:/work vektra/mockery:v2.38.0 --keeptree --all --dir pkg/apis --output test/mocks .PHONY: test test: diff --git a/go.mod b/go.mod index 8445516..c2a59f7 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,21 @@ module github.com/fi-ts/accounting-go -go 1.20 +go 1.21 require ( - github.com/stretchr/testify v1.8.2 - golang.org/x/net v0.8.0 - google.golang.org/grpc v1.53.0 - google.golang.org/protobuf v1.30.0 + github.com/stretchr/testify v1.8.4 + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect + github.com/stretchr/objx v0.5.1 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index c6251e0..1819179 100644 --- a/go.sum +++ b/go.sum @@ -1,169 +1,41 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 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/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/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -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.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -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.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +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/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/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= 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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -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/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -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-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= -golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -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/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -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-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -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/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20220531173845-685668d2de03 h1:FG2YhwyltdDPC/0XuwzU0dijPcTzvfTtst0QdlDxoMU= -google.golang.org/genproto v0.0.0-20220531173845-685668d2de03/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -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.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -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.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.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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= -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/pkg/apis/v1/cluster.pb.go b/pkg/apis/v1/cluster.pb.go index b3ce214..c908671 100644 --- a/pkg/apis/v1/cluster.pb.go +++ b/pkg/apis/v1/cluster.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/cluster.proto diff --git a/pkg/apis/v1/common.pb.go b/pkg/apis/v1/common.pb.go index 0e008e7..c531b17 100644 --- a/pkg/apis/v1/common.pb.go +++ b/pkg/apis/v1/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/common.proto diff --git a/pkg/apis/v1/info.pb.go b/pkg/apis/v1/info.pb.go index 7de3c09..70c5663 100644 --- a/pkg/apis/v1/info.pb.go +++ b/pkg/apis/v1/info.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/info.proto diff --git a/pkg/apis/v1/ip.pb.go b/pkg/apis/v1/ip.pb.go index d9a1f01..7a27ba8 100644 --- a/pkg/apis/v1/ip.pb.go +++ b/pkg/apis/v1/ip.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/ip.proto diff --git a/pkg/apis/v1/network_traffic.pb.go b/pkg/apis/v1/network_traffic.pb.go index ef7ec58..ffaea16 100644 --- a/pkg/apis/v1/network_traffic.pb.go +++ b/pkg/apis/v1/network_traffic.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/network_traffic.proto diff --git a/pkg/apis/v1/pod.pb.go b/pkg/apis/v1/pod.pb.go index e9ee72e..5b622b6 100644 --- a/pkg/apis/v1/pod.pb.go +++ b/pkg/apis/v1/pod.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/pod.proto diff --git a/pkg/apis/v1/postgres.pb.go b/pkg/apis/v1/postgres.pb.go index 7f1540f..2b7ede5 100644 --- a/pkg/apis/v1/postgres.pb.go +++ b/pkg/apis/v1/postgres.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/postgres.proto diff --git a/pkg/apis/v1/s3.pb.go b/pkg/apis/v1/s3.pb.go index 8b260b6..b31b84b 100644 --- a/pkg/apis/v1/s3.pb.go +++ b/pkg/apis/v1/s3.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/s3.proto diff --git a/pkg/apis/v1/volume.pb.go b/pkg/apis/v1/volume.pb.go index d0da886..ee5214e 100644 --- a/pkg/apis/v1/volume.pb.go +++ b/pkg/apis/v1/volume.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: metalstack/io/accounting/api/v1/volume.proto diff --git a/pkg/client/client.go b/pkg/client/client.go index 3c5df9e..7265b98 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -1,14 +1,14 @@ package client import ( + "context" "crypto/tls" "crypto/x509" "fmt" - "io/ioutil" + "os" "time" v1 "github.com/fi-ts/accounting-go/pkg/apis/v1" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" healthv1 "google.golang.org/grpc/health/grpc_health_v1" @@ -41,7 +41,7 @@ func NewClient(ctx context.Context, hostname string, port int, certFile string, } if caFile != "" { - ca, err := ioutil.ReadFile(caFile) + ca, err := os.ReadFile(caFile) if err != nil { return nil, fmt.Errorf("could not read ca certificate: %w", err) } @@ -65,8 +65,8 @@ func NewClient(ctx context.Context, hostname string, port int, certFile string, }) kacp := keepalive.ClientParameters{ - Time: 10 * time.Second, // send pings every 10 seconds if there is no activity - Timeout: time.Second, // wait 1 second for ping ack before considering the connection dead + Time: 20 * time.Second, // send pings every 10 seconds if there is no activity + Timeout: 3 * time.Second, // wait 1 second for ping ack before considering the connection dead PermitWithoutStream: true, // send pings even without active streams } diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index efd669d..bd7d0fd 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -1,7 +1,7 @@ version: v1 plugins: # generate go structs for protocol buffer definition - - plugin: buf.build/protocolbuffers/go:v1.29.1 + - plugin: buf.build/protocolbuffers/go:v1.31.0 out: ../ # generate gRPC stubs in golang - plugin: buf.build/grpc/go:v1.3.0 diff --git a/test/mocks/v1/ClusterServiceClient.go b/test/mocks/v1/ClusterServiceClient.go index e446f27..63ed01a 100644 --- a/test/mocks/v1/ClusterServiceClient.go +++ b/test/mocks/v1/ClusterServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *ClusterServiceClient) Added(ctx context.Context, in *v1.ClusterReport, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *ClusterServiceClient) Deleted(ctx context.Context, in *v1.ClusterRepor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -94,6 +102,10 @@ func (_m *ClusterServiceClient) Modified(ctx context.Context, in *v1.ClusterRepo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -127,6 +139,10 @@ func (_m *ClusterServiceClient) Usage(ctx context.Context, in *v1.ClusterUsageRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.ClusterUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterUsageRequest, ...grpc.CallOption) (*v1.ClusterUsageResponse, error)); ok { @@ -149,13 +165,12 @@ func (_m *ClusterServiceClient) Usage(ctx context.Context, in *v1.ClusterUsageRe return r0, r1 } -type mockConstructorTestingTNewClusterServiceClient interface { +// NewClusterServiceClient creates a new instance of ClusterServiceClient. 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 NewClusterServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterServiceClient creates a new instance of ClusterServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterServiceClient(t mockConstructorTestingTNewClusterServiceClient) *ClusterServiceClient { +}) *ClusterServiceClient { mock := &ClusterServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/ClusterServiceServer.go b/test/mocks/v1/ClusterServiceServer.go index 8d5755b..6bfe2ff 100644 --- a/test/mocks/v1/ClusterServiceServer.go +++ b/test/mocks/v1/ClusterServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type ClusterServiceServer struct { func (_m *ClusterServiceServer) Added(_a0 context.Context, _a1 *v1.ClusterReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *ClusterServiceServer) Added(_a0 context.Context, _a1 *v1.ClusterReport func (_m *ClusterServiceServer) Deleted(_a0 context.Context, _a1 *v1.ClusterReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport) (*v1.Empty, error)); ok { @@ -70,6 +78,10 @@ func (_m *ClusterServiceServer) Deleted(_a0 context.Context, _a1 *v1.ClusterRepo func (_m *ClusterServiceServer) Modified(_a0 context.Context, _a1 *v1.ClusterReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterReport) (*v1.Empty, error)); ok { @@ -96,6 +108,10 @@ func (_m *ClusterServiceServer) Modified(_a0 context.Context, _a1 *v1.ClusterRep func (_m *ClusterServiceServer) Usage(_a0 context.Context, _a1 *v1.ClusterUsageRequest) (*v1.ClusterUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.ClusterUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ClusterUsageRequest) (*v1.ClusterUsageResponse, error)); ok { @@ -118,13 +134,12 @@ func (_m *ClusterServiceServer) Usage(_a0 context.Context, _a1 *v1.ClusterUsageR return r0, r1 } -type mockConstructorTestingTNewClusterServiceServer interface { +// NewClusterServiceServer creates a new instance of ClusterServiceServer. 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 NewClusterServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterServiceServer creates a new instance of ClusterServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterServiceServer(t mockConstructorTestingTNewClusterServiceServer) *ClusterServiceServer { +}) *ClusterServiceServer { mock := &ClusterServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/IPServiceClient.go b/test/mocks/v1/IPServiceClient.go index bcc3fcf..8bdbab6 100644 --- a/test/mocks/v1/IPServiceClient.go +++ b/test/mocks/v1/IPServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *IPServiceClient) Added(ctx context.Context, in *v1.IPReport, opts ...g _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *IPServiceClient) Deleted(ctx context.Context, in *v1.IPReport, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -94,6 +102,10 @@ func (_m *IPServiceClient) Modified(ctx context.Context, in *v1.IPReport, opts . _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -127,6 +139,10 @@ func (_m *IPServiceClient) Usage(ctx context.Context, in *v1.IPUsageRequest, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.IPUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPUsageRequest, ...grpc.CallOption) (*v1.IPUsageResponse, error)); ok { @@ -149,13 +165,12 @@ func (_m *IPServiceClient) Usage(ctx context.Context, in *v1.IPUsageRequest, opt return r0, r1 } -type mockConstructorTestingTNewIPServiceClient interface { +// NewIPServiceClient creates a new instance of IPServiceClient. 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 NewIPServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewIPServiceClient creates a new instance of IPServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIPServiceClient(t mockConstructorTestingTNewIPServiceClient) *IPServiceClient { +}) *IPServiceClient { mock := &IPServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/IPServiceServer.go b/test/mocks/v1/IPServiceServer.go index 491669e..3dcb10f 100644 --- a/test/mocks/v1/IPServiceServer.go +++ b/test/mocks/v1/IPServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type IPServiceServer struct { func (_m *IPServiceServer) Added(_a0 context.Context, _a1 *v1.IPReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *IPServiceServer) Added(_a0 context.Context, _a1 *v1.IPReport) (*v1.Emp func (_m *IPServiceServer) Deleted(_a0 context.Context, _a1 *v1.IPReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport) (*v1.Empty, error)); ok { @@ -70,6 +78,10 @@ func (_m *IPServiceServer) Deleted(_a0 context.Context, _a1 *v1.IPReport) (*v1.E func (_m *IPServiceServer) Modified(_a0 context.Context, _a1 *v1.IPReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPReport) (*v1.Empty, error)); ok { @@ -96,6 +108,10 @@ func (_m *IPServiceServer) Modified(_a0 context.Context, _a1 *v1.IPReport) (*v1. func (_m *IPServiceServer) Usage(_a0 context.Context, _a1 *v1.IPUsageRequest) (*v1.IPUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.IPUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.IPUsageRequest) (*v1.IPUsageResponse, error)); ok { @@ -118,13 +134,12 @@ func (_m *IPServiceServer) Usage(_a0 context.Context, _a1 *v1.IPUsageRequest) (* return r0, r1 } -type mockConstructorTestingTNewIPServiceServer interface { +// NewIPServiceServer creates a new instance of IPServiceServer. 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 NewIPServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewIPServiceServer creates a new instance of IPServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIPServiceServer(t mockConstructorTestingTNewIPServiceServer) *IPServiceServer { +}) *IPServiceServer { mock := &IPServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/InfoServiceClient.go b/test/mocks/v1/InfoServiceClient.go index b6d1344..d925237 100644 --- a/test/mocks/v1/InfoServiceClient.go +++ b/test/mocks/v1/InfoServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *InfoServiceClient) Projects(ctx context.Context, in *v1.ProjectInfoReq _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Projects") + } + var r0 *v1.ProjectInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ProjectInfoRequest, ...grpc.CallOption) (*v1.ProjectInfoResponse, error)); ok { @@ -61,6 +65,10 @@ func (_m *InfoServiceClient) Tenants(ctx context.Context, in *v1.TenantInfoReque _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Tenants") + } + var r0 *v1.TenantInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.TenantInfoRequest, ...grpc.CallOption) (*v1.TenantInfoResponse, error)); ok { @@ -83,13 +91,12 @@ func (_m *InfoServiceClient) Tenants(ctx context.Context, in *v1.TenantInfoReque return r0, r1 } -type mockConstructorTestingTNewInfoServiceClient interface { +// NewInfoServiceClient creates a new instance of InfoServiceClient. 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 NewInfoServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewInfoServiceClient creates a new instance of InfoServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInfoServiceClient(t mockConstructorTestingTNewInfoServiceClient) *InfoServiceClient { +}) *InfoServiceClient { mock := &InfoServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/InfoServiceServer.go b/test/mocks/v1/InfoServiceServer.go index 605b4bf..8d4f761 100644 --- a/test/mocks/v1/InfoServiceServer.go +++ b/test/mocks/v1/InfoServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type InfoServiceServer struct { func (_m *InfoServiceServer) Projects(_a0 context.Context, _a1 *v1.ProjectInfoRequest) (*v1.ProjectInfoResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Projects") + } + var r0 *v1.ProjectInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ProjectInfoRequest) (*v1.ProjectInfoResponse, error)); ok { @@ -44,6 +48,10 @@ func (_m *InfoServiceServer) Projects(_a0 context.Context, _a1 *v1.ProjectInfoRe func (_m *InfoServiceServer) Tenants(_a0 context.Context, _a1 *v1.TenantInfoRequest) (*v1.TenantInfoResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Tenants") + } + var r0 *v1.TenantInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.TenantInfoRequest) (*v1.TenantInfoResponse, error)); ok { @@ -66,13 +74,12 @@ func (_m *InfoServiceServer) Tenants(_a0 context.Context, _a1 *v1.TenantInfoRequ return r0, r1 } -type mockConstructorTestingTNewInfoServiceServer interface { +// NewInfoServiceServer creates a new instance of InfoServiceServer. 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 NewInfoServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewInfoServiceServer creates a new instance of InfoServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInfoServiceServer(t mockConstructorTestingTNewInfoServiceServer) *InfoServiceServer { +}) *InfoServiceServer { mock := &InfoServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/NetworkTrafficServiceClient.go b/test/mocks/v1/NetworkTrafficServiceClient.go index f5e14de..e43629c 100644 --- a/test/mocks/v1/NetworkTrafficServiceClient.go +++ b/test/mocks/v1/NetworkTrafficServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *NetworkTrafficServiceClient) Modified(ctx context.Context, in *v1.Netw _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.NetworkTrafficReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *NetworkTrafficServiceClient) Usage(ctx context.Context, in *v1.Network _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.NetworkUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.NetworkUsageRequest, ...grpc.CallOption) (*v1.NetworkUsageResponse, error)); ok { @@ -83,13 +91,12 @@ func (_m *NetworkTrafficServiceClient) Usage(ctx context.Context, in *v1.Network return r0, r1 } -type mockConstructorTestingTNewNetworkTrafficServiceClient interface { +// NewNetworkTrafficServiceClient creates a new instance of NetworkTrafficServiceClient. 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 NewNetworkTrafficServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkTrafficServiceClient creates a new instance of NetworkTrafficServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkTrafficServiceClient(t mockConstructorTestingTNewNetworkTrafficServiceClient) *NetworkTrafficServiceClient { +}) *NetworkTrafficServiceClient { mock := &NetworkTrafficServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/NetworkTrafficServiceServer.go b/test/mocks/v1/NetworkTrafficServiceServer.go index c47fe0e..98ae06a 100644 --- a/test/mocks/v1/NetworkTrafficServiceServer.go +++ b/test/mocks/v1/NetworkTrafficServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type NetworkTrafficServiceServer struct { func (_m *NetworkTrafficServiceServer) Modified(_a0 context.Context, _a1 *v1.NetworkTrafficReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.NetworkTrafficReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *NetworkTrafficServiceServer) Modified(_a0 context.Context, _a1 *v1.Net func (_m *NetworkTrafficServiceServer) Usage(_a0 context.Context, _a1 *v1.NetworkUsageRequest) (*v1.NetworkUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.NetworkUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.NetworkUsageRequest) (*v1.NetworkUsageResponse, error)); ok { @@ -66,13 +74,12 @@ func (_m *NetworkTrafficServiceServer) Usage(_a0 context.Context, _a1 *v1.Networ return r0, r1 } -type mockConstructorTestingTNewNetworkTrafficServiceServer interface { +// NewNetworkTrafficServiceServer creates a new instance of NetworkTrafficServiceServer. 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 NewNetworkTrafficServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkTrafficServiceServer creates a new instance of NetworkTrafficServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkTrafficServiceServer(t mockConstructorTestingTNewNetworkTrafficServiceServer) *NetworkTrafficServiceServer { +}) *NetworkTrafficServiceServer { mock := &NetworkTrafficServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/PodServiceClient.go b/test/mocks/v1/PodServiceClient.go index 4b3a85e..99b37fe 100644 --- a/test/mocks/v1/PodServiceClient.go +++ b/test/mocks/v1/PodServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *PodServiceClient) Added(ctx context.Context, in *v1.PodReport, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *PodServiceClient) Deleted(ctx context.Context, in *v1.PodReport, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -94,6 +102,10 @@ func (_m *PodServiceClient) Modified(ctx context.Context, in *v1.PodReport, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -127,6 +139,10 @@ func (_m *PodServiceClient) Usage(ctx context.Context, in *v1.ContainerUsageRequ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.ContainerUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ContainerUsageRequest, ...grpc.CallOption) (*v1.ContainerUsageResponse, error)); ok { @@ -149,13 +165,12 @@ func (_m *PodServiceClient) Usage(ctx context.Context, in *v1.ContainerUsageRequ return r0, r1 } -type mockConstructorTestingTNewPodServiceClient interface { +// NewPodServiceClient creates a new instance of PodServiceClient. 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 NewPodServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewPodServiceClient creates a new instance of PodServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPodServiceClient(t mockConstructorTestingTNewPodServiceClient) *PodServiceClient { +}) *PodServiceClient { mock := &PodServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/PodServiceServer.go b/test/mocks/v1/PodServiceServer.go index b478aa8..74ce399 100644 --- a/test/mocks/v1/PodServiceServer.go +++ b/test/mocks/v1/PodServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type PodServiceServer struct { func (_m *PodServiceServer) Added(_a0 context.Context, _a1 *v1.PodReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *PodServiceServer) Added(_a0 context.Context, _a1 *v1.PodReport) (*v1.E func (_m *PodServiceServer) Deleted(_a0 context.Context, _a1 *v1.PodReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport) (*v1.Empty, error)); ok { @@ -70,6 +78,10 @@ func (_m *PodServiceServer) Deleted(_a0 context.Context, _a1 *v1.PodReport) (*v1 func (_m *PodServiceServer) Modified(_a0 context.Context, _a1 *v1.PodReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PodReport) (*v1.Empty, error)); ok { @@ -96,6 +108,10 @@ func (_m *PodServiceServer) Modified(_a0 context.Context, _a1 *v1.PodReport) (*v func (_m *PodServiceServer) Usage(_a0 context.Context, _a1 *v1.ContainerUsageRequest) (*v1.ContainerUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.ContainerUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ContainerUsageRequest) (*v1.ContainerUsageResponse, error)); ok { @@ -118,13 +134,12 @@ func (_m *PodServiceServer) Usage(_a0 context.Context, _a1 *v1.ContainerUsageReq return r0, r1 } -type mockConstructorTestingTNewPodServiceServer interface { +// NewPodServiceServer creates a new instance of PodServiceServer. 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 NewPodServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPodServiceServer creates a new instance of PodServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPodServiceServer(t mockConstructorTestingTNewPodServiceServer) *PodServiceServer { +}) *PodServiceServer { mock := &PodServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/PostgresServiceClient.go b/test/mocks/v1/PostgresServiceClient.go index 169e4c1..43db10d 100644 --- a/test/mocks/v1/PostgresServiceClient.go +++ b/test/mocks/v1/PostgresServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *PostgresServiceClient) Added(ctx context.Context, in *v1.PostgresRepor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *PostgresServiceClient) Deleted(ctx context.Context, in *v1.PostgresRep _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -94,6 +102,10 @@ func (_m *PostgresServiceClient) Modified(ctx context.Context, in *v1.PostgresRe _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -127,6 +139,10 @@ func (_m *PostgresServiceClient) Usage(ctx context.Context, in *v1.PostgresUsage _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.PostgresUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresUsageRequest, ...grpc.CallOption) (*v1.PostgresUsageResponse, error)); ok { @@ -149,13 +165,12 @@ func (_m *PostgresServiceClient) Usage(ctx context.Context, in *v1.PostgresUsage return r0, r1 } -type mockConstructorTestingTNewPostgresServiceClient interface { +// NewPostgresServiceClient creates a new instance of PostgresServiceClient. 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 NewPostgresServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewPostgresServiceClient creates a new instance of PostgresServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPostgresServiceClient(t mockConstructorTestingTNewPostgresServiceClient) *PostgresServiceClient { +}) *PostgresServiceClient { mock := &PostgresServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/PostgresServiceServer.go b/test/mocks/v1/PostgresServiceServer.go index 244fb79..e922fd0 100644 --- a/test/mocks/v1/PostgresServiceServer.go +++ b/test/mocks/v1/PostgresServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type PostgresServiceServer struct { func (_m *PostgresServiceServer) Added(_a0 context.Context, _a1 *v1.PostgresReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *PostgresServiceServer) Added(_a0 context.Context, _a1 *v1.PostgresRepo func (_m *PostgresServiceServer) Deleted(_a0 context.Context, _a1 *v1.PostgresReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport) (*v1.Empty, error)); ok { @@ -70,6 +78,10 @@ func (_m *PostgresServiceServer) Deleted(_a0 context.Context, _a1 *v1.PostgresRe func (_m *PostgresServiceServer) Modified(_a0 context.Context, _a1 *v1.PostgresReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresReport) (*v1.Empty, error)); ok { @@ -96,6 +108,10 @@ func (_m *PostgresServiceServer) Modified(_a0 context.Context, _a1 *v1.PostgresR func (_m *PostgresServiceServer) Usage(_a0 context.Context, _a1 *v1.PostgresUsageRequest) (*v1.PostgresUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.PostgresUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.PostgresUsageRequest) (*v1.PostgresUsageResponse, error)); ok { @@ -118,13 +134,12 @@ func (_m *PostgresServiceServer) Usage(_a0 context.Context, _a1 *v1.PostgresUsag return r0, r1 } -type mockConstructorTestingTNewPostgresServiceServer interface { +// NewPostgresServiceServer creates a new instance of PostgresServiceServer. 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 NewPostgresServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPostgresServiceServer creates a new instance of PostgresServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPostgresServiceServer(t mockConstructorTestingTNewPostgresServiceServer) *PostgresServiceServer { +}) *PostgresServiceServer { mock := &PostgresServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/S3ServiceClient.go b/test/mocks/v1/S3ServiceClient.go index 2d00c50..43e634a 100644 --- a/test/mocks/v1/S3ServiceClient.go +++ b/test/mocks/v1/S3ServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *S3ServiceClient) BucketStats(ctx context.Context, in *v1.S3BucketRepor _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for BucketStats") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.S3BucketReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *S3ServiceClient) Usage(ctx context.Context, in *v1.S3UsageRequest, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.S3UsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.S3UsageRequest, ...grpc.CallOption) (*v1.S3UsageResponse, error)); ok { @@ -83,13 +91,12 @@ func (_m *S3ServiceClient) Usage(ctx context.Context, in *v1.S3UsageRequest, opt return r0, r1 } -type mockConstructorTestingTNewS3ServiceClient interface { +// NewS3ServiceClient creates a new instance of S3ServiceClient. 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 NewS3ServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewS3ServiceClient creates a new instance of S3ServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewS3ServiceClient(t mockConstructorTestingTNewS3ServiceClient) *S3ServiceClient { +}) *S3ServiceClient { mock := &S3ServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/S3ServiceServer.go b/test/mocks/v1/S3ServiceServer.go index 8fa3f38..b4c3ab5 100644 --- a/test/mocks/v1/S3ServiceServer.go +++ b/test/mocks/v1/S3ServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type S3ServiceServer struct { func (_m *S3ServiceServer) BucketStats(_a0 context.Context, _a1 *v1.S3BucketReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BucketStats") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.S3BucketReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *S3ServiceServer) BucketStats(_a0 context.Context, _a1 *v1.S3BucketRepo func (_m *S3ServiceServer) Usage(_a0 context.Context, _a1 *v1.S3UsageRequest) (*v1.S3UsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.S3UsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.S3UsageRequest) (*v1.S3UsageResponse, error)); ok { @@ -66,13 +74,12 @@ func (_m *S3ServiceServer) Usage(_a0 context.Context, _a1 *v1.S3UsageRequest) (* return r0, r1 } -type mockConstructorTestingTNewS3ServiceServer interface { +// NewS3ServiceServer creates a new instance of S3ServiceServer. 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 NewS3ServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewS3ServiceServer creates a new instance of S3ServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewS3ServiceServer(t mockConstructorTestingTNewS3ServiceServer) *S3ServiceServer { +}) *S3ServiceServer { mock := &S3ServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeClusterServiceServer.go b/test/mocks/v1/UnsafeClusterServiceServer.go index a57d54d..1ccf027 100644 --- a/test/mocks/v1/UnsafeClusterServiceServer.go +++ b/test/mocks/v1/UnsafeClusterServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeClusterServiceServer) mustEmbedUnimplementedClusterServiceServer _m.Called() } -type mockConstructorTestingTNewUnsafeClusterServiceServer interface { +// NewUnsafeClusterServiceServer creates a new instance of UnsafeClusterServiceServer. 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 NewUnsafeClusterServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeClusterServiceServer creates a new instance of UnsafeClusterServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeClusterServiceServer(t mockConstructorTestingTNewUnsafeClusterServiceServer) *UnsafeClusterServiceServer { +}) *UnsafeClusterServiceServer { mock := &UnsafeClusterServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeIPServiceServer.go b/test/mocks/v1/UnsafeIPServiceServer.go index 21187ab..7ba7e48 100644 --- a/test/mocks/v1/UnsafeIPServiceServer.go +++ b/test/mocks/v1/UnsafeIPServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeIPServiceServer) mustEmbedUnimplementedIPServiceServer() { _m.Called() } -type mockConstructorTestingTNewUnsafeIPServiceServer interface { +// NewUnsafeIPServiceServer creates a new instance of UnsafeIPServiceServer. 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 NewUnsafeIPServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeIPServiceServer creates a new instance of UnsafeIPServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeIPServiceServer(t mockConstructorTestingTNewUnsafeIPServiceServer) *UnsafeIPServiceServer { +}) *UnsafeIPServiceServer { mock := &UnsafeIPServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeInfoServiceServer.go b/test/mocks/v1/UnsafeInfoServiceServer.go index 63e18e6..c1cd66a 100644 --- a/test/mocks/v1/UnsafeInfoServiceServer.go +++ b/test/mocks/v1/UnsafeInfoServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeInfoServiceServer) mustEmbedUnimplementedInfoServiceServer() { _m.Called() } -type mockConstructorTestingTNewUnsafeInfoServiceServer interface { +// NewUnsafeInfoServiceServer creates a new instance of UnsafeInfoServiceServer. 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 NewUnsafeInfoServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeInfoServiceServer creates a new instance of UnsafeInfoServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeInfoServiceServer(t mockConstructorTestingTNewUnsafeInfoServiceServer) *UnsafeInfoServiceServer { +}) *UnsafeInfoServiceServer { mock := &UnsafeInfoServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeNetworkTrafficServiceServer.go b/test/mocks/v1/UnsafeNetworkTrafficServiceServer.go index b4e1976..cfda9b2 100644 --- a/test/mocks/v1/UnsafeNetworkTrafficServiceServer.go +++ b/test/mocks/v1/UnsafeNetworkTrafficServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeNetworkTrafficServiceServer) mustEmbedUnimplementedNetworkTraffi _m.Called() } -type mockConstructorTestingTNewUnsafeNetworkTrafficServiceServer interface { +// NewUnsafeNetworkTrafficServiceServer creates a new instance of UnsafeNetworkTrafficServiceServer. 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 NewUnsafeNetworkTrafficServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeNetworkTrafficServiceServer creates a new instance of UnsafeNetworkTrafficServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeNetworkTrafficServiceServer(t mockConstructorTestingTNewUnsafeNetworkTrafficServiceServer) *UnsafeNetworkTrafficServiceServer { +}) *UnsafeNetworkTrafficServiceServer { mock := &UnsafeNetworkTrafficServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafePodServiceServer.go b/test/mocks/v1/UnsafePodServiceServer.go index d50fe68..f203fd6 100644 --- a/test/mocks/v1/UnsafePodServiceServer.go +++ b/test/mocks/v1/UnsafePodServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafePodServiceServer) mustEmbedUnimplementedPodServiceServer() { _m.Called() } -type mockConstructorTestingTNewUnsafePodServiceServer interface { +// NewUnsafePodServiceServer creates a new instance of UnsafePodServiceServer. 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 NewUnsafePodServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafePodServiceServer creates a new instance of UnsafePodServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafePodServiceServer(t mockConstructorTestingTNewUnsafePodServiceServer) *UnsafePodServiceServer { +}) *UnsafePodServiceServer { mock := &UnsafePodServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafePostgresServiceServer.go b/test/mocks/v1/UnsafePostgresServiceServer.go index 977a40d..fea6abf 100644 --- a/test/mocks/v1/UnsafePostgresServiceServer.go +++ b/test/mocks/v1/UnsafePostgresServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafePostgresServiceServer) mustEmbedUnimplementedPostgresServiceServ _m.Called() } -type mockConstructorTestingTNewUnsafePostgresServiceServer interface { +// NewUnsafePostgresServiceServer creates a new instance of UnsafePostgresServiceServer. 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 NewUnsafePostgresServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafePostgresServiceServer creates a new instance of UnsafePostgresServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafePostgresServiceServer(t mockConstructorTestingTNewUnsafePostgresServiceServer) *UnsafePostgresServiceServer { +}) *UnsafePostgresServiceServer { mock := &UnsafePostgresServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeS3ServiceServer.go b/test/mocks/v1/UnsafeS3ServiceServer.go index 1c22f05..ee7461d 100644 --- a/test/mocks/v1/UnsafeS3ServiceServer.go +++ b/test/mocks/v1/UnsafeS3ServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeS3ServiceServer) mustEmbedUnimplementedS3ServiceServer() { _m.Called() } -type mockConstructorTestingTNewUnsafeS3ServiceServer interface { +// NewUnsafeS3ServiceServer creates a new instance of UnsafeS3ServiceServer. 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 NewUnsafeS3ServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeS3ServiceServer creates a new instance of UnsafeS3ServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeS3ServiceServer(t mockConstructorTestingTNewUnsafeS3ServiceServer) *UnsafeS3ServiceServer { +}) *UnsafeS3ServiceServer { mock := &UnsafeS3ServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/UnsafeVolumeServiceServer.go b/test/mocks/v1/UnsafeVolumeServiceServer.go index 72bf644..054c161 100644 --- a/test/mocks/v1/UnsafeVolumeServiceServer.go +++ b/test/mocks/v1/UnsafeVolumeServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *UnsafeVolumeServiceServer) mustEmbedUnimplementedVolumeServiceServer() _m.Called() } -type mockConstructorTestingTNewUnsafeVolumeServiceServer interface { +// NewUnsafeVolumeServiceServer creates a new instance of UnsafeVolumeServiceServer. 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 NewUnsafeVolumeServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnsafeVolumeServiceServer creates a new instance of UnsafeVolumeServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnsafeVolumeServiceServer(t mockConstructorTestingTNewUnsafeVolumeServiceServer) *UnsafeVolumeServiceServer { +}) *UnsafeVolumeServiceServer { mock := &UnsafeVolumeServiceServer{} mock.Mock.Test(t) diff --git a/test/mocks/v1/VolumeServiceClient.go b/test/mocks/v1/VolumeServiceClient.go index 0e0b637..d5802b8 100644 --- a/test/mocks/v1/VolumeServiceClient.go +++ b/test/mocks/v1/VolumeServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *VolumeServiceClient) Added(ctx context.Context, in *v1.VolumeReport, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -61,6 +65,10 @@ func (_m *VolumeServiceClient) Deleted(ctx context.Context, in *v1.VolumeReport, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -94,6 +102,10 @@ func (_m *VolumeServiceClient) Modified(ctx context.Context, in *v1.VolumeReport _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport, ...grpc.CallOption) (*v1.Empty, error)); ok { @@ -127,6 +139,10 @@ func (_m *VolumeServiceClient) Usage(ctx context.Context, in *v1.VolumeUsageRequ _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.VolumeUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeUsageRequest, ...grpc.CallOption) (*v1.VolumeUsageResponse, error)); ok { @@ -149,13 +165,12 @@ func (_m *VolumeServiceClient) Usage(ctx context.Context, in *v1.VolumeUsageRequ return r0, r1 } -type mockConstructorTestingTNewVolumeServiceClient interface { +// NewVolumeServiceClient creates a new instance of VolumeServiceClient. 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 NewVolumeServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewVolumeServiceClient creates a new instance of VolumeServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVolumeServiceClient(t mockConstructorTestingTNewVolumeServiceClient) *VolumeServiceClient { +}) *VolumeServiceClient { mock := &VolumeServiceClient{} mock.Mock.Test(t) diff --git a/test/mocks/v1/VolumeServiceServer.go b/test/mocks/v1/VolumeServiceServer.go index bfe27c5..25a4373 100644 --- a/test/mocks/v1/VolumeServiceServer.go +++ b/test/mocks/v1/VolumeServiceServer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type VolumeServiceServer struct { func (_m *VolumeServiceServer) Added(_a0 context.Context, _a1 *v1.VolumeReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Added") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport) (*v1.Empty, error)); ok { @@ -44,6 +48,10 @@ func (_m *VolumeServiceServer) Added(_a0 context.Context, _a1 *v1.VolumeReport) func (_m *VolumeServiceServer) Deleted(_a0 context.Context, _a1 *v1.VolumeReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Deleted") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport) (*v1.Empty, error)); ok { @@ -70,6 +78,10 @@ func (_m *VolumeServiceServer) Deleted(_a0 context.Context, _a1 *v1.VolumeReport func (_m *VolumeServiceServer) Modified(_a0 context.Context, _a1 *v1.VolumeReport) (*v1.Empty, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Modified") + } + var r0 *v1.Empty var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeReport) (*v1.Empty, error)); ok { @@ -96,6 +108,10 @@ func (_m *VolumeServiceServer) Modified(_a0 context.Context, _a1 *v1.VolumeRepor func (_m *VolumeServiceServer) Usage(_a0 context.Context, _a1 *v1.VolumeUsageRequest) (*v1.VolumeUsageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Usage") + } + var r0 *v1.VolumeUsageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.VolumeUsageRequest) (*v1.VolumeUsageResponse, error)); ok { @@ -118,13 +134,12 @@ func (_m *VolumeServiceServer) Usage(_a0 context.Context, _a1 *v1.VolumeUsageReq return r0, r1 } -type mockConstructorTestingTNewVolumeServiceServer interface { +// NewVolumeServiceServer creates a new instance of VolumeServiceServer. 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 NewVolumeServiceServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewVolumeServiceServer creates a new instance of VolumeServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVolumeServiceServer(t mockConstructorTestingTNewVolumeServiceServer) *VolumeServiceServer { +}) *VolumeServiceServer { mock := &VolumeServiceServer{} mock.Mock.Test(t)