diff --git a/.build-tools/go.mod b/.build-tools/go.mod index 26b86b7da1..3c03d97215 100644 --- a/.build-tools/go.mod +++ b/.build-tools/go.mod @@ -1,6 +1,8 @@ module github.com/dapr/components-contrib/build-tools -go 1.20 +go 1.21 + +toolchain go1.21.4 require ( github.com/dapr/components-contrib v0.0.0 diff --git a/.build-tools/go.sum b/.build-tools/go.sum index 8e88519481..d70b5cde34 100644 --- a/.build-tools/go.sum +++ b/.build-tools/go.sum @@ -4,7 +4,9 @@ github.com/dapr/kit v0.12.2-0.20231031211530-0e1fd37fc4b3 h1:xsmVK3YOKRMOcaxqo50 github.com/dapr/kit v0.12.2-0.20231031211530-0e1fd37fc4b3/go.mod h1:c3Z78F+h7UYtb0LmpzJNC/ChT240ycDJFViRUztdpoo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 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/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= @@ -18,12 +20,15 @@ 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/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= +github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -32,6 +37,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -45,8 +51,10 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 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/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/apimachinery v0.26.10 h1:aE+J2KIbjctFqPp3Y0q4Wh2PD+l1p2g3Zp4UYjSvtGU= +k8s.io/apimachinery v0.26.10/go.mod h1:iT1ZP4JBP34wwM+ZQ8ByPEQ81u043iqAcsJYftX9amM= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/.github/infrastructure/conformance/temporal/server/dynamicconfig/README.md b/.github/infrastructure/conformance/temporal/server/dynamicconfig/README.md deleted file mode 100755 index 85a37c09dd..0000000000 --- a/.github/infrastructure/conformance/temporal/server/dynamicconfig/README.md +++ /dev/null @@ -1,39 +0,0 @@ -Use `docker.yaml` file to override the default dynamic config value (they are specified -when creating the service config). - -Each key can have zero or more values and each value can have zero or more -constraints. There are only three types of constraint: -1. `namespace`: `string` -2. `taskQueueName`: `string` -3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`) -A value will be selected and returned if all its has exactly the same constraints -as the ones specified in query filters (including the number of constraints). - -Please use the following format: -``` -testGetBoolPropertyKey: - - value: false - - value: true - constraints: - namespace: "global-samples-namespace" - - value: false - constraints: - namespace: "samples-namespace" -testGetDurationPropertyKey: - - value: "1m" - constraints: - namespace: "samples-namespace" - taskQueueName: "longIdleTimeTaskqueue" -testGetFloat64PropertyKey: - - value: 12.0 - constraints: - namespace: "samples-namespace" -testGetMapPropertyKey: - - value: - key1: 1 - key2: "value 2" - key3: - - false - - key4: true - key5: 2.0 -``` diff --git a/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-cass.yaml b/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-cass.yaml deleted file mode 100755 index 4b91616389..0000000000 --- a/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-cass.yaml +++ /dev/null @@ -1,3 +0,0 @@ -system.forceSearchAttributesCacheRefreshOnRead: - - value: true # Dev setup only. Please don't turn this on in production. - constraints: {} diff --git a/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-sql.yaml b/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-sql.yaml deleted file mode 100755 index 8862dfad72..0000000000 --- a/.github/infrastructure/conformance/temporal/server/dynamicconfig/development-sql.yaml +++ /dev/null @@ -1,6 +0,0 @@ -limit.maxIDLength: - - value: 255 - constraints: {} -system.forceSearchAttributesCacheRefreshOnRead: - - value: true # Dev setup only. Please don't turn this on in production. - constraints: {} diff --git a/.github/infrastructure/conformance/temporal/server/dynamicconfig/docker.yaml b/.github/infrastructure/conformance/temporal/server/dynamicconfig/docker.yaml deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/.github/infrastructure/conformance/temporal/worker/Dockerfile b/.github/infrastructure/conformance/temporal/worker/Dockerfile deleted file mode 100644 index 6fe4e24292..0000000000 --- a/.github/infrastructure/conformance/temporal/worker/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# The base go-image -FROM golang:1.18-alpine - -# Create a directory for the app -RUN mkdir /app - -# Copy all files from the current directory to the app directory -COPY . /app - -# Set working directory -WORKDIR /app - -RUN go get - -# Run command as described: -# go build will build an executable file named server in the current directory -RUN go build -o server . - -# Run the server executable -CMD [ "/app/server" ] \ No newline at end of file diff --git a/.github/infrastructure/conformance/temporal/worker/go.mod b/.github/infrastructure/conformance/temporal/worker/go.mod deleted file mode 100644 index 0bcc7b4388..0000000000 --- a/.github/infrastructure/conformance/temporal/worker/go.mod +++ /dev/null @@ -1,35 +0,0 @@ -module github/dapr/workflow/worker - -go 1.20 - -require ( - github.com/zouyx/agollo/v3 v3.4.5 - go.temporal.io/sdk v1.21.1 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect - github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/gogo/status v1.1.1 // indirect - github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/pborman/uuid v1.2.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/robfig/cron v1.2.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/stretchr/testify v1.8.2 // indirect - go.temporal.io/api v1.18.1 // indirect - go.uber.org/atomic v1.10.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/.github/infrastructure/conformance/temporal/worker/go.sum b/.github/infrastructure/conformance/temporal/worker/go.sum deleted file mode 100644 index dbb5d5f475..0000000000 --- a/.github/infrastructure/conformance/temporal/worker/go.sum +++ /dev/null @@ -1,1305 +0,0 @@ -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= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -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-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -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/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -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/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/creack/pty v1.1.9/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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -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.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= -github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/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.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -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/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -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.4.1/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.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -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/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -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/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= -github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= -github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ= -github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.temporal.io/api v1.16.0/go.mod h1:u3qLbaVTffmcZQbf9ueB+16LKmhkftH79SJOV517MDk= -go.temporal.io/api v1.18.1 h1:kC3TS0iVXaAKe12L39I37b9X59x4p7E6512EfG/+RCU= -go.temporal.io/api v1.18.1/go.mod h1:VWdEGKUWRYKMkKJPo3wONuGZKay+d5L641b+JRuw0Bo= -go.temporal.io/sdk v1.21.1 h1:SJCzSsZLBsFiHniJ+E7Yy74pcAs1lg7NbFnsUJ4ggIM= -go.temporal.io/sdk v1.21.1/go.mod h1:Pq3Mp7p0lWNFM+YS2guBy8V/lJySh329AcyS+Wj/Wmo= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -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/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -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-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -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-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -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/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 h1:znp6mq/drrY+6khTAlJUDNFFcDGV2ENLYKpMq8SyCds= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -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.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -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/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -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.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.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/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.v2 v2.2.4/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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/.github/infrastructure/conformance/temporal/worker/main.go b/.github/infrastructure/conformance/temporal/worker/main.go deleted file mode 100644 index 45bb37a6b5..0000000000 --- a/.github/infrastructure/conformance/temporal/worker/main.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2021 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "context" - "time" - - "github.com/zouyx/agollo/v3/component/log" - "go.temporal.io/sdk/activity" - "go.temporal.io/sdk/client" - "go.temporal.io/sdk/worker" - "go.temporal.io/sdk/workflow" -) - -func main() { - // Sleep for a bit so the docker container can spin up - time.Sleep(30 * time.Second) - TaskQueueString := "TestTaskQueue" - - // construct client here - cOpt := client.Options{} - cOpt.HostPort = "temporal:7233" - cOpt.Identity = "TemporalTestClient" - // Create the workflow client - clientTwo, err := client.Dial(cOpt) - if err != nil { - log.Error("Unable to create client.") - return - } - wOpt := worker.Options{} - // Make default options for task q and worker options and workflow options - w := worker.New(clientTwo, TaskQueueString, wOpt) - - // Register workflows and activities - w.RegisterWorkflow(TestWorkflow) - w.RegisterActivity(ExampleActivity) - - err = w.Start() - if err != nil { - log.Error("Unable to start worker.") - return - } - w.Run(worker.InterruptCh()) -} - -func TestWorkflow(ctx workflow.Context, runtimeSeconds int) error { - options := workflow.ActivityOptions{ - TaskQueue: "TestTaskQueue", - ScheduleToCloseTimeout: time.Second * 60, - ScheduleToStartTimeout: time.Second * 60, - StartToCloseTimeout: time.Second * 60, - HeartbeatTimeout: time.Second * 5, - WaitForCancellation: false, - } - - ctx = workflow.WithActivityOptions(ctx, options) - err := workflow.ExecuteActivity(ctx, ExampleActivity, runtimeSeconds).Get(ctx, nil) - if err != nil { - log.Error("Unable to execute activity.") - return err - } - - return nil -} - -func ExampleActivity(ctx context.Context, runtimeSeconds int) error { - counter := 0 - for i := 0; i <= runtimeSeconds; i++ { - - select { - case <-time.After(1 * time.Second): - counter++ - activity.RecordHeartbeat(ctx, "") - case <-ctx.Done(): - return nil - } - } - return nil -} diff --git a/.github/infrastructure/docker-compose-temporal.yml b/.github/infrastructure/docker-compose-temporal.yml deleted file mode 100644 index 62857248d9..0000000000 --- a/.github/infrastructure/docker-compose-temporal.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: "3.5" -services: - worker: - build: ./conformance/temporal/worker - networks: - - temporal-network - depends_on: - - temporal - postgresql: - container_name: temporal-postgresql - environment: - POSTGRES_PASSWORD: temporal - POSTGRES_USER: temporal - image: postgres:13 - networks: - - temporal-network - ports: - - 5432:5432 - temporal: - container_name: temporal - depends_on: - - postgresql - environment: - - DB=postgresql - - DB_PORT=5432 - - POSTGRES_USER=temporal - - POSTGRES_PWD=temporal - - POSTGRES_SEEDS=postgresql - - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml - image: temporalio/auto-setup:1.17.1 - networks: - - temporal-network - ports: - - 7233:7233 - volumes: - - ./conformance/temporal/server/dynamicconfig:/etc/temporal/config/dynamicconfig -networks: - temporal-network: - driver: bridge - name: temporal-network diff --git a/.github/scripts/test-info.mjs b/.github/scripts/test-info.mjs index 6bf0376e53..e2accc2238 100644 --- a/.github/scripts/test-info.mjs +++ b/.github/scripts/test-info.mjs @@ -743,10 +743,6 @@ const components = { requireGCPCredentials: true, certificationSetup: 'certification-state.gcp.firestore-setup.sh', }, - 'workflows.temporal': { - conformance: true, - conformanceSetup: 'docker-compose.sh temporal', - }, } /** diff --git a/.github/workflows/certification.yml b/.github/workflows/certification.yml index 8113d9eaa8..bea558f138 100644 --- a/.github/workflows/certification.yml +++ b/.github/workflows/certification.yml @@ -44,7 +44,7 @@ jobs: fi - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} @@ -120,7 +120,7 @@ jobs: fi - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} @@ -224,9 +224,10 @@ jobs: - name: Set up Go id: setup-go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' + cache: 'false' - name: Download Go dependencies working-directory: ${{ env.TEST_PATH }} diff --git a/.github/workflows/components-contrib-all.yml b/.github/workflows/components-contrib-all.yml index 5e06b6981f..8fc22b9948 100644 --- a/.github/workflows/components-contrib-all.yml +++ b/.github/workflows/components-contrib-all.yml @@ -65,7 +65,7 @@ jobs: GOOS: ${{ matrix.target_os }} GOARCH: ${{ matrix.target_arch }} GOPROXY: https://proxy.golang.org - GOLANGCI_LINT_VER: "v1.51.2" + GOLANGCI_LINT_VER: "v1.55.2" strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] @@ -97,16 +97,17 @@ jobs: fi - name: Check out code into the Go module directory if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} - name: Set up Go id: setup-go if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' + cache: 'false' - name: Cache Go modules (Linux) if: matrix.target_os == 'linux' uses: actions/cache@v3 diff --git a/.github/workflows/components-contrib.yml b/.github/workflows/components-contrib.yml index 22707c842f..1c62759075 100644 --- a/.github/workflows/components-contrib.yml +++ b/.github/workflows/components-contrib.yml @@ -33,17 +33,18 @@ jobs: GOOS: linux GOARCH: amd64 GOPROXY: https://proxy.golang.org - GOLANGCI_LINT_VER: "v1.51.2" + GOLANGCI_LINT_VER: "v1.55.2" steps: - name: Check out code into the Go module directory if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go id: setup-go if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' + cache: 'false' - name: Cache Go modules (Linux) uses: actions/cache@v3 with: diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 9b2a29eef3..856753ff7a 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -47,7 +47,7 @@ jobs: fi - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} @@ -126,7 +126,7 @@ jobs: fi - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} @@ -234,9 +234,10 @@ jobs: mongodb-replica-set: test-rs - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' + cache: 'false' - name: Install Node.js ${{ matrix.nodejs-version }} if: matrix.nodejs-version != '' diff --git a/.github/workflows/coverage-reports.yml b/.github/workflows/coverage-reports.yml index c9bb4df4b5..eb4dc375d9 100644 --- a/.github/workflows/coverage-reports.yml +++ b/.github/workflows/coverage-reports.yml @@ -30,15 +30,16 @@ jobs: GOCOVMERGE_VER: "b5bfa59" steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.CHECKOUT_REPO }} ref: ${{ env.CHECKOUT_REF }} - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' + cache: 'false' - name: Setup go dependencies run: | @@ -116,4 +117,4 @@ jobs: env: SERVER_URL: ${{ secrets.DISCORD_MONITORING_WEBHOOK_URL }} - \ No newline at end of file + diff --git a/.github/workflows/dapr-bot-schedule.yml b/.github/workflows/dapr-bot-schedule.yml index ad3a8f5cc0..29fb8fc05a 100644 --- a/.github/workflows/dapr-bot-schedule.yml +++ b/.github/workflows/dapr-bot-schedule.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: pip install PyGithub - name: Automerge and update diff --git a/.github/workflows/dapr-bot.yml b/.github/workflows/dapr-bot.yml index bfb9fc2909..f0ca08d6ba 100644 --- a/.github/workflows/dapr-bot.yml +++ b/.github/workflows/dapr-bot.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 # required to make the script available for next step + uses: actions/checkout@v4 # required to make the script available for next step - name: Issue analyzer uses: actions/github-script@v6 with: diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 34f9b71c5f..84c05aee1d 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -32,7 +32,7 @@ jobs: FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed. steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Run FOSSA Scan" uses: fossas/fossa-action@v1.3.1 # Use a specific version if locking is preferred diff --git a/.github/workflows/generate-component-metadata-for-tag.yml b/.github/workflows/generate-component-metadata-for-tag.yml index 4347181fc1..226d305bbb 100644 --- a/.github/workflows/generate-component-metadata-for-tag.yml +++ b/.github/workflows/generate-component-metadata-for-tag.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build component-metadata-bundle.json run: make bundle-component-metadata - name: Upload component-metadata-bundle.json diff --git a/.golangci.yml b/.golangci.yml index 12c9d2b625..63607f790d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -118,33 +118,53 @@ linters-settings: # minimal occurrences count to trigger, 3 by default min-occurrences: 5 depguard: - list-type: denylist - include-go-root: false - packages-with-error-message: - - "go.uber.org/atomic": "must use sync/atomic" - - "golang.org/x/net/context": "must use context" - - "github.com/pkg/errors": "must use standard library (errors package and/or fmt.Errorf)" - - "github.com/Sirupsen/logrus": "must use github.com/dapr/kit/logger" - - "github.com/labstack/gommon/log": "must use github.com/dapr/kit/logger" - - "github.com/gobuffalo/logger": "must use github.com/dapr/kit/logger" - - "github.com/agrea/ptr": "must use github.com/dapr/kit/ptr" - - "github.com/cenkalti/backoff$": "must use github.com/cenkalti/backoff/v4" - - "github.com/cenkalti/backoff/v2": "must use github.com/cenkalti/backoff/v4" - - "github.com/cenkalti/backoff/v3": "must use github.com/cenkalti/backoff/v4" - - "github.com/dgrijalva/jwt-go": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/golang-jwt/jwt$": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/golang-jwt/jwt/v4": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/lestrrat-go/jwx/jwa": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/lestrrat-go/jwx/jwt": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/lestrrat-go/jwx/jws": "must use github.com/lestrrat-go/jwx/v2" - - "github.com/gogo/status": "must use google.golang.org/grpc/status" - - "github.com/gogo/protobuf": "must use google.golang.org/protobuf" - - "k8s.io/utils/pointer": "must use github.com/dapr/kit/ptr" - - "k8s.io/utils/ptr": "must use github.com/dapr/kit/ptr" - - "github.com/ghodss/yaml": "must use sigs.k8s.io/yaml" - - "gopkg.in/yaml.v2": "must use gopkg.in/yaml.v3" - - "github.com/go-chi/chi$": "must use github.com/go-chi/chi/v5" - - "github.com/benbjohnson/clock": "must use k8s.io/utils/clock" + rules: + main: + deny: + - pkg: "github.com/Sirupsen/logrus" + desc: "must use github.com/dapr/kit/logger" + - pkg: "github.com/agrea/ptr" + desc: "must use github.com/dapr/kit/ptr" + - pkg: "go.uber.org/atomic" + desc: "must use sync/atomic" + - pkg: "golang.org/x/net/context" + desc: "must use context" + - pkg: "github.com/pkg/errors" + desc: "must use standard library (errors package and/or fmt.Errorf)" + - pkg: "github.com/go-chi/chi$" + desc: "must use github.com/go-chi/chi/v5" + - pkg: "github.com/cenkalti/backoff$" + desc: "must use github.com/cenkalti/backoff/v4" + - pkg: "github.com/cenkalti/backoff/v2" + desc: "must use github.com/cenkalti/backoff/v4" + - pkg: "github.com/cenkalti/backoff/v3" + desc: "must use github.com/cenkalti/backoff/v4" + - pkg: "github.com/benbjohnson/clock" + desc: "must use k8s.io/utils/clock" + - pkg: "github.com/ghodss/yaml" + desc: "must use sigs.k8s.io/yaml" + - pkg: "gopkg.in/yaml.v2" + desc: "must use gopkg.in/yaml.v3" + - pkg: "github.com/golang-jwt/jwt" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/golang-jwt/jwt/v2" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/golang-jwt/jwt/v3" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/golang-jwt/jwt/v4" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/gogo/status" + desc: "must use google.golang.org/grpc/status" + - pkg: "github.com/gogo/protobuf" + desc: "must use google.golang.org/protobuf" + - pkg: "github.com/lestrrat-go/jwx/jwa" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/lestrrat-go/jwx/jwt" + desc: "must use github.com/lestrrat-go/jwx/v2" + - pkg: "github.com/labstack/gommon/log" + desc: "must use github.com/dapr/kit/logger" + - pkg: "github.com/gobuffalo/logger" + desc: "must use github.com/dapr/kit/logger" misspell: # Correct spellings using locale preferences for US or UK. # Default is to use a neutral variety of English. @@ -303,3 +323,5 @@ linters: - nosnakecase - varcheck - goconst + - tagalign + - inamedparam diff --git a/bindings/alicloud/dingtalk/webhook/webhook_test.go b/bindings/alicloud/dingtalk/webhook/webhook_test.go index f4b2cee2eb..ea8f5c7a4c 100644 --- a/bindings/alicloud/dingtalk/webhook/webhook_test.go +++ b/bindings/alicloud/dingtalk/webhook/webhook_test.go @@ -45,7 +45,7 @@ func TestPublishMsg(t *testing.T) { //nolint:paralleltest } body, err := io.ReadAll(r.Body) - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, msg, string(body)) })) defer ts.Close() @@ -79,7 +79,7 @@ func TestBindingReadAndInvoke(t *testing.T) { //nolint:paralleltest d := NewDingTalkWebhook(logger.NewLogger("test")) err := d.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) var count int32 ch := make(chan bool, 1) @@ -101,7 +101,7 @@ func TestBindingReadAndInvoke(t *testing.T) { //nolint:paralleltest select { case <-ch: - require.True(t, atomic.LoadInt32(&count) > 0) + require.Greater(t, atomic.LoadInt32(&count), int32(0)) case <-time.After(time.Second): require.FailNow(t, "read timeout") } @@ -117,7 +117,7 @@ func TestBindingClose(t *testing.T) { "id": "x", }, }} - assert.NoError(t, d.Init(context.Background(), m)) - assert.NoError(t, d.Close()) - assert.NoError(t, d.Close(), "second close should not error") + require.NoError(t, d.Init(context.Background(), m)) + require.NoError(t, d.Close()) + require.NoError(t, d.Close(), "second close should not error") } diff --git a/bindings/alicloud/oss/oss_test.go b/bindings/alicloud/oss/oss_test.go index e6a330d908..66a26ed562 100644 --- a/bindings/alicloud/oss/oss_test.go +++ b/bindings/alicloud/oss/oss_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -26,7 +27,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"AccessKey": "key", "Endpoint": "endpoint", "AccessKeyID": "accessKeyID", "Bucket": "test"} aliCloudOSS := AliCloudOSS{} meta, err := aliCloudOSS.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "endpoint", meta.Endpoint) assert.Equal(t, "accessKeyID", meta.AccessKeyID) diff --git a/bindings/alicloud/sls/sls_test.go b/bindings/alicloud/sls/sls_test.go index e824c089cd..1967ccab59 100644 --- a/bindings/alicloud/sls/sls_test.go +++ b/bindings/alicloud/sls/sls_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -23,7 +24,7 @@ func TestSlsLogstorageMetadata(t *testing.T) { meta, err := aliCloudSlsLogstorage.parseMeta(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "ENDPOINT", meta.Endpoint) assert.Equal(t, "ACCESSKEYID", meta.AccessKeyID) assert.Equal(t, "ACCESSKEYSECRET", meta.AccessKeySecret) diff --git a/bindings/alicloud/tablestore/tablestore_test.go b/bindings/alicloud/tablestore/tablestore_test.go index a9fd6c5552..c021d3e904 100644 --- a/bindings/alicloud/tablestore/tablestore_test.go +++ b/bindings/alicloud/tablestore/tablestore_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -33,7 +34,7 @@ func TestTableStoreMetadata(t *testing.T) { meta, err := aliCloudTableStore.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "ACCESSKEYID", meta.AccessKeyID) assert.Equal(t, "ACCESSKEY", meta.AccessKey) assert.Equal(t, "INSTANCENAME", meta.InstanceName) @@ -60,7 +61,7 @@ func TestDataEncodeAndDecode(t *testing.T) { "column2": int64(2), } data, err := json.Marshal(putData) - assert.Nil(t, err) + require.NoError(t, err) putRowReq := &bindings.InvokeRequest{ Operation: bindings.CreateOperation, Metadata: map[string]string{ @@ -72,7 +73,7 @@ func TestDataEncodeAndDecode(t *testing.T) { putInvokeResp, err := aliCloudTableStore.Invoke(context.Background(), putRowReq) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, putInvokeResp) putRowReq.Data, _ = json.Marshal(map[string]interface{}{ @@ -83,14 +84,14 @@ func TestDataEncodeAndDecode(t *testing.T) { putInvokeResp, err = aliCloudTableStore.Invoke(context.Background(), putRowReq) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, putInvokeResp) // test get getData, err := json.Marshal(map[string]interface{}{ "pk1": "data1", }) - assert.Nil(t, err) + require.NoError(t, err) getInvokeReq := &bindings.InvokeRequest{ Operation: bindings.GetOperation, Metadata: map[string]string{ @@ -103,13 +104,13 @@ func TestDataEncodeAndDecode(t *testing.T) { getInvokeResp, err := aliCloudTableStore.Invoke(context.Background(), getInvokeReq) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, getInvokeResp) respData := make(map[string]interface{}) err = json.Unmarshal(getInvokeResp.Data, &respData) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, putData["column1"], respData["column1"]) assert.Equal(t, putData["column2"], int64(respData["column2"].(float64))) @@ -123,7 +124,7 @@ func TestDataEncodeAndDecode(t *testing.T) { "pk1": "data2", }, }) - assert.Nil(t, err) + require.NoError(t, err) listReq := &bindings.InvokeRequest{ Operation: bindings.ListOperation, @@ -136,23 +137,23 @@ func TestDataEncodeAndDecode(t *testing.T) { } listResp, err := aliCloudTableStore.Invoke(context.Background(), listReq) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, listResp) listRespData := make([]map[string]interface{}, len(listData)) err = json.Unmarshal(listResp.Data, &listRespData) - assert.Nil(t, err) + require.NoError(t, err) assert.Len(t, listRespData, 2) assert.Equal(t, listRespData[0]["column1"], putData["column1"]) - assert.Equal(t, listRespData[1]["pk1"], "data2") + assert.Equal(t, "data2", listRespData[1]["pk1"]) // test delete deleteData, err := json.Marshal(map[string]interface{}{ "pk1": "data1", }) - assert.Nil(t, err) + require.NoError(t, err) deleteReq := &bindings.InvokeRequest{ Operation: bindings.DeleteOperation, @@ -165,12 +166,12 @@ func TestDataEncodeAndDecode(t *testing.T) { deleteResp, err := aliCloudTableStore.Invoke(context.Background(), deleteReq) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, deleteResp) getInvokeResp, err = aliCloudTableStore.Invoke(context.Background(), getInvokeReq) - assert.Nil(t, err) + require.NoError(t, err) assert.Nil(t, getInvokeResp.Data) } diff --git a/bindings/apns/apns_test.go b/bindings/apns/apns_test.go index afe0ba6d69..8b887509ca 100644 --- a/bindings/apns/apns_test.go +++ b/bindings/apns/apns_test.go @@ -23,6 +23,7 @@ import ( jsoniter "github.com/json-iterator/go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -52,7 +53,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, developmentPrefix, binding.urlPrefix) }) @@ -67,7 +68,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, productionPrefix, binding.urlPrefix) }) @@ -81,7 +82,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, productionPrefix, binding.urlPrefix) }) @@ -94,7 +95,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Error(t, err, "the key-id parameter is required") + require.Error(t, err, "the key-id parameter is required") }) t.Run("valid key ID", func(t *testing.T) { @@ -107,7 +108,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, testKeyID, binding.authorizationBuilder.keyID) }) @@ -120,7 +121,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Error(t, err, "the team-id parameter is required") + require.Error(t, err, "the team-id parameter is required") }) t.Run("valid team ID", func(t *testing.T) { @@ -133,7 +134,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, testTeamID, binding.authorizationBuilder.teamID) }) @@ -146,7 +147,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Error(t, err, "the private-key parameter is required") + require.Error(t, err, "the private-key parameter is required") }) t.Run("valid private key", func(t *testing.T) { @@ -159,7 +160,7 @@ func TestInit(t *testing.T) { }} binding := NewAPNS(testLogger).(*APNS) err := binding.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, binding.authorizationBuilder.privateKey) }) } @@ -168,7 +169,7 @@ func TestOperations(t *testing.T) { testLogger := logger.NewLogger("test") testBinding := NewAPNS(testLogger).(*APNS) operations := testBinding.Operations() - assert.Equal(t, 1, len(operations)) + assert.Len(t, operations, 1) assert.Equal(t, bindings.CreateOperation, operations[0]) } @@ -192,7 +193,7 @@ func TestInvoke(t *testing.T) { testBinding := makeTestBinding(t, testLogger) req := &bindings.InvokeRequest{Operation: bindings.DeleteOperation} _, err := testBinding.Invoke(context.TODO(), req) - assert.Error(t, err, "operation not supported: delete") + require.Error(t, err, "operation not supported: delete") }) t.Run("the device token is required", func(t *testing.T) { @@ -202,7 +203,7 @@ func TestInvoke(t *testing.T) { Metadata: map[string]string{}, } _, err := testBinding.Invoke(context.TODO(), req) - assert.Error(t, err, "the device-token parameter is required") + require.Error(t, err, "the device-token parameter is required") }) t.Run("the authorization header is sent", func(t *testing.T) { @@ -287,12 +288,12 @@ func TestInvoke(t *testing.T) { return successResponse() }) response, err := testBinding.Invoke(context.TODO(), successRequest) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, response.Data) var body notificationResponse decoder := jsoniter.NewDecoder(bytes.NewReader(response.Data)) err = decoder.Decode(&body) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "12345", body.MessageID) }) @@ -307,7 +308,7 @@ func TestInvoke(t *testing.T) { } }) _, err := testBinding.Invoke(context.TODO(), successRequest) - assert.Error(t, err, "BadDeviceToken") + require.Error(t, err, "BadDeviceToken") }) } @@ -322,7 +323,7 @@ func makeTestBinding(t *testing.T, log logger.Logger) *APNS { }, }} err := testBinding.Init(context.Background(), bindingMetadata) - assert.Nil(t, err) + require.NoError(t, err) return testBinding } diff --git a/bindings/aws/dynamodb/dynamodb_test.go b/bindings/aws/dynamodb/dynamodb_test.go index faee9ade0b..faf9530548 100644 --- a/bindings/aws/dynamodb/dynamodb_test.go +++ b/bindings/aws/dynamodb/dynamodb_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -28,7 +29,7 @@ func TestParseMetadata(t *testing.T) { } dy := DynamoDB{} meta, err := dy.getDynamoDBMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.AccessKey) assert.Equal(t, "a", meta.Region) assert.Equal(t, "a", meta.SecretKey) diff --git a/bindings/aws/kinesis/kinesis_test.go b/bindings/aws/kinesis/kinesis_test.go index 38a8c02d18..aaca0c3c0a 100644 --- a/bindings/aws/kinesis/kinesis_test.go +++ b/bindings/aws/kinesis/kinesis_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -35,7 +36,7 @@ func TestParseMetadata(t *testing.T) { } kinesis := AWSKinesis{} meta, err := kinesis.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "region", meta.Region) assert.Equal(t, "secret", meta.SecretKey) diff --git a/bindings/aws/s3/s3_test.go b/bindings/aws/s3/s3_test.go index ed4778f24f..d08bae390c 100644 --- a/bindings/aws/s3/s3_test.go +++ b/bindings/aws/s3/s3_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -40,16 +41,16 @@ func TestParseMetadata(t *testing.T) { s3 := AWSS3{} meta, err := s3.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "region", meta.Region) assert.Equal(t, "secret", meta.SecretKey) assert.Equal(t, "test", meta.Bucket) assert.Equal(t, "endpoint", meta.Endpoint) assert.Equal(t, "token", meta.SessionToken) - assert.Equal(t, true, meta.ForcePathStyle) - assert.Equal(t, true, meta.DisableSSL) - assert.Equal(t, true, meta.InsecureSSL) + assert.True(t, meta.ForcePathStyle) + assert.True(t, meta.DisableSSL) + assert.True(t, meta.InsecureSSL) }) } @@ -67,14 +68,14 @@ func TestMergeWithRequestMetadata(t *testing.T) { } s3 := AWSS3{} meta, err := s3.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "region", meta.Region) assert.Equal(t, "secret", meta.SecretKey) assert.Equal(t, "test", meta.Bucket) assert.Equal(t, "endpoint", meta.Endpoint) assert.Equal(t, "token", meta.SessionToken) - assert.Equal(t, true, meta.ForcePathStyle) + assert.True(t, meta.ForcePathStyle) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -86,16 +87,16 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "key", mergedMeta.AccessKey) assert.Equal(t, "region", mergedMeta.Region) assert.Equal(t, "secret", mergedMeta.SecretKey) assert.Equal(t, "test", mergedMeta.Bucket) assert.Equal(t, "endpoint", mergedMeta.Endpoint) assert.Equal(t, "token", mergedMeta.SessionToken) - assert.Equal(t, true, meta.ForcePathStyle) - assert.Equal(t, true, mergedMeta.DecodeBase64) - assert.Equal(t, false, mergedMeta.EncodeBase64) + assert.True(t, meta.ForcePathStyle) + assert.True(t, mergedMeta.DecodeBase64) + assert.False(t, mergedMeta.EncodeBase64) assert.Equal(t, "/usr/vader.darth", mergedMeta.FilePath) assert.Equal(t, "15s", mergedMeta.PresignTTL) }) @@ -113,14 +114,14 @@ func TestMergeWithRequestMetadata(t *testing.T) { } s3 := AWSS3{} meta, err := s3.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "region", meta.Region) assert.Equal(t, "secret", meta.SecretKey) assert.Equal(t, "test", meta.Bucket) assert.Equal(t, "endpoint", meta.Endpoint) assert.Equal(t, "token", meta.SessionToken) - assert.Equal(t, true, meta.ForcePathStyle) + assert.True(t, meta.ForcePathStyle) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -129,7 +130,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, mergedMeta.DecodeBase64) }) @@ -146,14 +147,14 @@ func TestMergeWithRequestMetadata(t *testing.T) { } s3 := AWSS3{} meta, err := s3.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "key", meta.AccessKey) assert.Equal(t, "region", meta.Region) assert.Equal(t, "secret", meta.SecretKey) assert.Equal(t, "test", meta.Bucket) assert.Equal(t, "endpoint", meta.Endpoint) assert.Equal(t, "token", meta.SessionToken) - assert.Equal(t, true, meta.ForcePathStyle) + assert.True(t, meta.ForcePathStyle) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -162,7 +163,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, mergedMeta.EncodeBase64) }) } @@ -174,7 +175,7 @@ func TestGetOption(t *testing.T) { t.Run("return error if key is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := s3.get(context.Background(), &r) - assert.Error(t, err) + require.Error(t, err) }) } @@ -185,6 +186,6 @@ func TestDeleteOption(t *testing.T) { t.Run("return error if key is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := s3.delete(context.Background(), &r) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/bindings/aws/ses/ses_test.go b/bindings/aws/ses/ses_test.go index 98ac0229bc..ab05f371d8 100644 --- a/bindings/aws/ses/ses_test.go +++ b/bindings/aws/ses/ses_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -40,7 +41,7 @@ func TestParseMetadata(t *testing.T) { } r := AWSSES{logger: logger} smtpMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "myRegionForSES", smtpMeta.Region) assert.Equal(t, "myAccessKeyForSES", smtpMeta.AccessKey) assert.Equal(t, "mySecretKeyForSES", smtpMeta.SecretKey) diff --git a/bindings/aws/sns/sns_test.go b/bindings/aws/sns/sns_test.go index 53e2f7b51d..20a344ebe9 100644 --- a/bindings/aws/sns/sns_test.go +++ b/bindings/aws/sns/sns_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -28,7 +29,7 @@ func TestParseMetadata(t *testing.T) { } s := AWSSNS{} snsM, err := s.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", snsM.TopicArn) assert.Equal(t, "a", snsM.Region) assert.Equal(t, "a", snsM.AccessKey) diff --git a/bindings/aws/sqs/sqs_test.go b/bindings/aws/sqs/sqs_test.go index 996d4a3635..c1d4d69838 100644 --- a/bindings/aws/sqs/sqs_test.go +++ b/bindings/aws/sqs/sqs_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" ) @@ -28,7 +29,7 @@ func TestParseMetadata(t *testing.T) { } s := AWSSQS{} sqsM, err := s.parseSQSMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", sqsM.QueueName) assert.Equal(t, "a", sqsM.Region) assert.Equal(t, "a", sqsM.AccessKey) diff --git a/bindings/azure/blobstorage/blobstorage_test.go b/bindings/azure/blobstorage/blobstorage_test.go index fbcb6e54e1..6bce9365eb 100644 --- a/bindings/azure/blobstorage/blobstorage_test.go +++ b/bindings/azure/blobstorage/blobstorage_test.go @@ -17,7 +17,7 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -29,9 +29,8 @@ func TestGetOption(t *testing.T) { t.Run("return error if blobName is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := blobStorage.get(context.Background(), &r) - if assert.Error(t, err) { - assert.Equal(t, ErrMissingBlobName, err) - } + require.Error(t, err) + require.ErrorIs(t, err, ErrMissingBlobName) }) } @@ -41,9 +40,8 @@ func TestDeleteOption(t *testing.T) { t.Run("return error if blobName is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := blobStorage.delete(context.Background(), &r) - if assert.Error(t, err) { - assert.Equal(t, ErrMissingBlobName, err) - } + require.Error(t, err) + require.ErrorIs(t, err, ErrMissingBlobName) }) t.Run("return error for invalid deleteSnapshots", func(t *testing.T) { @@ -53,6 +51,6 @@ func TestDeleteOption(t *testing.T) { "deleteSnapshots": "invalid", } _, err := blobStorage.delete(context.Background(), &r) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/bindings/azure/cosmosdb/cosmosdb_test.go b/bindings/azure/cosmosdb/cosmosdb_test.go index 673c7436d8..b4fe5bde58 100644 --- a/bindings/azure/cosmosdb/cosmosdb_test.go +++ b/bindings/azure/cosmosdb/cosmosdb_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -28,7 +29,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"Collection": "a", "Database": "a", "MasterKey": "a", "PartitionKey": "a", "URL": "a"} cosmosDB := CosmosDB{logger: logger.NewLogger("test")} meta, err := cosmosDB.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Collection) assert.Equal(t, "a", meta.Database) assert.Equal(t, "a", meta.MasterKey) @@ -46,32 +47,32 @@ func TestPartitionKeyValue(t *testing.T) { // Valid single partition key val, err := cosmosDB.getPartitionKeyValue("name", obj) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "name", val) // Not existing key _, err = cosmosDB.getPartitionKeyValue("notexists", obj) - assert.NotNil(t, err) + require.Error(t, err) // // Empty value for the key _, err = cosmosDB.getPartitionKeyValue("empty", obj) - assert.NotNil(t, err) + require.Error(t, err) // Valid nested partition key val, err = cosmosDB.getPartitionKeyValue("address.zip", obj) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "zipcode", val) // Valid nested three level partition key val, err = cosmosDB.getPartitionKeyValue("address.planet.name", obj) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "earth", val) // Invalid nested partition key _, err = cosmosDB.getPartitionKeyValue("address.notexists", obj) - assert.NotNil(t, err) + require.Error(t, err) // Empty key is passed _, err = cosmosDB.getPartitionKeyValue("", obj) - assert.NotNil(t, err) + require.Error(t, err) } diff --git a/bindings/azure/cosmosdbgremlinapi/cosmosdbgremlinapi_test.go b/bindings/azure/cosmosdbgremlinapi/cosmosdbgremlinapi_test.go index 96adc45bb7..80638bce87 100644 --- a/bindings/azure/cosmosdbgremlinapi/cosmosdbgremlinapi_test.go +++ b/bindings/azure/cosmosdbgremlinapi/cosmosdbgremlinapi_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -27,7 +28,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"Url": "a", "masterKey": "a", "username": "a"} cosmosdbgremlinapi := CosmosDBGremlinAPI{logger: logger.NewLogger("test")} im, err := cosmosdbgremlinapi.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", im.URL) assert.Equal(t, "a", im.MasterKey) assert.Equal(t, "a", im.Username) diff --git a/bindings/azure/eventgrid/eventgrid_test.go b/bindings/azure/eventgrid/eventgrid_test.go index cfe200eef5..984f4e8111 100644 --- a/bindings/azure/eventgrid/eventgrid_test.go +++ b/bindings/azure/eventgrid/eventgrid_test.go @@ -48,7 +48,7 @@ func TestParseMetadata(t *testing.T) { err = eh.ensureInputBindingMetadata() require.NoError(t, err) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.azureTenantID) assert.Equal(t, "b", meta.azureSubscriptionID) assert.Equal(t, "c", meta.azureClientID) diff --git a/bindings/azure/eventhubs/eventhubs_integration_test.go b/bindings/azure/eventhubs/eventhubs_integration_test.go index 3276f2bee2..74222c0c13 100644 --- a/bindings/azure/eventhubs/eventhubs_integration_test.go +++ b/bindings/azure/eventhubs/eventhubs_integration_test.go @@ -154,7 +154,7 @@ func testReadIotHubEvents(t *testing.T) { cmd := exec.Command("/bin/bash", "../../../tests/scripts/send-iot-device-events.sh") cmd.Env = append(os.Environ(), fmt.Sprintf("IOT_HUB_NAME=%s", os.Getenv(iotHubNameEnvKey))) out, err := cmd.CombinedOutput() - assert.NoError(t, err, "Error in send-iot-device-events.sh:\n%s", out) + require.NoError(t, err, "Error in send-iot-device-events.sh:\n%s", out) // Setup Read binding to capture readResponses in a closure so that test asserts can be // performed on the main thread, including the case where the handler is never invoked. diff --git a/bindings/azure/signalr/signalr_test.go b/bindings/azure/signalr/signalr_test.go index 331b4bd2ef..44d7121c28 100644 --- a/bindings/azure/signalr/signalr_test.go +++ b/bindings/azure/signalr/signalr_test.go @@ -264,7 +264,7 @@ func TestInvalidConfigurations(t *testing.T) { t.Run(tt.name, func(t *testing.T) { s := NewSignalR(logger.NewLogger("test")).(*SignalR) err := s.parseMetadata(tt.properties) - assert.Error(t, err) + require.Error(t, err) }) } } @@ -318,7 +318,7 @@ func TestWriteShouldFail(t *testing.T) { Metadata: map[string]string{}, }) - assert.Error(t, err) + require.Error(t, err) }) t.Run("SignalR call failed should be returned", func(t *testing.T) { @@ -346,7 +346,7 @@ func TestWriteShouldFail(t *testing.T) { }, }) - assert.Error(t, err) + require.Error(t, err) }) } @@ -407,7 +407,7 @@ func TestWriteShouldSucceed(t *testing.T) { }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), httpTransport.requestCount) assert.Equal(t, tt.expectedURL, httpTransport.request.URL.String()) assert.NotNil(t, httpTransport.request) @@ -441,7 +441,7 @@ func TestGetShouldSucceed(t *testing.T) { Operation: "clientNegotiate", }) - assert.NoError(t, err) + require.NoError(t, err) // when it is accessKey mode, there is no outbound call assert.Equal(t, int32(0), httpTransport.requestCount) @@ -450,13 +450,13 @@ func TestGetShouldSucceed(t *testing.T) { assert.NotNil(t, res.Data) var data map[string]string err = json.Unmarshal(res.Data, &data) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "https://fake.service.signalr.net/client/?hub=testhub", data["url"]) accessToken := data["accessToken"] assert.NotNil(t, accessToken) claims, err := jwt.ParseString(accessToken, jwt.WithVerify(false)) - assert.NoError(t, err) + require.NoError(t, err) audience := claims.Audience() assert.Equal(t, []string{"https://fake.service.signalr.net/client/?hub=testhub"}, audience) }) @@ -472,7 +472,7 @@ func TestGetShouldSucceed(t *testing.T) { Operation: "clientNegotiate", }) - assert.NoError(t, err) + require.NoError(t, err) // when it is accessKey mode, there is no outbound call assert.Equal(t, int32(0), httpTransport.requestCount) @@ -481,13 +481,13 @@ func TestGetShouldSucceed(t *testing.T) { assert.NotNil(t, res.Data) var data map[string]string err = json.Unmarshal(res.Data, &data) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "https://fake.service.signalr.net/client/?hub=testhub", data["url"]) accessToken := data["accessToken"] assert.NotNil(t, accessToken) claims, err := jwt.ParseString(accessToken, jwt.WithVerify(false)) - assert.NoError(t, err) + require.NoError(t, err) audience := claims.Audience() assert.Equal(t, []string{"https://fake.service.signalr.net/client/?hub=testhub"}, audience) user := claims.Subject() @@ -508,7 +508,7 @@ func TestGetShouldSucceed(t *testing.T) { Operation: "clientNegotiate", }) - assert.NoError(t, err) + require.NoError(t, err) // when it is accessKey mode, there is no outbound call assert.Equal(t, int32(1), httpTransport.requestCount) @@ -520,7 +520,7 @@ func TestGetShouldSucceed(t *testing.T) { assert.NotNil(t, res.Data) var data map[string]string err = json.Unmarshal(res.Data, &data) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "https://fake.service.signalr.net/client/?hub=testhub", data["url"]) accessToken := data["accessToken"] assert.Equal(t, "ABCDEFG.ABC.ABC", accessToken) diff --git a/bindings/azure/storagequeues/storagequeues_test.go b/bindings/azure/storagequeues/storagequeues_test.go index 1fea2d1123..27f72de692 100644 --- a/bindings/azure/storagequeues/storagequeues_test.go +++ b/bindings/azure/storagequeues/storagequeues_test.go @@ -104,7 +104,7 @@ func TestWriteQueue(t *testing.T) { _, err = a.Invoke(context.Background(), &r) require.NoError(t, err) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } func TestWriteWithTTLInQueue(t *testing.T) { @@ -126,7 +126,7 @@ func TestWriteWithTTLInQueue(t *testing.T) { _, err = a.Invoke(context.Background(), &r) require.NoError(t, err) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } func TestWriteWithTTLInWrite(t *testing.T) { @@ -151,7 +151,7 @@ func TestWriteWithTTLInWrite(t *testing.T) { _, err = a.Invoke(context.Background(), &r) require.NoError(t, err) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } // Uncomment this function to write a message to local storage queue @@ -195,7 +195,7 @@ func TestReadQueue(t *testing.T) { handler := func(ctx context.Context, data *bindings.ReadResponse) ([]byte, error) { received++ s := string(data.Data) - assert.Equal(t, s, "This is my message") + assert.Equal(t, "This is my message", s) cancel() return nil, nil @@ -210,7 +210,7 @@ func TestReadQueue(t *testing.T) { t.Fatal("Timeout waiting for messages") } assert.Equal(t, 1, received) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } func TestReadQueueDecode(t *testing.T) { @@ -237,7 +237,7 @@ func TestReadQueueDecode(t *testing.T) { handler := func(ctx context.Context, data *bindings.ReadResponse) ([]byte, error) { received++ s := string(data.Data) - assert.Equal(t, s, "This is my message") + assert.Equal(t, "This is my message", s) cancel() return nil, nil @@ -252,7 +252,7 @@ func TestReadQueueDecode(t *testing.T) { t.Fatal("Timeout waiting for messages") } assert.Equal(t, 1, received) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } // Uncomment this function to test reding from local queue @@ -302,7 +302,7 @@ func TestReadQueueNoMessage(t *testing.T) { handler := func(ctx context.Context, data *bindings.ReadResponse) ([]byte, error) { received++ s := string(data.Data) - assert.Equal(t, s, "This is my message") + assert.Equal(t, "This is my message", s) return nil, nil } @@ -311,7 +311,7 @@ func TestReadQueueNoMessage(t *testing.T) { time.Sleep(1 * time.Second) cancel() assert.Equal(t, 0, received) - assert.NoError(t, a.Close()) + require.NoError(t, a.Close()) } func TestParseMetadata(t *testing.T) { @@ -440,7 +440,7 @@ func TestParseMetadataWithInvalidTTL(t *testing.T) { m.Properties = tt.properties _, err := parseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) } } diff --git a/bindings/commercetools/commercetools_test.go b/bindings/commercetools/commercetools_test.go index 768734b26a..fd8b1193dc 100644 --- a/bindings/commercetools/commercetools_test.go +++ b/bindings/commercetools/commercetools_test.go @@ -20,6 +20,7 @@ import ( "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestParseMetadata(t *testing.T) { @@ -30,7 +31,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"region": "a", "provider": "a", "projectKey": "a", "clientID": "a", "clientSecret": "a", "scopes": "b"} k := Binding{logger: logger} meta, err := k.getCommercetoolsMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Region) assert.Equal(t, "a", meta.Provider) assert.Equal(t, "a", meta.ProjectKey) diff --git a/bindings/cron/cron_test.go b/bindings/cron/cron_test.go index 94380c67de..e64dd6eb07 100644 --- a/bindings/cron/cron_test.go +++ b/bindings/cron/cron_test.go @@ -22,6 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "k8s.io/utils/clock" clocktesting "k8s.io/utils/clock/testing" @@ -86,9 +87,9 @@ func TestCronInitSuccess(t *testing.T) { c := getNewCron() err := c.Init(context.Background(), getTestMetadata(test.schedule)) if test.errorExpected { - assert.Errorf(t, err, "Got no error while initializing an invalid schedule: %s", test.schedule) + require.Errorf(t, err, "Got no error while initializing an invalid schedule: %s", test.schedule) } else { - assert.NoErrorf(t, err, "error initializing valid schedule: %s", test.schedule) + require.NoErrorf(t, err, "error initializing valid schedule: %s", test.schedule) } } } @@ -99,7 +100,7 @@ func TestCronRead(t *testing.T) { clk := clocktesting.NewFakeClock(time.Now()) c := getNewCronWithClock(clk) schedule := "@every 1s" - assert.NoErrorf(t, c.Init(context.Background(), getTestMetadata(schedule)), "error initializing valid schedule") + require.NoErrorf(t, c.Init(context.Background(), getTestMetadata(schedule)), "error initializing valid schedule") expectedCount := int32(5) var observedCount atomic.Int32 err := c.Read(context.Background(), func(ctx context.Context, res *bindings.ReadResponse) ([]byte, error) { @@ -119,15 +120,15 @@ func TestCronRead(t *testing.T) { return observedCount.Load() == expectedCount }, time.Second, time.Millisecond*10, "Cron did not trigger expected number of times, expected %d, got %d", expectedCount, observedCount.Load()) - assert.NoErrorf(t, err, "error on read") - assert.NoError(t, c.Close()) + require.NoErrorf(t, err, "error on read") + require.NoError(t, c.Close()) } func TestCronReadWithContextCancellation(t *testing.T) { clk := clocktesting.NewFakeClock(time.Now()) c := getNewCronWithClock(clk) schedule := "@every 1s" - assert.NoErrorf(t, c.Init(context.Background(), getTestMetadata(schedule)), "error initializing valid schedule") + require.NoErrorf(t, c.Init(context.Background(), getTestMetadata(schedule)), "error initializing valid schedule") expectedCount := int32(5) var observedCount atomic.Int32 ctx, cancel := context.WithCancel(context.Background()) @@ -152,6 +153,6 @@ func TestCronReadWithContextCancellation(t *testing.T) { return observedCount.Load() == expectedCount }, time.Second, time.Millisecond*10, "Cron did not trigger expected number of times, expected %d, got %d", expectedCount, observedCount.Load()) - assert.NoErrorf(t, err, "error on read") - assert.NoError(t, c.Close()) + require.NoErrorf(t, err, "error on read") + require.NoError(t, c.Close()) } diff --git a/bindings/dubbo/dubbo_output_test.go b/bindings/dubbo/dubbo_output_test.go index 46b57d9790..cc710b410d 100644 --- a/bindings/dubbo/dubbo_output_test.go +++ b/bindings/dubbo/dubbo_output_test.go @@ -23,6 +23,7 @@ import ( dubboImpl "dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl" hessian "github.com/apache/dubbo-go-hessian2" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -58,7 +59,7 @@ func TestInvoke(t *testing.T) { output := NewDubboOutput(logger.NewLogger("test")) dubboImpl.SetSerializer(constant.Hessian2Serialization, HessianSerializer{}) go func() { - assert.Nil(t, runDubboServer(stopCh)) + require.NoError(t, runDubboServer(stopCh)) }() time.Sleep(time.Second * 3) @@ -71,9 +72,9 @@ func TestInvoke(t *testing.T) { hessian.RegisterPOJO(reqUser) argTypeList, _ := dubboImpl.GetArgsTypeList([]interface{}{reqUser}) err := enc.Encode(argTypeList) - assert.Nil(t, err) + require.NoError(t, err) err = enc.Encode(reqUser) - assert.Nil(t, err) + require.NoError(t, err) reqData := enc.Buffer() // 3. invoke dapr dubbo output binding, get rsp bytes @@ -87,16 +88,16 @@ func TestInvoke(t *testing.T) { Data: reqData, Operation: bindings.GetOperation, }) - assert.Nil(t, err) + require.NoError(t, err) // 4. get rsp value decoder := hessian.NewDecoder(rsp.Data) _, err = decoder.Decode() // decode type - assert.Nil(t, err) + require.NoError(t, err) rspDecodedValue, err := decoder.Decode() // decode value - assert.Nil(t, err) + require.NoError(t, err) err = hessian.ReflectResponse(rspDecodedValue, rspUser) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, helloPrefix+reqUser.Name, rspUser.Name) } diff --git a/bindings/gcp/bucket/bucket_test.go b/bindings/gcp/bucket/bucket_test.go index 92e1ae3ebb..20fb87a9a2 100644 --- a/bindings/gcp/bucket/bucket_test.go +++ b/bindings/gcp/bucket/bucket_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -42,7 +43,7 @@ func TestParseMetadata(t *testing.T) { } gs := GCPStorage{logger: logger.NewLogger("test")} meta, err := gs.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) t.Run("Metadata is correctly decoded", func(t *testing.T) { assert.Equal(t, "my_auth_provider_x509", meta.AuthProviderCertURL) @@ -60,7 +61,7 @@ func TestParseMetadata(t *testing.T) { t.Run("Metadata is correctly marshalled to JSON", func(t *testing.T) { json, err := json.Marshal(meta) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "{\"type\":\"my_type\",\"project_id\":\"my_project_id\",\"private_key_id\":\"my_private_key_id\","+ "\"private_key\":\"my_private_key\",\"client_email\":\"my_email@mail.dapr\",\"client_id\":\"my_client_id\","+ @@ -102,7 +103,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { } gs := GCPStorage{logger: logger.NewLogger("test")} meta, err := gs.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "my_auth_provider_x509", meta.AuthProviderCertURL) assert.Equal(t, "my_auth_uri", meta.AuthURI) @@ -115,7 +116,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { assert.Equal(t, "my_project_id", meta.ProjectID) assert.Equal(t, "my_token_uri", meta.TokenURI) assert.Equal(t, "my_type", meta.Type) - assert.Equal(t, false, meta.DecodeBase64) + assert.False(t, meta.DecodeBase64) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -124,7 +125,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "my_auth_provider_x509", mergedMeta.AuthProviderCertURL) assert.Equal(t, "my_auth_uri", mergedMeta.AuthURI) @@ -137,7 +138,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { assert.Equal(t, "my_project_id", mergedMeta.ProjectID) assert.Equal(t, "my_token_uri", mergedMeta.TokenURI) assert.Equal(t, "my_type", mergedMeta.Type) - assert.Equal(t, true, mergedMeta.DecodeBase64) + assert.True(t, mergedMeta.DecodeBase64) }) t.Run("Has invalid merged metadata decodeBase64", func(t *testing.T) { @@ -158,7 +159,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { } gs := GCPStorage{logger: logger.NewLogger("test")} meta, err := gs.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "my_auth_provider_x509", meta.AuthProviderCertURL) assert.Equal(t, "my_auth_uri", meta.AuthURI) @@ -171,7 +172,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { assert.Equal(t, "my_project_id", meta.ProjectID) assert.Equal(t, "my_token_uri", meta.TokenURI) assert.Equal(t, "my_type", meta.Type) - assert.Equal(t, false, meta.DecodeBase64) + assert.False(t, meta.DecodeBase64) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -180,7 +181,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, mergedMeta) assert.False(t, mergedMeta.DecodeBase64) }) @@ -203,7 +204,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { } gs := GCPStorage{logger: logger.NewLogger("test")} meta, err := gs.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "my_auth_provider_x509", meta.AuthProviderCertURL) assert.Equal(t, "my_auth_uri", meta.AuthURI) @@ -216,8 +217,8 @@ func TestMergeWithRequestMetadata(t *testing.T) { assert.Equal(t, "my_project_id", meta.ProjectID) assert.Equal(t, "my_token_uri", meta.TokenURI) assert.Equal(t, "my_type", meta.Type) - assert.Equal(t, false, meta.DecodeBase64) - assert.Equal(t, true, meta.EncodeBase64) + assert.False(t, meta.DecodeBase64) + assert.True(t, meta.EncodeBase64) request := bindings.InvokeRequest{} request.Metadata = map[string]string{ @@ -226,7 +227,7 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := meta.mergeWithRequestMetadata(&request) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, mergedMeta) assert.False(t, mergedMeta.EncodeBase64) }) @@ -238,7 +239,7 @@ func TestGetOption(t *testing.T) { t.Run("return error if key is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := gs.get(context.TODO(), &r) - assert.Error(t, err) + require.Error(t, err) }) } @@ -249,6 +250,6 @@ func TestDeleteOption(t *testing.T) { t.Run("return error if key is missing", func(t *testing.T) { r := bindings.InvokeRequest{} _, err := gs.delete(context.TODO(), &r) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/bindings/gcp/pubsub/pubsub_test.go b/bindings/gcp/pubsub/pubsub_test.go index 6491d4d2d6..cd4d3f8171 100644 --- a/bindings/gcp/pubsub/pubsub_test.go +++ b/bindings/gcp/pubsub/pubsub_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -31,11 +32,11 @@ func TestInit(t *testing.T) { } ps := GCPPubSub{logger: logger.NewLogger("test")} b, err := ps.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) var pubsubMeta pubSubMetadata err = json.Unmarshal(b, &pubsubMeta) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "s1", pubsubMeta.Subscription) assert.Equal(t, "t1", pubsubMeta.Topic) diff --git a/bindings/graphql/graphql_test.go b/bindings/graphql/graphql_test.go index bec8ae0cac..6f35c64731 100644 --- a/bindings/graphql/graphql_test.go +++ b/bindings/graphql/graphql_test.go @@ -35,7 +35,7 @@ func TestOperations(t *testing.T) { b := NewGraphQL(nil) assert.NotNil(t, b) l := b.Operations() - assert.Equal(t, 2, len(l)) + assert.Len(t, l, 2) }) } diff --git a/bindings/http/http_test.go b/bindings/http/http_test.go index 9bf030a0f3..8a5b731ffe 100644 --- a/bindings/http/http_test.go +++ b/bindings/http/http_test.go @@ -196,7 +196,7 @@ func TestSecurityTokenHeaderForwarded(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "12345", handler.Headers["X-Token"]) }) @@ -212,7 +212,7 @@ func TestSecurityTokenHeaderForwarded(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) assert.Empty(t, handler.Headers["X-Token"]) }) } @@ -235,7 +235,7 @@ func TestTraceHeadersForwarded(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "12345", handler.Headers["Traceparent"]) assert.Equal(t, "67890", handler.Headers["Tracestate"]) }) @@ -250,7 +250,7 @@ func TestTraceHeadersForwarded(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) _, traceParentExists := handler.Headers["Traceparent"] assert.False(t, traceParentExists) _, traceStateExists := handler.Headers["Tracestate"] @@ -267,7 +267,7 @@ func TestTraceHeadersForwarded(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "12345", handler.Headers["Traceparent"]) assert.Equal(t, "67890", handler.Headers["Tracestate"]) }) @@ -290,7 +290,7 @@ func InitBindingForHTTPS(s *httptest.Server, extraProps map[string]string) (bind func mTLSHandler(w http.ResponseWriter, r *http.Request) { // r.TLS gets ignored by HTTP handlers. // in case where client auth is not required, r.TLS.PeerCertificates will be empty. - res := fmt.Sprintf("%v", len(r.TLS.PeerCertificates)) + res := strconv.Itoa(len(r.TLS.PeerCertificates)) io.WriteString(w, res) } @@ -381,10 +381,10 @@ func TestHTTPSBinding(t *testing.T) { statusCode: 200, }.ToInvokeRequest() response, err := hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) peerCerts, err := strconv.Atoi(string(response.Data)) - assert.NoError(t, err) - assert.True(t, peerCerts > 0) + require.NoError(t, err) + assert.Greater(t, peerCerts, 0) req = TestCase{ input: "EXPECTED", @@ -395,10 +395,10 @@ func TestHTTPSBinding(t *testing.T) { statusCode: 201, }.ToInvokeRequest() response, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) peerCerts, err = strconv.Atoi(string(response.Data)) - assert.NoError(t, err) - assert.True(t, peerCerts > 0) + require.NoError(t, err) + assert.Greater(t, peerCerts, 0) }) t.Run("get with https with no client cert and clientAuthEnabled true", func(t *testing.T) { certMap := map[string]string{} @@ -414,7 +414,7 @@ func TestHTTPSBinding(t *testing.T) { statusCode: 200, }.ToInvokeRequest() _, err = hs.Invoke(context.Background(), &req) - assert.Error(t, err) + require.Error(t, err) }) t.Run("get with https without client cert and clientAuthEnabled false", func(t *testing.T) { @@ -434,13 +434,13 @@ func TestHTTPSBinding(t *testing.T) { statusCode: 200, }.ToInvokeRequest() response, err := hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) peerCerts, err := strconv.Atoi(string(response.Data)) - assert.NoError(t, err) + require.NoError(t, err) // Checking for 0 peer certs as client auth is disabled. // If client auth is enabled, then the number of peer certs will be > 0. // For HTTP, request will not have TLS info only. - assert.True(t, peerCerts == 0) + assert.Equal(t, 0, peerCerts) req = TestCase{ input: "EXPECTED", @@ -451,20 +451,20 @@ func TestHTTPSBinding(t *testing.T) { statusCode: 201, }.ToInvokeRequest() response, err = hs.Invoke(context.Background(), &req) - assert.NoError(t, err) + require.NoError(t, err) peerCerts, err = strconv.Atoi(string(response.Data)) - assert.NoError(t, err) + require.NoError(t, err) // Checking for 0 peer certs as client auth is disabled. // If client auth is enabled, then the number of peer certs will be > 0. // For HTTP, request will not have TLS info only. - assert.True(t, peerCerts == 0) + assert.Equal(t, 0, peerCerts) }) } func setupHTTPSServer(t *testing.T, clientAuthEnabled bool, handler http.Handler) *httptest.Server { server := httptest.NewUnstartedServer(handler) caCertFile, err := os.ReadFile(filepath.Join(".", "testdata", "ca.pem")) - assert.NoError(t, err) + require.NoError(t, err) caCertPool := x509.NewCertPool() caCertPool.AppendCertsFromPEM(caCertFile) @@ -472,7 +472,7 @@ func setupHTTPSServer(t *testing.T, clientAuthEnabled bool, handler http.Handler serverCert := filepath.Join(".", "testdata", "server.pem") serverKey := filepath.Join(".", "testdata", "server.key") cert, err := tls.LoadX509KeyPair(serverCert, serverKey) - assert.NoError(t, err) + require.NoError(t, err) // Create the TLS Config with the CA pool and enable Client certificate validation tlsConfig := &tls.Config{ diff --git a/bindings/huawei/obs/obs_test.go b/bindings/huawei/obs/obs_test.go index 6054594510..8159c82202 100644 --- a/bindings/huawei/obs/obs_test.go +++ b/bindings/huawei/obs/obs_test.go @@ -25,6 +25,7 @@ import ( "github.com/huaweicloud/huaweicloud-sdk-go-obs/obs" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -73,7 +74,7 @@ func TestParseMetadata(t *testing.T) { } meta, err := obs.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "dummy-bucket", meta.Bucket) assert.Equal(t, "dummy-endpoint", meta.Endpoint) assert.Equal(t, "dummy-ak", meta.AccessKey) @@ -93,7 +94,7 @@ func TestInit(t *testing.T) { "secretKey": "dummy-sk", } err := obs.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Init with missing bucket name", func(t *testing.T) { m := bindings.Metadata{} @@ -103,7 +104,7 @@ func TestInit(t *testing.T) { "secretKey": "dummy-sk", } err := obs.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing obs bucket name")) }) t.Run("Init with missing access key", func(t *testing.T) { @@ -114,7 +115,7 @@ func TestInit(t *testing.T) { "secretKey": "dummy-sk", } err := obs.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing the huawei access key")) }) t.Run("Init with missing secret key", func(t *testing.T) { @@ -125,7 +126,7 @@ func TestInit(t *testing.T) { "accessKey": "dummy-ak", } err := obs.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing the huawei secret key")) }) t.Run("Init with missing endpoint", func(t *testing.T) { @@ -136,7 +137,7 @@ func TestInit(t *testing.T) { "secretKey": "dummy-sk", } err := obs.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing obs endpoint")) }) } @@ -146,7 +147,7 @@ func TestOperations(t *testing.T) { t.Run("Count supported operations", func(t *testing.T) { ops := obs.Operations() - assert.Equal(t, 5, len(ops)) + assert.Len(t, ops, 5) }) } @@ -177,11 +178,11 @@ func TestCreateOperation(t *testing.T) { } out, err := mo.create(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data createResponse err = json.Unmarshal(out.Data, &data) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, 200, data.StatusCode) }) @@ -208,11 +209,11 @@ func TestCreateOperation(t *testing.T) { } out, err := mo.create(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data createResponse err = json.Unmarshal(out.Data, &data) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, 200, data.StatusCode) }) @@ -241,7 +242,7 @@ func TestCreateOperation(t *testing.T) { } _, err := mo.create(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Fail create object with obs internal error", func(t *testing.T) { @@ -266,7 +267,7 @@ func TestCreateOperation(t *testing.T) { } _, err := mo.create(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -297,11 +298,11 @@ func TestUploadOperation(t *testing.T) { } out, err := mo.upload(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data createResponse err = json.Unmarshal(out.Data, &data) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, 200, data.StatusCode) }) @@ -328,11 +329,11 @@ func TestUploadOperation(t *testing.T) { } out, err := mo.upload(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data createResponse err = json.Unmarshal(out.Data, &data) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, 200, data.StatusCode) }) @@ -358,7 +359,7 @@ func TestUploadOperation(t *testing.T) { } _, err := mo.upload(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -392,7 +393,7 @@ func TestGetOperation(t *testing.T) { } _, err := mo.get(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Fail get object with no key metadata", func(t *testing.T) { @@ -409,7 +410,7 @@ func TestGetOperation(t *testing.T) { } _, err := mo.get(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Fail get object with obs internal error", func(t *testing.T) { @@ -433,7 +434,7 @@ func TestGetOperation(t *testing.T) { } _, err := mo.get(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Fail get object with no response data", func(t *testing.T) { @@ -465,7 +466,7 @@ func TestGetOperation(t *testing.T) { } _, err := mo.get(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -495,11 +496,11 @@ func TestDeleteOperation(t *testing.T) { } out, err := mo.delete(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data createResponse err = json.Unmarshal(out.Data, &data) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, 200, data.StatusCode) }) @@ -517,7 +518,7 @@ func TestDeleteOperation(t *testing.T) { } _, err := mo.delete(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Fail delete object with obs internal error", func(t *testing.T) { @@ -541,7 +542,7 @@ func TestDeleteOperation(t *testing.T) { } _, err := mo.delete(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -572,7 +573,7 @@ func TestListOperation(t *testing.T) { } _, err := mo.list(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Fail list objects with obs internal error", func(t *testing.T) { @@ -597,7 +598,7 @@ func TestListOperation(t *testing.T) { } _, err := mo.list(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Successfully list objects with default maxResults", func(t *testing.T) { @@ -626,7 +627,7 @@ func TestListOperation(t *testing.T) { } _, err := mo.list(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) } @@ -653,7 +654,7 @@ func TestInvoke(t *testing.T) { } _, err := mo.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Successfully invoke get", func(t *testing.T) { @@ -685,7 +686,7 @@ func TestInvoke(t *testing.T) { } _, err := mo.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Successfully invoke delete", func(t *testing.T) { @@ -713,7 +714,7 @@ func TestInvoke(t *testing.T) { } _, err := mo.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Successfully invoke list", func(t *testing.T) { @@ -742,7 +743,7 @@ func TestInvoke(t *testing.T) { } _, err := mo.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Error invoke unknown operation type", func(t *testing.T) { @@ -759,6 +760,6 @@ func TestInvoke(t *testing.T) { } _, err := mo.Invoke(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/bindings/influx/influx_test.go b/bindings/influx/influx_test.go index c39ed214c7..b1c25acc8b 100644 --- a/bindings/influx/influx_test.go +++ b/bindings/influx/influx_test.go @@ -20,6 +20,7 @@ import ( "github.com/golang/mock/gomock" influxdb2 "github.com/influxdata/influxdb-client-go/v2" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -31,7 +32,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"Url": "a", "Token": "a", "Org": "a", "Bucket": "a"} influx := Influx{logger: logger.NewLogger("test")} im, err := influx.getInfluxMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", im.URL) assert.Equal(t, "a", im.Token) assert.Equal(t, "a", im.Org) @@ -55,7 +56,7 @@ func TestInflux_Init(t *testing.T) { m := bindings.Metadata{Base: metadata.Base{Properties: map[string]string{"Url": "a", "Token": "a", "Org": "a", "Bucket": "a"}}} err := influx.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, influx.queryAPI) assert.NotNil(t, influx.writeAPI) diff --git a/bindings/kubemq/kubemq.go b/bindings/kubemq/kubemq.go index bee647248e..17b562d527 100644 --- a/bindings/kubemq/kubemq.go +++ b/bindings/kubemq/kubemq.go @@ -108,8 +108,8 @@ func (k *kubeMQ) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bind return nil, err } if len(result.Results) > 0 { - if result.Results[0].IsError { - return nil, fmt.Errorf("error sending queue message: %s", result.Results[0].Error) + if result.Results[0].GetIsError() { + return nil, fmt.Errorf("error sending queue message: %s", result.Results[0].GetError()) } } return &bindings.InvokeResponse{ diff --git a/bindings/kubemq/kubemq_test.go b/bindings/kubemq/kubemq_test.go index ba4e500c85..f7ba206924 100644 --- a/bindings/kubemq/kubemq_test.go +++ b/bindings/kubemq/kubemq_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -187,9 +188,9 @@ func Test_createOptions(t *testing.T) { t.Run(tt.name, func(t *testing.T) { got, err := createOptions(tt.meta) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, tt.want, got) } }) diff --git a/bindings/kubernetes/kubernetes_test.go b/bindings/kubernetes/kubernetes_test.go index 02f95e899d..128487607b 100644 --- a/bindings/kubernetes/kubernetes_test.go +++ b/bindings/kubernetes/kubernetes_test.go @@ -18,6 +18,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -43,7 +44,7 @@ func TestParseMetadata(t *testing.T) { i := kubernetesInput{logger: logger.NewLogger("test")} err := i.parseMetadata(m) - assert.Error(t, err, "Expected err to be returned.") - assert.ErrorContains(t, err, "namespace is missing in metadata", "Error message not same.") + require.Error(t, err, "Expected err to be returned.") + require.ErrorContains(t, err, "namespace is missing in metadata", "Error message not same.") }) } diff --git a/bindings/mqtt3/mqtt_integration_test.go b/bindings/mqtt3/mqtt_integration_test.go index 7db2cafbb2..8224c48635 100644 --- a/bindings/mqtt3/mqtt_integration_test.go +++ b/bindings/mqtt3/mqtt_integration_test.go @@ -24,6 +24,7 @@ import ( mqtt "github.com/eclipse/paho.mqtt.golang" "github.com/google/uuid" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" mdata "github.com/dapr/components-contrib/metadata" @@ -81,10 +82,10 @@ func TestInvokeWithTopic(t *testing.T) { r := NewMQTT(logger).(*MQTT) err := r.Init(ctx, metadata) - assert.Nil(t, err) + require.NoError(t, err) conn, err := r.connect(uuid.NewString(), false) - assert.Nil(t, err) + require.NoError(t, err) defer conn.Disconnect(1) msgCh := make(chan interface{}) @@ -96,7 +97,7 @@ func TestInvokeWithTopic(t *testing.T) { ok := token.WaitTimeout(2 * time.Second) assert.True(t, ok, "subscribe to /app/# timeout") err = token.Error() - assert.Nil(t, err, "error subscribe to test topic") + require.NoError(t, err, "error subscribe to test topic") // Timeout in case message transfer error. go func() { @@ -106,7 +107,7 @@ func TestInvokeWithTopic(t *testing.T) { // Test invoke with default topic configured for component. _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{Data: dataDefault}) - assert.Nil(t, err) + require.NoError(t, err) m := <-msgCh mqttMessage, ok := m.(mqtt.Message) @@ -121,12 +122,12 @@ func TestInvokeWithTopic(t *testing.T) { mqttTopic: topicCustomized, }, }) - assert.Nil(t, err) + require.NoError(t, err) m = <-msgCh mqttMessage, ok = m.(mqtt.Message) assert.True(t, ok) assert.Equal(t, dataCustomized, mqttMessage.Payload()) assert.Equal(t, topicCustomized, mqttMessage.Topic()) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } diff --git a/bindings/mqtt3/mqtt_test.go b/bindings/mqtt3/mqtt_test.go index 6e2c333029..5326c37822 100644 --- a/bindings/mqtt3/mqtt_test.go +++ b/bindings/mqtt3/mqtt_test.go @@ -23,6 +23,7 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" mdata "github.com/dapr/components-contrib/metadata" @@ -53,11 +54,11 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[mqttURL], m.Url) assert.Equal(t, byte(1), m.Qos) - assert.Equal(t, true, m.Retain) - assert.Equal(t, false, m.CleanSession) + assert.True(t, m.Retain) + assert.False(t, m.CleanSession) }) t.Run("missing topic", func(t *testing.T) { @@ -89,7 +90,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.EqualError(t, err, errors.New("missing url").Error()) + require.EqualError(t, err, errors.New("missing url").Error()) assert.Equal(t, fakeProperties[mqttURL], m.Url) }) @@ -103,10 +104,10 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[mqttURL], m.Url) assert.Equal(t, byte(1), m.Qos) - assert.Equal(t, false, m.Retain) + assert.False(t, m.Retain) }) t.Run("invalid clean session field", func(t *testing.T) { @@ -118,8 +119,8 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) - assert.Equal(t, m.CleanSession, false) + require.NoError(t, err) + assert.False(t, m.CleanSession) assert.Equal(t, fakeProperties[mqttURL], m.Url) }) @@ -140,7 +141,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.tlsCfg.CaCert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -166,7 +167,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.tlsCfg.ClientCert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -192,7 +193,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, m.tlsCfg.ClientKey, "failed to parse valid client certificate key") }) diff --git a/bindings/mysql/mysql_integration_test.go b/bindings/mysql/mysql_integration_test.go index d5df16dda3..6c86396f7b 100644 --- a/bindings/mysql/mysql_integration_test.go +++ b/bindings/mysql/mysql_integration_test.go @@ -37,7 +37,7 @@ func TestOperations(t *testing.T) { b := NewMysql(logger.NewLogger("test")) require.NotNil(t, b) l := b.Operations() - assert.Equal(t, 3, len(l)) + assert.Len(t, l, 3) assert.Contains(t, l, execOperation) assert.Contains(t, l, closeOperation) assert.Contains(t, l, queryOperation) @@ -154,7 +154,7 @@ func TestMysqlIntegration(t *testing.T) { result := make([]any, 0) err = json.Unmarshal(res.Data, &result) require.NoError(t, err) - assert.Equal(t, 3, len(result)) + assert.Len(t, len(result), 3) // verify timestamp ts, ok := result[0].(map[string]any)["ts"].(string) @@ -186,7 +186,7 @@ func TestMysqlIntegration(t *testing.T) { result := make([]any, 0) err = json.Unmarshal(res.Data, &result) require.NoError(t, err) - assert.Equal(t, 1, len(result)) + assert.Len(t, len(result), 1) }) t.Run("Invoke drop", func(t *testing.T) { @@ -203,14 +203,14 @@ func TestMysqlIntegration(t *testing.T) { _, err := b.Invoke(context.Background(), &bindings.InvokeRequest{ Operation: closeOperation, }) - assert.NoError(t, err) + require.NoError(t, err) }) } func assertResponse(t *testing.T, res *bindings.InvokeResponse, err error) { t.Helper() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, res) if res != nil { assert.NotEmpty(t, res.Metadata) diff --git a/bindings/mysql/mysql_test.go b/bindings/mysql/mysql_test.go index 37c8f8ce5e..7c7b3d8955 100644 --- a/bindings/mysql/mysql_test.go +++ b/bindings/mysql/mysql_test.go @@ -22,6 +22,7 @@ import ( sqlmock "github.com/DATA-DOG/go-sqlmock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -39,13 +40,13 @@ func TestQuery(t *testing.T) { mock.ExpectQuery("SELECT \\* FROM foo WHERE id < 4").WillReturnRows(rows) ret, err := m.query(context.Background(), `SELECT * FROM foo WHERE id < 4`) - assert.Nil(t, err) + require.NoError(t, err) t.Logf("query result: %s", ret) assert.Contains(t, string(ret), "\"id\":1") var result []any err = json.Unmarshal(ret, &result) - assert.Nil(t, err) - assert.Equal(t, 3, len(result)) + require.NoError(t, err) + assert.Len(t, result, 3) }) t.Run("dbType provided", func(t *testing.T) { @@ -58,7 +59,7 @@ func TestQuery(t *testing.T) { AddRow(3, 3.3, time.Now().Add(2000)) mock.ExpectQuery("SELECT \\* FROM foo WHERE id < 4").WillReturnRows(rows) ret, err := m.query(context.Background(), "SELECT * FROM foo WHERE id < 4") - assert.Nil(t, err) + require.NoError(t, err) t.Logf("query result: %s", ret) // verify number @@ -67,15 +68,15 @@ func TestQuery(t *testing.T) { var result []any err = json.Unmarshal(ret, &result) - assert.Nil(t, err) - assert.Equal(t, 3, len(result)) + require.NoError(t, err) + assert.Len(t, result, 3) // verify timestamp ts, ok := result[0].(map[string]any)["timestamp"].(string) assert.True(t, ok) var tt time.Time tt, err = time.Parse(time.RFC3339, ts) - assert.Nil(t, err) + require.NoError(t, err) t.Logf("time stamp is: %v", tt) }) } @@ -86,7 +87,7 @@ func TestExec(t *testing.T) { mock.ExpectExec("INSERT INTO foo \\(id, v1, ts\\) VALUES \\(.*\\)").WillReturnResult(sqlmock.NewResult(1, 1)) i, err := m.exec(context.Background(), "INSERT INTO foo (id, v1, ts) VALUES (1, 'test-1', '2021-01-22')") assert.Equal(t, int64(1), i) - assert.Nil(t, err) + require.NoError(t, err) } func TestInvoke(t *testing.T) { @@ -102,7 +103,7 @@ func TestInvoke(t *testing.T) { Operation: execOperation, } resp, err := m.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "1", resp.Metadata[respRowsAffectedKey]) }) @@ -116,7 +117,7 @@ func TestInvoke(t *testing.T) { } resp, err := m.Invoke(context.Background(), req) assert.Nil(t, resp) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("query operation succeeds", func(t *testing.T) { @@ -133,11 +134,11 @@ func TestInvoke(t *testing.T) { Operation: queryOperation, } resp, err := m.Invoke(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) var data []any err = json.Unmarshal(resp.Data, &data) - assert.Nil(t, err) - assert.Equal(t, 1, len(data)) + require.NoError(t, err) + assert.Len(t, data, 1) }) t.Run("query operation fails", func(t *testing.T) { @@ -150,7 +151,7 @@ func TestInvoke(t *testing.T) { } resp, err := m.Invoke(context.Background(), req) assert.Nil(t, resp) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("close operation", func(t *testing.T) { @@ -170,7 +171,7 @@ func TestInvoke(t *testing.T) { } resp, err := m.Invoke(context.Background(), req) assert.Nil(t, resp) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/bindings/postgres/postgres_test.go b/bindings/postgres/postgres_test.go index 392fe2a6ad..9f9cf207b5 100644 --- a/bindings/postgres/postgres_test.go +++ b/bindings/postgres/postgres_test.go @@ -21,6 +21,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -44,7 +45,7 @@ func TestOperations(t *testing.T) { b := NewPostgres(nil) assert.NotNil(t, b) l := b.Operations() - assert.Equal(t, 3, len(l)) + assert.Len(t, l, 3) }) } @@ -121,17 +122,17 @@ func TestPostgresIntegration(t *testing.T) { req.Metadata = nil req.Data = nil _, err := b.Invoke(ctx, req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Close", func(t *testing.T) { err := b.Close() - assert.NoError(t, err, "expected no error closing output binding") + require.NoError(t, err, "expected no error closing output binding") }) } func assertResponse(t *testing.T, res *bindings.InvokeResponse, err error) { - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Metadata) } diff --git a/bindings/postmark/postmark_test.go b/bindings/postmark/postmark_test.go index de32186863..109dc5ba32 100644 --- a/bindings/postmark/postmark_test.go +++ b/bindings/postmark/postmark_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -30,7 +31,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"serverToken": "abc", "accountToken": "123", "emailFrom": "test1@example.net", "emailTo": "test2@example.net", "subject": "hello"} r := Postmark{logger: logger} pMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "abc", pMeta.ServerToken) assert.Equal(t, "123", pMeta.AccountToken) assert.Equal(t, "test1@example.net", pMeta.EmailFrom) diff --git a/bindings/rabbitmq/rabbitmq_integration_test.go b/bindings/rabbitmq/rabbitmq_integration_test.go index 1fa5d6d150..17c288c587 100644 --- a/bindings/rabbitmq/rabbitmq_integration_test.go +++ b/bindings/rabbitmq/rabbitmq_integration_test.go @@ -28,6 +28,7 @@ import ( "github.com/google/uuid" amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" contribMetadata "github.com/dapr/components-contrib/metadata" @@ -86,38 +87,38 @@ func TestQueuesWithTTL(t *testing.T) { r := NewRabbitMQ(logger).(*RabbitMQ) err := r.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) // Assert that if waited too long, we won't see any message conn, err := amqp.Dial(rabbitmqHost) - assert.Nil(t, err) + require.NoError(t, err) defer conn.Close() ch, err := conn.Channel() - assert.Nil(t, err) + require.NoError(t, err) defer ch.Close() const tooLateMsgContent = "too_late_msg" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{Data: []byte(tooLateMsgContent)}) - assert.Nil(t, err) + require.NoError(t, err) time.Sleep(time.Second + (ttlInSeconds * time.Second)) _, ok, err := getMessageWithRetries(ch, queueName, maxGetDuration) - assert.Nil(t, err) + require.NoError(t, err) assert.False(t, ok) // Getting before it is expired, should return it const testMsgContent = "test_msg" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{Data: []byte(testMsgContent)}) - assert.Nil(t, err) + require.NoError(t, err) msg, ok, err := getMessageWithRetries(ch, queueName, maxGetDuration) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, ok) msgBody := string(msg.Body) assert.Equal(t, testMsgContent, msgBody) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func TestQueuesReconnect(t *testing.T) { @@ -150,14 +151,14 @@ func TestQueuesReconnect(t *testing.T) { r := NewRabbitMQ(logger).(*RabbitMQ) err := r.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) err = r.Read(context.Background(), handler) - assert.Nil(t, err) + require.NoError(t, err) const tooLateMsgContent = "success_msg1" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{Data: []byte(tooLateMsgContent)}) - assert.Nil(t, err) + require.NoError(t, err) // perform a close connection with the rabbitmq server r.channel.Close() @@ -165,12 +166,12 @@ func TestQueuesReconnect(t *testing.T) { const testMsgContent = "reconnect_msg" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{Data: []byte(testMsgContent)}) - assert.Nil(t, err) + require.NoError(t, err) time.Sleep(defaultReconnectWait) // sending 2 messages, one before the reconnect and one after assert.Equal(t, 2, messageReceivedCount) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func TestPublishingWithTTL(t *testing.T) { @@ -199,15 +200,15 @@ func TestPublishingWithTTL(t *testing.T) { rabbitMQBinding1 := NewRabbitMQ(logger).(*RabbitMQ) err := rabbitMQBinding1.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) // Assert that if waited too long, we won't see any message conn, err := amqp.Dial(rabbitmqHost) - assert.Nil(t, err) + require.NoError(t, err) defer conn.Close() ch, err := conn.Channel() - assert.Nil(t, err) + require.NoError(t, err) defer ch.Close() const tooLateMsgContent = "too_late_msg" @@ -219,18 +220,18 @@ func TestPublishingWithTTL(t *testing.T) { } _, err = rabbitMQBinding1.Invoke(context.Background(), &writeRequest) - assert.Nil(t, err) + require.NoError(t, err) time.Sleep(time.Second + (ttlInSeconds * time.Second)) _, ok, err := getMessageWithRetries(ch, queueName, maxGetDuration) - assert.Nil(t, err) + require.NoError(t, err) assert.False(t, ok) // Getting before it is expired, should return it rabbitMQBinding2 := NewRabbitMQ(logger).(*RabbitMQ) err = rabbitMQBinding2.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) const testMsgContent = "test_msg" writeRequest = bindings.InvokeRequest{ @@ -240,16 +241,16 @@ func TestPublishingWithTTL(t *testing.T) { }, } _, err = rabbitMQBinding2.Invoke(context.Background(), &writeRequest) - assert.Nil(t, err) + require.NoError(t, err) msg, ok, err := getMessageWithRetries(ch, queueName, maxGetDuration) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, ok) msgBody := string(msg.Body) assert.Equal(t, testMsgContent, msgBody) - assert.NoError(t, rabbitMQBinding1.Close()) - assert.NoError(t, rabbitMQBinding2.Close()) + require.NoError(t, rabbitMQBinding1.Close()) + require.NoError(t, rabbitMQBinding2.Close()) } func TestExclusiveQueue(t *testing.T) { @@ -280,15 +281,15 @@ func TestExclusiveQueue(t *testing.T) { r := NewRabbitMQ(logger).(*RabbitMQ) err := r.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) // Assert that if waited too long, we won't see any message conn, err := amqp.Dial(rabbitmqHost) - assert.Nil(t, err) + require.NoError(t, err) defer conn.Close() ch, err := conn.Channel() - assert.Nil(t, err) + require.NoError(t, err) if _, err = ch.QueueDeclarePassive(queueName, durable, false, false, false, amqp.Table{}); err != nil { // Assert that queue actually exists if an error is thrown @@ -299,7 +300,7 @@ func TestExclusiveQueue(t *testing.T) { r.connection.Close() ch, err = conn.Channel() - assert.Nil(t, err) + require.NoError(t, err) defer ch.Close() if _, err = ch.QueueDeclarePassive(queueName, durable, false, false, false, amqp.Table{}); err != nil { @@ -334,15 +335,15 @@ func TestPublishWithPriority(t *testing.T) { r := NewRabbitMQ(logger).(*RabbitMQ) err := r.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) // Assert that if waited too long, we won't see any message conn, err := amqp.Dial(rabbitmqHost) - assert.Nil(t, err) + require.NoError(t, err) defer conn.Close() ch, err := conn.Channel() - assert.Nil(t, err) + require.NoError(t, err) defer ch.Close() const middlePriorityMsgContent = "middle" @@ -352,7 +353,7 @@ func TestPublishWithPriority(t *testing.T) { }, Data: []byte(middlePriorityMsgContent), }) - assert.Nil(t, err) + require.NoError(t, err) const lowPriorityMsgContent = "low" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{ @@ -361,7 +362,7 @@ func TestPublishWithPriority(t *testing.T) { }, Data: []byte(lowPriorityMsgContent), }) - assert.Nil(t, err) + require.NoError(t, err) const highPriorityMsgContent = "high" _, err = r.Invoke(context.Background(), &bindings.InvokeRequest{ @@ -370,22 +371,22 @@ func TestPublishWithPriority(t *testing.T) { }, Data: []byte(highPriorityMsgContent), }) - assert.Nil(t, err) + require.NoError(t, err) time.Sleep(100 * time.Millisecond) msg, ok, err := getMessageWithRetries(ch, queueName, 1*time.Second) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, ok) assert.Equal(t, highPriorityMsgContent, string(msg.Body)) msg, ok, err = getMessageWithRetries(ch, queueName, 1*time.Second) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, ok) assert.Equal(t, middlePriorityMsgContent, string(msg.Body)) msg, ok, err = getMessageWithRetries(ch, queueName, 1*time.Second) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, ok) assert.Equal(t, lowPriorityMsgContent, string(msg.Body)) } @@ -416,15 +417,15 @@ func TestPublishWithHeaders(t *testing.T) { r := NewRabbitMQ(logger).(*RabbitMQ) err := r.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) // Assert that if waited too long, we won't see any message conn, err := amqp.Dial(rabbitmqHost) - assert.NoError(t, err) + require.NoError(t, err) defer conn.Close() ch, err := conn.Channel() - assert.NoError(t, err) + require.NoError(t, err) defer ch.Close() const msgContent = "some content" @@ -435,12 +436,12 @@ func TestPublishWithHeaders(t *testing.T) { }, Data: []byte(msgContent), }) - assert.NoError(t, err) + require.NoError(t, err) time.Sleep(100 * time.Millisecond) msg, ok, err := getMessageWithRetries(ch, queueName, 1*time.Second) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, ok) assert.Equal(t, msgContent, string(msg.Body)) // assert.Contains(t, msg.Header, "custom_header1") diff --git a/bindings/rabbitmq/rabbitmq_test.go b/bindings/rabbitmq/rabbitmq_test.go index 044964fb64..21353e6603 100644 --- a/bindings/rabbitmq/rabbitmq_test.go +++ b/bindings/rabbitmq/rabbitmq_test.go @@ -18,6 +18,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -144,7 +145,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = tt.properties r := RabbitMQ{logger: logger.NewLogger("test")} err := r.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, queueName, r.metadata.QueueName) assert.Equal(t, host, r.metadata.Host) assert.Equal(t, tt.expectedDeleteWhenUnused, r.metadata.DeleteWhenUnused) @@ -191,7 +192,7 @@ func TestParseMetadataWithInvalidTTL(t *testing.T) { m.Properties = tt.properties r := RabbitMQ{logger: logger.NewLogger("test")} err := r.parseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) } } @@ -228,7 +229,7 @@ func TestParseMetadataWithInvalidMaxPriority(t *testing.T) { m.Properties = tt.properties r := RabbitMQ{logger: logger.NewLogger("test")} err := r.parseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) } } diff --git a/bindings/redis/redis_test.go b/bindings/redis/redis_test.go index 0c39734932..f38c2d4828 100644 --- a/bindings/redis/redis_test.go +++ b/bindings/redis/redis_test.go @@ -21,6 +21,7 @@ import ( miniredis "github.com/alicebob/miniredis/v2" "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" rediscomponent "github.com/dapr/components-contrib/common/component/redis" @@ -51,12 +52,12 @@ func TestInvokeCreate(t *testing.T) { Metadata: map[string]string{"key": testKey}, Operation: bindings.CreateOperation, }) - assert.Equal(t, nil, err) - assert.Equal(t, true, bindingRes == nil) + require.NoError(t, err) + assert.Nil(t, bindingRes) getRes, err := c.DoRead(context.Background(), "GET", testKey) - assert.Equal(t, nil, err) - assert.Equal(t, true, getRes == testData) + require.NoError(t, err) + assert.Equal(t, testData, getRes) } func TestInvokeGetWithoutDeleteFlag(t *testing.T) { @@ -69,23 +70,23 @@ func TestInvokeGetWithoutDeleteFlag(t *testing.T) { } err := c.DoWrite(context.Background(), "SET", testKey, testData) - assert.Equal(t, nil, err) + require.NoError(t, err) bindingRes, err := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err) - assert.Equal(t, true, string(bindingRes.Data) == testData) + require.NoError(t, err) + assert.Equal(t, testData, string(bindingRes.Data)) bindingResGet, err := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) - assert.Equal(t, true, string(bindingResGet.Data) == testData) + assert.Equal(t, testData, string(bindingResGet.Data)) } func TestInvokeGetWithDeleteFlag(t *testing.T) { @@ -98,21 +99,21 @@ func TestInvokeGetWithDeleteFlag(t *testing.T) { } err := c.DoWrite(context.Background(), "SET", testKey, testData) - assert.Equal(t, nil, err) + require.NoError(t, err) bindingRes, err := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey, "delete": "true"}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err) - assert.Equal(t, true, string(bindingRes.Data) == testData) + require.NoError(t, err) + assert.Equal(t, testData, string(bindingRes.Data)) bindingResGet, err := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) assert.Equal(t, []byte(nil), bindingResGet.Data) } @@ -127,18 +128,18 @@ func TestInvokeDelete(t *testing.T) { } err := c.DoWrite(context.Background(), "SET", testKey, testData) - assert.Equal(t, nil, err) + require.NoError(t, err) getRes, err := c.DoRead(context.Background(), "GET", testKey) - assert.Equal(t, nil, err) - assert.Equal(t, true, getRes == testData) + require.NoError(t, err) + assert.Equal(t, testData, getRes) _, err = bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.DeleteOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) rgetRep, err := c.DoRead(context.Background(), "GET", testKey) assert.Equal(t, redis.Nil, err) @@ -158,17 +159,17 @@ func TestCreateExpire(t *testing.T) { Operation: bindings.CreateOperation, Data: []byte(testData), }) - assert.Equal(t, nil, err) + require.NoError(t, err) rgetRep, err := c.DoRead(context.Background(), "TTL", testKey) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(1), rgetRep) res, err2 := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err2) + require.NoError(t, err2) assert.Equal(t, res.Data, []byte(testData)) // wait for ttl to expire @@ -178,14 +179,14 @@ func TestCreateExpire(t *testing.T) { Metadata: map[string]string{"key": testKey}, Operation: bindings.GetOperation, }) - assert.Nil(t, err2) + require.NoError(t, err2) assert.Equal(t, []byte(nil), res.Data) _, err = bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": testKey}, Operation: bindings.DeleteOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) } func TestIncrement(t *testing.T) { @@ -200,7 +201,7 @@ func TestIncrement(t *testing.T) { Metadata: map[string]string{"key": "incKey"}, Operation: IncrementOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) res, err2 := bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": "incKey"}, @@ -213,17 +214,17 @@ func TestIncrement(t *testing.T) { Metadata: map[string]string{"key": "incKey", metadata.TTLMetadataKey: "5"}, Operation: IncrementOperation, }) - assert.Nil(t, err) + require.NoError(t, err) rgetRep, err := c.DoRead(context.Background(), "TTL", "incKey") - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int64(5), rgetRep) res, err2 = bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": "incKey"}, Operation: bindings.GetOperation, }) - assert.Equal(t, nil, err2) + require.NoError(t, err2) assert.Equal(t, []byte("2"), res.Data) // wait for ttl to expire @@ -233,14 +234,14 @@ func TestIncrement(t *testing.T) { Metadata: map[string]string{"key": "incKey"}, Operation: bindings.GetOperation, }) - assert.Nil(t, err2) + require.NoError(t, err2) assert.Equal(t, []byte(nil), res.Data) _, err = bind.Invoke(context.TODO(), &bindings.InvokeRequest{ Metadata: map[string]string{"key": "incKey"}, Operation: bindings.DeleteOperation, }) - assert.Equal(t, nil, err) + require.NoError(t, err) } func setupMiniredis() (*miniredis.Miniredis, rediscomponent.RedisClient) { diff --git a/bindings/rethinkdb/statechange/statechange_test.go b/bindings/rethinkdb/statechange/statechange_test.go index d1e34b289a..16c566bc06 100644 --- a/bindings/rethinkdb/statechange/statechange_test.go +++ b/bindings/rethinkdb/statechange/statechange_test.go @@ -20,6 +20,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -71,7 +72,7 @@ func TestBinding(t *testing.T) { b := getNewRethinkActorBinding() err := b.Init(context.Background(), m) - assert.NoErrorf(t, err, "error initializing") + require.NoErrorf(t, err, "error initializing") ctx, cancel := context.WithCancel(context.Background()) err = b.Read(ctx, func(_ context.Context, res *bindings.ReadResponse) ([]byte, error) { @@ -80,7 +81,7 @@ func TestBinding(t *testing.T) { return nil, nil }) - assert.NoErrorf(t, err, "error on read") + require.NoErrorf(t, err, "error on read") testTimer := time.AfterFunc(testDuration, func() { t.Log("done") diff --git a/bindings/smtp/smtp_test.go b/bindings/smtp/smtp_test.go index b03ed316b4..9d4566b2b3 100644 --- a/bindings/smtp/smtp_test.go +++ b/bindings/smtp/smtp_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -41,12 +42,12 @@ func TestParseMetadata(t *testing.T) { } r := Mailer{logger: logger} smtpMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "mailserver.dapr.io", smtpMeta.Host) assert.Equal(t, 25, smtpMeta.Port) assert.Equal(t, "user@dapr.io", smtpMeta.User) assert.Equal(t, "P@$$w0rd!", smtpMeta.Password) - assert.Equal(t, true, smtpMeta.SkipTLSVerify) + assert.True(t, smtpMeta.SkipTLSVerify) assert.Equal(t, "from@dapr.io", smtpMeta.EmailFrom) assert.Equal(t, "to@dapr.io", smtpMeta.EmailTo) assert.Equal(t, "cc@dapr.io", smtpMeta.EmailCC) @@ -71,12 +72,12 @@ func TestParseMetadata(t *testing.T) { } r := Mailer{logger: logger} smtpMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "mailserver.dapr.io", smtpMeta.Host) assert.Equal(t, 25, smtpMeta.Port) assert.Equal(t, "user@dapr.io", smtpMeta.User) assert.Equal(t, "P@$$w0rd!", smtpMeta.Password) - assert.Equal(t, true, smtpMeta.SkipTLSVerify) + assert.True(t, smtpMeta.SkipTLSVerify) assert.Equal(t, "from@dapr.io", smtpMeta.EmailFrom) assert.Equal(t, "to@dapr.io", smtpMeta.EmailTo) assert.Equal(t, "cc@dapr.io", smtpMeta.EmailCC) @@ -102,7 +103,7 @@ func TestParseMetadata(t *testing.T) { r := Mailer{logger: logger} smtpMeta, err := r.parseMetadata(m) assert.NotNil(t, smtpMeta) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Incorrrect metadata (user, no password)", func(t *testing.T) { m := bindings.Metadata{} @@ -121,7 +122,7 @@ func TestParseMetadata(t *testing.T) { r := Mailer{logger: logger} smtpMeta, err := r.parseMetadata(m) assert.NotNil(t, smtpMeta) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Incorrrect metadata (no user, password)", func(t *testing.T) { m := bindings.Metadata{} @@ -140,7 +141,7 @@ func TestParseMetadata(t *testing.T) { r := Mailer{logger: logger} smtpMeta, err := r.parseMetadata(m) assert.NotNil(t, smtpMeta) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -171,13 +172,13 @@ func TestMergeWithRequestMetadata(t *testing.T) { mergedMeta, err := smtpMeta.mergeWithRequestMetadata(&request) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "mailserver.dapr.io", mergedMeta.Host) assert.Equal(t, 25, mergedMeta.Port) assert.Equal(t, "user@dapr.io", mergedMeta.User) assert.Equal(t, "P@$$w0rd!", mergedMeta.Password) - assert.Equal(t, true, mergedMeta.SkipTLSVerify) + assert.True(t, mergedMeta.SkipTLSVerify) assert.Equal(t, "req-from@dapr.io", mergedMeta.EmailFrom) assert.Equal(t, "req-to@dapr.io", mergedMeta.EmailTo) assert.Equal(t, "req-cc@dapr.io", mergedMeta.EmailCC) @@ -208,12 +209,12 @@ func TestMergeWithNoRequestMetadata(t *testing.T) { mergedMeta, err := smtpMeta.mergeWithRequestMetadata(&request) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "mailserver.dapr.io", mergedMeta.Host) assert.Equal(t, 25, mergedMeta.Port) assert.Equal(t, "user@dapr.io", mergedMeta.User) assert.Equal(t, "P@$$w0rd!", mergedMeta.Password) - assert.Equal(t, true, mergedMeta.SkipTLSVerify) + assert.True(t, mergedMeta.SkipTLSVerify) assert.Equal(t, "from@dapr.io", mergedMeta.EmailFrom) assert.Equal(t, "to@dapr.io", mergedMeta.EmailTo) assert.Equal(t, "cc@dapr.io", mergedMeta.EmailCC) @@ -252,7 +253,7 @@ func TestMergeWithRequestMetadata_invalidPriorityTooHigh(t *testing.T) { mergedMeta, err := smtpMeta.mergeWithRequestMetadata(&request) assert.NotNil(t, mergedMeta) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -285,7 +286,7 @@ func TestMergeWithRequestMetadata_invalidPriorityTooLow(t *testing.T) { mergedMeta, err := smtpMeta.mergeWithRequestMetadata(&request) assert.NotNil(t, mergedMeta) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -317,6 +318,6 @@ func TestMergeWithRequestMetadata_invalidPriorityNotNumber(t *testing.T) { mergedMeta, err := smtpMeta.mergeWithRequestMetadata(&request) assert.NotNil(t, mergedMeta) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/bindings/twilio/sendgrid/sendgrid_test.go b/bindings/twilio/sendgrid/sendgrid_test.go index e5ef260701..6a7fea41b7 100644 --- a/bindings/twilio/sendgrid/sendgrid_test.go +++ b/bindings/twilio/sendgrid/sendgrid_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -31,7 +32,7 @@ func TestParseMetadata(t *testing.T) { m.Properties = map[string]string{"apiKey": "123", "emailFrom": "test1@example.net", "emailTo": "test2@example.net", "subject": "hello"} r := SendGrid{logger: logger} sgMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "123", sgMeta.APIKey) assert.Equal(t, "test1@example.net", sgMeta.EmailFrom) assert.Equal(t, "test2@example.net", sgMeta.EmailTo) @@ -63,7 +64,7 @@ func TestParseMetadataWithOptionalNames(t *testing.T) { } r := SendGrid{logger: logger} sgMeta, err := r.parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "123", sgMeta.APIKey) assert.Equal(t, "test1@example.net", sgMeta.EmailFrom) assert.Equal(t, "test 1", sgMeta.EmailFromName) @@ -88,7 +89,7 @@ func TestParseMetadataWithOptionalNames(t *testing.T) { } r := SendGrid{logger: logger} _, err := r.parseMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) } @@ -102,11 +103,11 @@ func TestUnmarshalDynamicTemplateData(t *testing.T) { // Test valid JSON err := UnmarshalDynamicTemplateData(string(dynamicTemplateData), &data) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, map[string]interface{}{"first": "MyFirst", "last": "MyLast"}, data["name"]) // Test invalid JSON err = UnmarshalDynamicTemplateData("{\"wrong\"}", &data) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/bindings/twilio/sms/sms_test.go b/bindings/twilio/sms/sms_test.go index 7d1549f43f..652cb24176 100644 --- a/bindings/twilio/sms/sms_test.go +++ b/bindings/twilio/sms/sms_test.go @@ -54,7 +54,7 @@ func TestInit(t *testing.T) { m.Properties = map[string]string{"toNumber": "toNumber", "fromNumber": "fromNumber"} tw := NewSMS(logger.NewLogger("test")) err := tw.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) } func TestParseDuration(t *testing.T) { @@ -67,7 +67,7 @@ func TestParseDuration(t *testing.T) { } tw := NewSMS(logger.NewLogger("test")) err := tw.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) } func TestWriteShouldSucceed(t *testing.T) { @@ -86,7 +86,7 @@ func TestWriteShouldSucceed(t *testing.T) { Transport: httpTransport, } err := tw.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) t.Run("Should succeed with expected url and headers", func(t *testing.T) { httpTransport.reset() @@ -97,7 +97,7 @@ func TestWriteShouldSucceed(t *testing.T) { }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), httpTransport.requestCount) assert.Equal(t, "https://api.twilio.com/2010-04-01/Accounts/accountSid/Messages.json", httpTransport.request.URL.String()) assert.NotNil(t, httpTransport.request) @@ -124,7 +124,7 @@ func TestWriteShouldFail(t *testing.T) { Transport: httpTransport, } err := tw.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) t.Run("Missing 'to' should fail", func(t *testing.T) { httpTransport.reset() @@ -133,7 +133,7 @@ func TestWriteShouldFail(t *testing.T) { Metadata: map[string]string{}, }) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Twilio call failed should be returned", func(t *testing.T) { @@ -147,7 +147,7 @@ func TestWriteShouldFail(t *testing.T) { }, }) - assert.NotNil(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), httpErr.Error()) }) @@ -161,7 +161,7 @@ func TestWriteShouldFail(t *testing.T) { }, }) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/bindings/zeebe/client_test.go b/bindings/zeebe/client_test.go index 182f237f4e..e9cb447aa2 100644 --- a/bindings/zeebe/client_test.go +++ b/bindings/zeebe/client_test.go @@ -18,6 +18,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -33,11 +34,11 @@ func TestParseMetadata(t *testing.T) { }}} client := ClientFactoryImpl{logger: logger.NewLogger("test")} meta, err := client.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "172.0.0.1:1234", meta.GatewayAddr) assert.Equal(t, 5*time.Second, meta.GatewayKeepAlive) assert.Equal(t, "/cert/path", meta.CaCertificatePath) - assert.Equal(t, true, meta.UsePlaintextConnection) + assert.True(t, meta.UsePlaintextConnection) } func TestGatewayAddrMetadataIsMandatory(t *testing.T) { @@ -45,7 +46,7 @@ func TestGatewayAddrMetadataIsMandatory(t *testing.T) { client := ClientFactoryImpl{logger: logger.NewLogger("test")} meta, err := client.parseMetadata(m) assert.Nil(t, meta) - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, err, ErrMissingGatewayAddr) } @@ -53,8 +54,8 @@ func TestParseMetadataDefaultValues(t *testing.T) { m := bindings.Metadata{Base: metadata.Base{Properties: map[string]string{"gatewayAddr": "172.0.0.1:1234"}}} client := ClientFactoryImpl{logger: logger.NewLogger("test")} meta, err := client.parseMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, time.Duration(0), meta.GatewayKeepAlive) assert.Equal(t, "", meta.CaCertificatePath) - assert.Equal(t, false, meta.UsePlaintextConnection) + assert.False(t, meta.UsePlaintextConnection) } diff --git a/bindings/zeebe/command/activate_jobs_test.go b/bindings/zeebe/command/activate_jobs_test.go index 5efb889b8d..40fe8c371c 100644 --- a/bindings/zeebe/command/activate_jobs_test.go +++ b/bindings/zeebe/command/activate_jobs_test.go @@ -23,6 +23,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/entities" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -102,9 +103,12 @@ func TestActivateJobs(t *testing.T) { t.Run("jobType is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: ActivateJobsOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: ActivateJobsOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingJobType) + require.ErrorIs(t, err, ErrMissingJobType) }) t.Run("maxJobsToActivate is mandatory", func(t *testing.T) { @@ -112,12 +116,12 @@ func TestActivateJobs(t *testing.T) { JobType: "a", } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Data: data, Operation: ActivateJobsOperation} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingMaxJobsToActivate) + require.ErrorIs(t, err, ErrMissingMaxJobsToActivate) }) t.Run("activate jobs with mandatory fields", func(t *testing.T) { @@ -126,7 +130,7 @@ func TestActivateJobs(t *testing.T) { MaxJobsToActivate: new(int32), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: ActivateJobsOperation} @@ -134,7 +138,7 @@ func TestActivateJobs(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.JobType, mc.cmd1.jobType) assert.Equal(t, *payload.MaxJobsToActivate, mc.cmd1.cmd2.maxJobsToActivate) @@ -149,7 +153,7 @@ func TestActivateJobs(t *testing.T) { FetchVariables: []string{"a", "b", "c"}, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: ActivateJobsOperation} @@ -157,7 +161,7 @@ func TestActivateJobs(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.JobType, mc.cmd1.jobType) assert.Equal(t, *payload.MaxJobsToActivate, mc.cmd1.cmd2.maxJobsToActivate) diff --git a/bindings/zeebe/command/cancel_instance_test.go b/bindings/zeebe/command/cancel_instance_test.go index 81277f97e9..48005a6f56 100644 --- a/bindings/zeebe/command/cancel_instance_test.go +++ b/bindings/zeebe/command/cancel_instance_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -65,9 +66,12 @@ func TestCancelInstance(t *testing.T) { t.Run("processInstanceKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: CancelInstanceOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: CancelInstanceOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingProcessInstanceKey) + require.ErrorIs(t, err, ErrMissingProcessInstanceKey) }) t.Run("cancel a command", func(t *testing.T) { @@ -75,7 +79,7 @@ func TestCancelInstance(t *testing.T) { ProcessInstanceKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CancelInstanceOperation} @@ -83,7 +87,7 @@ func TestCancelInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.ProcessInstanceKey, mc.cmd1.cmd2.processInstanceKey) }) diff --git a/bindings/zeebe/command/command_test.go b/bindings/zeebe/command/command_test.go index 8f4eddce7a..1ba498cf4e 100644 --- a/bindings/zeebe/command/command_test.go +++ b/bindings/zeebe/command/command_test.go @@ -59,7 +59,7 @@ func TestInit(t *testing.T) { cmd := ZeebeCommand{clientFactory: mcf, logger: testLogger} err := cmd.Init(context.Background(), metadata) - assert.Error(t, err, errParsing) + require.ErrorIs(t, err, errParsing) }) t.Run("sets client from client factory", func(t *testing.T) { @@ -69,11 +69,11 @@ func TestInit(t *testing.T) { cmd := ZeebeCommand{clientFactory: mcf, logger: testLogger} err := cmd.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) mc, err := mcf.Get(metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, mc, cmd.client) assert.Equal(t, metadata, mcf.metadata) }) @@ -86,14 +86,14 @@ func TestInvoke(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Operation: bindings.DeleteOperation} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrUnsupportedOperation(bindings.DeleteOperation)) + require.EqualError(t, err, ErrUnsupportedOperation(bindings.DeleteOperation).Error()) }) } func TestOperations(t *testing.T) { testBinding := ZeebeCommand{logger: logger.NewLogger("test")} operations := testBinding.Operations() - require.Equal(t, 13, len(operations)) + require.Len(t, operations, 13) assert.Equal(t, TopologyOperation, operations[0]) assert.Equal(t, DeployProcessOperation, operations[1]) assert.Equal(t, DeployResourceOperation, operations[2]) diff --git a/bindings/zeebe/command/complete_job_test.go b/bindings/zeebe/command/complete_job_test.go index 2b55d68f4d..b33cd501cf 100644 --- a/bindings/zeebe/command/complete_job_test.go +++ b/bindings/zeebe/command/complete_job_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -79,9 +80,12 @@ func TestCompleteJob(t *testing.T) { t.Run("elementInstanceKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: CompleteJobOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: CompleteJobOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingJobKey) + require.ErrorIs(t, err, ErrMissingJobKey) }) t.Run("complete a job", func(t *testing.T) { @@ -92,7 +96,7 @@ func TestCompleteJob(t *testing.T) { }, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CompleteJobOperation} @@ -100,7 +104,7 @@ func TestCompleteJob(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.JobKey, mc.cmd1.jobKey) assert.Equal(t, payload.Variables, mc.cmd1.cmd2.variables) diff --git a/bindings/zeebe/command/create_instance_test.go b/bindings/zeebe/command/create_instance_test.go index 4142c8e8c8..478b4695f9 100644 --- a/bindings/zeebe/command/create_instance_test.go +++ b/bindings/zeebe/command/create_instance_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -106,7 +107,7 @@ func TestCreateInstance(t *testing.T) { ProcessDefinitionKey: new(int64), } data, err := json.Marshal(payload) - assert.Nil(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -114,13 +115,13 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrAmbiguousCreationVars) + require.ErrorIs(t, err, ErrAmbiguousCreationVars) }) t.Run("either bpmnProcessId or processDefinitionKey must be given", func(t *testing.T) { payload := createInstancePayload{} data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -128,7 +129,7 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingCreationVars) + require.ErrorIs(t, err, ErrMissingCreationVars) }) t.Run("create command with bpmnProcessId and specific version", func(t *testing.T) { @@ -137,7 +138,7 @@ func TestCreateInstance(t *testing.T) { Version: new(int32), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -145,7 +146,7 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.BpmnProcessID, mc.cmd1.bpmnProcessID) assert.Equal(t, *payload.Version, mc.cmd1.cmd2.version) @@ -156,7 +157,7 @@ func TestCreateInstance(t *testing.T) { BpmnProcessID: "some-id", } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -164,10 +165,10 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.BpmnProcessID, mc.cmd1.bpmnProcessID) - assert.Equal(t, true, mc.cmd1.cmd2.latestVersion) + assert.True(t, mc.cmd1.cmd2.latestVersion) }) t.Run("create command with processDefinitionKey", func(t *testing.T) { @@ -175,7 +176,7 @@ func TestCreateInstance(t *testing.T) { ProcessDefinitionKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -183,7 +184,7 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.ProcessDefinitionKey, mc.cmd1.processDefinitionKey) }) @@ -196,7 +197,7 @@ func TestCreateInstance(t *testing.T) { }, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: CreateInstanceOperation} @@ -204,7 +205,7 @@ func TestCreateInstance(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.ProcessDefinitionKey, mc.cmd1.processDefinitionKey) assert.Equal(t, payload.Variables, mc.cmd1.cmd2.cmd3.variables) diff --git a/bindings/zeebe/command/deploy_resource_test.go b/bindings/zeebe/command/deploy_resource_test.go index 4caac9d227..177a84fa2e 100644 --- a/bindings/zeebe/command/deploy_resource_test.go +++ b/bindings/zeebe/command/deploy_resource_test.go @@ -17,7 +17,7 @@ import ( "context" "testing" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -30,6 +30,6 @@ func TestDeployResource(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Operation: DeployResourceOperation} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingFileName) + require.ErrorIs(t, err, ErrMissingFileName) }) } diff --git a/bindings/zeebe/command/fail_job_test.go b/bindings/zeebe/command/fail_job_test.go index 2e3a2cac50..3d343b84b6 100644 --- a/bindings/zeebe/command/fail_job_test.go +++ b/bindings/zeebe/command/fail_job_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -86,9 +87,12 @@ func TestFailJob(t *testing.T) { t.Run("jobKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: FailJobOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: FailJobOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingJobKey) + require.ErrorIs(t, err, ErrMissingJobKey) }) t.Run("retries is mandatory", func(t *testing.T) { @@ -96,12 +100,12 @@ func TestFailJob(t *testing.T) { JobKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Data: data, Operation: FailJobOperation} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingRetries) + require.ErrorIs(t, err, ErrMissingRetries) }) t.Run("fail a job", func(t *testing.T) { @@ -111,7 +115,7 @@ func TestFailJob(t *testing.T) { ErrorMessage: "a", } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: FailJobOperation} @@ -119,7 +123,7 @@ func TestFailJob(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.JobKey, mc.cmd1.jobKey) assert.Equal(t, *payload.Retries, mc.cmd1.cmd2.retries) diff --git a/bindings/zeebe/command/publish_message_test.go b/bindings/zeebe/command/publish_message_test.go index 349536a648..573a149dd9 100644 --- a/bindings/zeebe/command/publish_message_test.go +++ b/bindings/zeebe/command/publish_message_test.go @@ -23,6 +23,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -103,9 +104,12 @@ func TestPublishMessage(t *testing.T) { t.Run("messageName is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: PublishMessageOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: PublishMessageOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingMessageName) + require.ErrorIs(t, err, ErrMissingMessageName) }) t.Run("send message with mandatory fields", func(t *testing.T) { @@ -113,7 +117,7 @@ func TestPublishMessage(t *testing.T) { MessageName: "a", } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: PublishMessageOperation} @@ -121,7 +125,7 @@ func TestPublishMessage(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.MessageName, mc.cmd1.messageName) assert.Equal(t, payload.CorrelationKey, mc.cmd1.cmd2.correlationKey) @@ -138,7 +142,7 @@ func TestPublishMessage(t *testing.T) { }, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: PublishMessageOperation} @@ -146,7 +150,7 @@ func TestPublishMessage(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, payload.MessageName, mc.cmd1.messageName) assert.Equal(t, payload.CorrelationKey, mc.cmd1.cmd2.correlationKey) diff --git a/bindings/zeebe/command/resolve_incident_test.go b/bindings/zeebe/command/resolve_incident_test.go index 02f4c25d6b..9fba7d5a57 100644 --- a/bindings/zeebe/command/resolve_incident_test.go +++ b/bindings/zeebe/command/resolve_incident_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -65,9 +66,12 @@ func TestResolveIncident(t *testing.T) { t.Run("incidentKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: ResolveIncidentOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: ResolveIncidentOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingIncidentKey) + require.ErrorIs(t, err, ErrMissingIncidentKey) }) t.Run("resolve a incident", func(t *testing.T) { @@ -75,7 +79,7 @@ func TestResolveIncident(t *testing.T) { IncidentKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: ResolveIncidentOperation} @@ -83,7 +87,7 @@ func TestResolveIncident(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.IncidentKey, mc.cmd1.incidentKey) }) diff --git a/bindings/zeebe/command/set_variables_test.go b/bindings/zeebe/command/set_variables_test.go index fd8b9336a9..2541051847 100644 --- a/bindings/zeebe/command/set_variables_test.go +++ b/bindings/zeebe/command/set_variables_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -86,9 +87,12 @@ func TestSetVariables(t *testing.T) { t.Run("elementInstanceKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: SetVariablesOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: SetVariablesOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingElementInstanceKey) + require.ErrorIs(t, err, ErrMissingElementInstanceKey) }) t.Run("variables is mandatory", func(t *testing.T) { @@ -96,12 +100,12 @@ func TestSetVariables(t *testing.T) { ElementInstanceKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Data: data, Operation: SetVariablesOperation} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingVariables) + require.ErrorIs(t, err, ErrMissingVariables) }) t.Run("set variables", func(t *testing.T) { @@ -112,7 +116,7 @@ func TestSetVariables(t *testing.T) { }, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: SetVariablesOperation} @@ -120,11 +124,11 @@ func TestSetVariables(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.ElementInstanceKey, mc.cmd1.elementInstanceKey) assert.Equal(t, payload.Variables, mc.cmd1.cmd2.variables) - assert.Equal(t, false, mc.cmd1.cmd2.cmd3.local) + assert.False(t, mc.cmd1.cmd2.cmd3.local) }) t.Run("set local variables", func(t *testing.T) { @@ -136,7 +140,7 @@ func TestSetVariables(t *testing.T) { Local: true, } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: SetVariablesOperation} @@ -144,10 +148,10 @@ func TestSetVariables(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.ElementInstanceKey, mc.cmd1.elementInstanceKey) assert.Equal(t, payload.Variables, mc.cmd1.cmd2.variables) - assert.Equal(t, true, mc.cmd1.cmd2.cmd3.local) + assert.True(t, mc.cmd1.cmd2.cmd3.local) }) } diff --git a/bindings/zeebe/command/throw_error_test.go b/bindings/zeebe/command/throw_error_test.go index b8baa1c6fc..38df83b24f 100644 --- a/bindings/zeebe/command/throw_error_test.go +++ b/bindings/zeebe/command/throw_error_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -86,9 +87,12 @@ func TestThrowError(t *testing.T) { t.Run("jobKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: ThrowErrorOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: ThrowErrorOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingJobKey) + require.ErrorIs(t, err, ErrMissingJobKey) }) t.Run("errorCode is mandatory", func(t *testing.T) { @@ -96,12 +100,12 @@ func TestThrowError(t *testing.T) { JobKey: new(int64), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) cmd := ZeebeCommand{logger: testLogger} req := &bindings.InvokeRequest{Data: data, Operation: ThrowErrorOperation} _, err = cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingErrorCode) + require.ErrorIs(t, err, ErrMissingErrorCode) }) t.Run("throw an error", func(t *testing.T) { @@ -111,7 +115,7 @@ func TestThrowError(t *testing.T) { ErrorMessage: "b", } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: ThrowErrorOperation} @@ -119,7 +123,7 @@ func TestThrowError(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.JobKey, mc.cmd1.jobKey) assert.Equal(t, payload.ErrorCode, mc.cmd1.cmd2.errorCode) diff --git a/bindings/zeebe/command/update_job_retries_test.go b/bindings/zeebe/command/update_job_retries_test.go index a22e0baae1..99e2563913 100644 --- a/bindings/zeebe/command/update_job_retries_test.go +++ b/bindings/zeebe/command/update_job_retries_test.go @@ -22,6 +22,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/pb" "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/kit/logger" @@ -72,9 +73,12 @@ func TestUpdateJobRetries(t *testing.T) { t.Run("jobKey is mandatory", func(t *testing.T) { cmd := ZeebeCommand{logger: testLogger} - req := &bindings.InvokeRequest{Operation: UpdateJobRetriesOperation} + payload := map[string]string{} + data, marshalErr := json.Marshal(payload) + require.NoError(t, marshalErr) + req := &bindings.InvokeRequest{Operation: UpdateJobRetriesOperation, Data: data} _, err := cmd.Invoke(context.TODO(), req) - assert.Error(t, err, ErrMissingJobKey) + require.ErrorIs(t, err, ErrMissingJobKey) }) t.Run("update job retries", func(t *testing.T) { @@ -83,7 +87,7 @@ func TestUpdateJobRetries(t *testing.T) { Retries: new(int32), } data, err := json.Marshal(payload) - assert.NoError(t, err) + require.NoError(t, err) req := &bindings.InvokeRequest{Data: data, Operation: UpdateJobRetriesOperation} @@ -91,7 +95,7 @@ func TestUpdateJobRetries(t *testing.T) { cmd := ZeebeCommand{logger: testLogger, client: &mc} _, err = cmd.Invoke(context.TODO(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *payload.JobKey, mc.cmd1.jobKey) assert.Equal(t, *payload.Retries, mc.cmd1.cmd2.retries) diff --git a/bindings/zeebe/helper_test.go b/bindings/zeebe/helper_test.go index b40c3d251c..e61a8ec1b6 100644 --- a/bindings/zeebe/helper_test.go +++ b/bindings/zeebe/helper_test.go @@ -22,7 +22,7 @@ import ( func TestVariableStringToArrayRemovesSpaces(t *testing.T) { vars := VariableStringToArray(" a, b, c ") - require.Equal(t, 3, len(vars)) + require.Len(t, vars, 3) assert.Equal(t, "a", vars[0]) assert.Equal(t, "b", vars[1]) assert.Equal(t, "c", vars[2]) diff --git a/bindings/zeebe/jobworker/jobworker_test.go b/bindings/zeebe/jobworker/jobworker_test.go index c2a689c124..27389c70fe 100644 --- a/bindings/zeebe/jobworker/jobworker_test.go +++ b/bindings/zeebe/jobworker/jobworker_test.go @@ -20,6 +20,7 @@ import ( "github.com/camunda/zeebe/clients/go/v8/pkg/zbc" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/bindings/zeebe" @@ -61,8 +62,8 @@ func TestInit(t *testing.T) { jobWorker := ZeebeJobWorker{clientFactory: &mcf, logger: testLogger, closeCh: make(chan struct{})} err := jobWorker.Init(context.Background(), metadata) - assert.Error(t, err, ErrMissingJobType) - assert.NoError(t, jobWorker.Close()) + require.ErrorIs(t, err, ErrMissingJobType) + require.NoError(t, jobWorker.Close()) }) t.Run("sets client from client factory", func(t *testing.T) { @@ -75,27 +76,28 @@ func TestInit(t *testing.T) { jobWorker := ZeebeJobWorker{clientFactory: mcf, logger: testLogger, closeCh: make(chan struct{})} err := jobWorker.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) mc, err := mcf.Get(metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, mc, jobWorker.client) assert.Equal(t, metadata, mcf.metadata) - assert.NoError(t, jobWorker.Close()) + require.NoError(t, jobWorker.Close()) }) t.Run("returns error if client could not be instantiated properly", func(t *testing.T) { errParsing := errors.New("error on parsing metadata") metadata := bindings.Metadata{} + metadata.Properties = map[string]string{"maxJobsActive": "notanumber"} mcf := &mockClientFactory{ error: errParsing, } jobWorker := ZeebeJobWorker{clientFactory: mcf, logger: testLogger, closeCh: make(chan struct{})} err := jobWorker.Init(context.Background(), metadata) - assert.Error(t, err, errParsing) - assert.NoError(t, jobWorker.Close()) + require.Error(t, err, errParsing.Error()) + require.NoError(t, jobWorker.Close()) }) t.Run("sets client from client factory", func(t *testing.T) { @@ -109,13 +111,13 @@ func TestInit(t *testing.T) { jobWorker := ZeebeJobWorker{clientFactory: mcf, logger: testLogger, closeCh: make(chan struct{})} err := jobWorker.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) mc, err := mcf.Get(metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, mc, jobWorker.client) assert.Equal(t, metadata, mcf.metadata) - assert.NoError(t, jobWorker.Close()) + require.NoError(t, jobWorker.Close()) }) } diff --git a/common/authentication/azure/auth_test.go b/common/authentication/azure/auth_test.go index 2e99f4ced9..70a09a0460 100644 --- a/common/authentication/azure/auth_test.go +++ b/common/authentication/azure/auth_test.go @@ -46,7 +46,7 @@ func TestGetClientCert(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig, _ := settings.GetClientCert() @@ -120,11 +120,11 @@ func TestAuthorizorWithCertFile(t *testing.T) { testCertConfig, _ := settings.GetClientCert() spt, err := testCertConfig.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) err = os.Remove(testCertFileName) - assert.NoError(t, err) + require.NoError(t, err) } func TestAuthorizorWithCertBytes(t *testing.T) { @@ -140,13 +140,13 @@ func TestAuthorizorWithCertBytes(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig, _ := settings.GetClientCert() assert.NotNil(t, testCertConfig) spt, err := testCertConfig.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) }) @@ -162,13 +162,13 @@ func TestAuthorizorWithCertBytes(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig, _ := settings.GetClientCert() assert.NotNil(t, testCertConfig) _, err = testCertConfig.GetTokenCredential() - assert.Error(t, err) + require.Error(t, err) }) } @@ -179,7 +179,7 @@ func TestGetMSI(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig := settings.GetMSI() @@ -195,10 +195,10 @@ func TestFallbackToMSI(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) spt, err := settings.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) } @@ -211,13 +211,13 @@ func TestAuthorizorWithMSI(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig := settings.GetMSI() assert.NotNil(t, testCertConfig) spt, err := settings.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) } @@ -231,11 +231,11 @@ func TestFallbackToMSIbutAzureAuthDisallowed(t *testing.T) { "azureAuthMethods": "None", }, ) - assert.NoError(t, err) + require.NoError(t, err) _, err = settings.GetTokenCredential() - assert.Error(t, err) - assert.ErrorContains(t, err, "all Azure auth methods have been disabled") + require.Error(t, err) + require.ErrorContains(t, err, "all Azure auth methods have been disabled") } func TestFallbackToMSIandInAllowedList(t *testing.T) { @@ -248,13 +248,13 @@ func TestFallbackToMSIandInAllowedList(t *testing.T) { "azureAuthMethods": "clientcredentials,clientcertificate,workloadidentity,managedIdentity", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig := settings.GetMSI() assert.NotNil(t, testCertConfig) spt, err := settings.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) } @@ -268,11 +268,11 @@ func TestFallbackToMSIandNotInAllowedList(t *testing.T) { "azureAuthMethods": "clientcredentials,clientcertificate,workloadidentity", }, ) - assert.NoError(t, err) + require.NoError(t, err) _, err = settings.GetTokenCredential() - assert.Error(t, err) - assert.ErrorContains(t, err, "no suitable token provider for Azure AD") + require.Error(t, err) + require.ErrorContains(t, err, "no suitable token provider for Azure AD") } func TestFallbackToMSIandInvalidAuthMethod(t *testing.T) { @@ -291,8 +291,8 @@ func TestFallbackToMSIandInvalidAuthMethod(t *testing.T) { require.NotNil(t, testCertConfig) _, err = settings.GetTokenCredential() - assert.Error(t, err) - assert.ErrorContains(t, err, "invalid Azure auth method: superauth") + require.Error(t, err) + require.ErrorContains(t, err, "invalid Azure auth method: superauth") } func TestAuthorizorWithMSIAndUserAssignedID(t *testing.T) { @@ -304,13 +304,13 @@ func TestAuthorizorWithMSIAndUserAssignedID(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) testCertConfig := settings.GetMSI() assert.NotNil(t, testCertConfig) spt, err := settings.GetTokenCredential() - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, spt) } @@ -326,7 +326,7 @@ func TestFallbackToCLI(t *testing.T) { "vaultName": "vaultName", }, ) - assert.NoError(t, err) + require.NoError(t, err) // check whether this test can be run (i.e. Azure CLI is installed and logged in) @@ -343,7 +343,7 @@ func TestFallbackToCLI(t *testing.T) { if runTest { spt, err := settings.GetTokenCredential() - assert.Nil(t, err) + require.NoError(t, err) token, _ := spt.GetToken(context.Background(), policy.TokenRequestOptions{}) assert.NotNil(t, token) diff --git a/common/authentication/sqlite/metadata_test.go b/common/authentication/sqlite/metadata_test.go index cf597dfb25..9b59e1c95f 100644 --- a/common/authentication/sqlite/metadata_test.go +++ b/common/authentication/sqlite/metadata_test.go @@ -58,7 +58,7 @@ func TestSqliteMetadata(t *testing.T) { err = md.Validate() require.Error(t, err) - assert.ErrorContains(t, err, "missing connection string") + require.ErrorContains(t, err, "missing connection string") }) t.Run("invalid timeout", func(t *testing.T) { @@ -74,7 +74,7 @@ func TestSqliteMetadata(t *testing.T) { err = md.Validate() require.Error(t, err) - assert.ErrorContains(t, err, "timeout") + require.ErrorContains(t, err, "timeout") }) t.Run("aliases", func(t *testing.T) { diff --git a/common/component/azure/blobstorage/metadata_test.go b/common/component/azure/blobstorage/metadata_test.go index e0d6481846..d15309b20a 100644 --- a/common/component/azure/blobstorage/metadata_test.go +++ b/common/component/azure/blobstorage/metadata_test.go @@ -19,6 +19,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestParseMetadata(t *testing.T) { @@ -33,11 +34,11 @@ func TestParseMetadata(t *testing.T) { "decodeBase64": "true", } meta, err := parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test", meta.ContainerName) assert.Equal(t, "account", meta.AccountName) // storageAccessKey is parsed in the azauth package - assert.Equal(t, true, meta.DecodeBase64) + assert.True(t, meta.DecodeBase64) assert.Equal(t, int32(5), meta.RetryCount) assert.Equal(t, "", string(meta.PublicAccessLevel)) }) @@ -50,7 +51,7 @@ func TestParseMetadata(t *testing.T) { "publicAccessLevel": "blob", } meta, err := parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, azblob.PublicAccessTypeBlob, meta.PublicAccessLevel) }) @@ -62,7 +63,7 @@ func TestParseMetadata(t *testing.T) { "publicAccessLevel": "container", } meta, err := parseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, azblob.PublicAccessTypeContainer, meta.PublicAccessLevel) }) @@ -74,6 +75,6 @@ func TestParseMetadata(t *testing.T) { "publicAccessLevel": "invalid", } _, err := parseMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/common/component/azure/blobstorage/request_test.go b/common/component/azure/blobstorage/request_test.go index 9102a72c17..222cbe4576 100644 --- a/common/component/azure/blobstorage/request_test.go +++ b/common/component/azure/blobstorage/request_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/kit/logger" ) @@ -29,7 +30,7 @@ func TestBlobHTTPHeaderGeneration(t *testing.T) { requestMetadata := map[string]string{} blobHeaders, err := CreateBlobHTTPHeadersFromRequest(requestMetadata, &contentType, log) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "application/json", *blobHeaders.BlobContentType) }) t.Run("Content type and metadata provided (conflict), content type chosen", func(t *testing.T) { @@ -39,7 +40,7 @@ func TestBlobHTTPHeaderGeneration(t *testing.T) { } blobHeaders, err := CreateBlobHTTPHeadersFromRequest(requestMetadata, &contentType, log) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "application/json", *blobHeaders.BlobContentType) }) t.Run("ContentType not provided, metadata provided set backward compatibility", func(t *testing.T) { @@ -47,7 +48,7 @@ func TestBlobHTTPHeaderGeneration(t *testing.T) { contentTypeKey: "text/plain", } blobHeaders, err := CreateBlobHTTPHeadersFromRequest(requestMetadata, nil, log) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "text/plain", *blobHeaders.BlobContentType) }) } @@ -62,10 +63,10 @@ func TestSanitizeRequestMetadata(t *testing.T) { } meta := SanitizeMetadata(log, m) _ = assert.NotNil(t, meta["somecustomfield"]) && - assert.Equal(t, *meta["somecustomfield"], "some-custom-value") + assert.Equal(t, "some-custom-value", *meta["somecustomfield"]) _ = assert.NotNil(t, meta["specialfield"]) && - assert.Equal(t, *meta["specialfield"], "special:value") + assert.Equal(t, "special:value", *meta["specialfield"]) _ = assert.NotNil(t, meta["notallowed"]) && - assert.Equal(t, *meta["notallowed"], "not-allowed") + assert.Equal(t, "not-allowed", *meta["notallowed"]) }) } diff --git a/common/component/azure/eventhubs/eventhubs_test.go b/common/component/azure/eventhubs/eventhubs_test.go index e3d303ff1f..bf63c19b6b 100644 --- a/common/component/azure/eventhubs/eventhubs_test.go +++ b/common/component/azure/eventhubs/eventhubs_test.go @@ -61,7 +61,7 @@ func TestParseEventHubsMetadata(t *testing.T) { _, err := parseEventHubsMetadata(metadata, false, testLogger) require.Error(t, err) - assert.ErrorContains(t, err, "only one of connectionString or eventHubNamespace should be passed") + require.ErrorContains(t, err, "only one of connectionString or eventHubNamespace should be passed") }) t.Run("test missing metadata", func(t *testing.T) { @@ -70,7 +70,7 @@ func TestParseEventHubsMetadata(t *testing.T) { _, err := parseEventHubsMetadata(metadata, false, testLogger) require.Error(t, err) - assert.ErrorContains(t, err, "one of connectionString or eventHubNamespace is required") + require.ErrorContains(t, err, "one of connectionString or eventHubNamespace is required") }) } @@ -120,7 +120,7 @@ func TestConstructConnectionStringFromTopic(t *testing.T) { c, err := aeh.constructConnectionStringFromTopic(topic) require.Error(t, err) - assert.ErrorContains(t, err, "does not match the Event Hub name in the connection string") + require.ErrorContains(t, err, "does not match the Event Hub name in the connection string") assert.Equal(t, "", c) }) } diff --git a/common/component/azure/servicebus/message_pubsub_test.go b/common/component/azure/servicebus/message_pubsub_test.go index d72927b6e1..f25581bae5 100644 --- a/common/component/azure/servicebus/message_pubsub_test.go +++ b/common/component/azure/servicebus/message_pubsub_test.go @@ -70,6 +70,7 @@ func TestAddMessageAttributesToMetadata(t *testing.T) { } for _, tc := range testCases { + tc := tc for mType, mMap := range metadataMap { t.Run(fmt.Sprintf("%s, metadata is %s", tc.name, mType), func(t *testing.T) { actual := addMessageAttributesToMetadata(mMap, &tc.ASBMessage) diff --git a/common/component/azure/servicebus/message_test.go b/common/component/azure/servicebus/message_test.go index 63186078ca..02bbb51dbd 100644 --- a/common/component/azure/servicebus/message_test.go +++ b/common/component/azure/servicebus/message_test.go @@ -111,9 +111,9 @@ func TestAddMetadataToMessage(t *testing.T) { // assert. if tc.expectError { - require.NotNil(t, err) + require.Error(t, err) } else { - require.Nil(t, err) + require.NoError(t, err) assert.Equal(t, tc.expectedAzServiceBusMessage.Body, msg.Body) assert.Equal(t, tc.expectedAzServiceBusMessage.MessageID, msg.MessageID) assert.Equal(t, tc.expectedAzServiceBusMessage.CorrelationID, msg.CorrelationID) diff --git a/common/component/azure/servicebus/metadata_test.go b/common/component/azure/servicebus/metadata_test.go index 04cd5789a1..f1159fc3f7 100644 --- a/common/component/azure/servicebus/metadata_test.go +++ b/common/component/azure/servicebus/metadata_test.go @@ -18,6 +18,7 @@ import ( azservicebus "github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const invalidNumber = "invalid_number" @@ -52,12 +53,12 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, MetadataModeTopics) // assert. - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[keyConnectionString], m.ConnectionString) assert.Equal(t, fakeProperties[keyConsumerID], m.ConsumerID) assert.Equal(t, 90, m.TimeoutInSec) - assert.Equal(t, true, m.DisableEntityManagement) + assert.True(t, m.DisableEntityManagement) assert.Equal(t, 30, m.HandlerTimeoutInSec) assert.NotNil(t, m.LockRenewalInSec) assert.Equal(t, 15, m.LockRenewalInSec) @@ -88,11 +89,11 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[keyConnectionString], m.ConnectionString) assert.Equal(t, 90, m.TimeoutInSec) - assert.Equal(t, true, m.DisableEntityManagement) + assert.True(t, m.DisableEntityManagement) assert.Equal(t, 30, m.HandlerTimeoutInSec) assert.NotNil(t, m.LockRenewalInSec) assert.Equal(t, 15, m.LockRenewalInSec) @@ -123,12 +124,12 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, MetadataModeBinding) // assert. - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[keyConnectionString], m.ConnectionString) assert.Equal(t, fakeProperties[keyQueueName], m.QueueName) assert.Equal(t, 90, m.TimeoutInSec) - assert.Equal(t, true, m.DisableEntityManagement) + assert.True(t, m.DisableEntityManagement) assert.Equal(t, 30, m.HandlerTimeoutInSec) assert.NotNil(t, m.LockRenewalInSec) assert.Equal(t, 15, m.LockRenewalInSec) @@ -161,7 +162,7 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) assert.Empty(t, m.ConnectionString) }) @@ -173,7 +174,7 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "fakeConnectionString", m.ConnectionString) }) @@ -186,7 +187,7 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "fakeNamespace", m.NamespaceName) }) @@ -199,7 +200,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing required consumerID in topics", func(t *testing.T) { @@ -210,7 +211,7 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, MetadataModeTopics) // assert. - assert.Error(t, err) + require.Error(t, err) assert.Empty(t, m.ConsumerID) }) @@ -222,7 +223,7 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, MetadataModeBinding) // assert. - assert.Error(t, err) + require.Error(t, err) assert.Empty(t, m.QueueName) }) @@ -235,7 +236,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultTimeoutInSec, m.TimeoutInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional timeoutInSec", func(t *testing.T) { @@ -246,7 +247,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional disableEntityManagement", func(t *testing.T) { @@ -257,8 +258,8 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Equal(t, false, m.DisableEntityManagement) - assert.Nil(t, err) + assert.False(t, m.DisableEntityManagement) + require.NoError(t, err) }) t.Run("invalid optional disableEntityManagement", func(t *testing.T) { @@ -269,8 +270,8 @@ func TestParseServiceBusMetadata(t *testing.T) { m, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Equal(t, false, m.DisableEntityManagement) - assert.Nil(t, err) + assert.False(t, m.DisableEntityManagement) + require.NoError(t, err) }) t.Run("missing optional handlerTimeoutInSec binding", func(t *testing.T) { @@ -282,7 +283,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultHandlerTimeoutInSecBinding, m.HandlerTimeoutInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("missing optional handlerTimeoutInSec pubsub", func(t *testing.T) { @@ -294,7 +295,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultHandlerTimeoutInSecPubSub, m.HandlerTimeoutInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional handlerTimeoutInSec", func(t *testing.T) { @@ -305,7 +306,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional lockRenewalInSec", func(t *testing.T) { @@ -317,7 +318,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultLockRenewalInSec, m.LockRenewalInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional lockRenewalInSec", func(t *testing.T) { @@ -328,7 +329,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional maxRetriableErrorsPerSec", func(t *testing.T) { @@ -340,7 +341,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultMaxRetriableErrorsPerSec, m.MaxRetriableErrorsPerSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional maxRetriableErrorsPerSec", func(t *testing.T) { @@ -352,7 +353,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional maxActiveMessages binding", func(t *testing.T) { @@ -364,7 +365,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultMaxActiveMessagesBinding, m.MaxActiveMessages) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("missing optional maxActiveMessages pubsub", func(t *testing.T) { @@ -376,7 +377,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultMaxActiveMessagesPubSub, m.MaxActiveMessages) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional maxActiveMessages", func(t *testing.T) { @@ -387,7 +388,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional maxConnectionRecoveryInSec", func(t *testing.T) { @@ -399,7 +400,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultMaxConnectionRecoveryInSec, m.MaxConnectionRecoveryInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional maxConnectionRecoveryInSec", func(t *testing.T) { @@ -410,7 +411,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional minConnectionRecoveryInSec", func(t *testing.T) { @@ -422,7 +423,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, defaultMinConnectionRecoveryInSec, m.MinConnectionRecoveryInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional minConnectionRecoveryInSec", func(t *testing.T) { @@ -433,7 +434,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional maxConcurrentHandlers", func(t *testing.T) { @@ -445,7 +446,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Equal(t, 0, m.MaxConcurrentHandlers) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional maxConcurrentHandlers", func(t *testing.T) { @@ -456,7 +457,7 @@ func TestParseServiceBusMetadata(t *testing.T) { _, err := ParseMetadata(fakeProperties, nil, 0) // assert. - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing nullable maxDeliveryCount", func(t *testing.T) { @@ -468,7 +469,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Nil(t, m.MaxDeliveryCount) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("missing nullable defaultMessageTimeToLiveInSec", func(t *testing.T) { @@ -480,7 +481,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Nil(t, m.DefaultMessageTimeToLiveInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("missing nullable autoDeleteOnIdleInSec", func(t *testing.T) { @@ -492,7 +493,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Nil(t, m.AutoDeleteOnIdleInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("missing nullable lockDurationInSec", func(t *testing.T) { @@ -504,7 +505,7 @@ func TestParseServiceBusMetadata(t *testing.T) { // assert. assert.Nil(t, m.LockDurationInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Test add system metadata: ScheduledEnqueueTimeUtc", func(t *testing.T) { @@ -513,7 +514,7 @@ func TestParseServiceBusMetadata(t *testing.T) { MessageKeyScheduledEnqueueTimeUtc: "2024-06-15T13:45:30.00000000Z", } parseErr := addMetadataToMessage(&msg, metadata) - assert.NoError(t, parseErr) + require.NoError(t, parseErr) assert.Equal(t, int64(1718459130000000), msg.ScheduledEnqueueTime.UnixMicro()) msg2 := azservicebus.Message{} @@ -521,7 +522,7 @@ func TestParseServiceBusMetadata(t *testing.T) { MessageKeyScheduledEnqueueTimeUtc: "Sat, 15 Jun 2024 13:45:30 GMT", } parseErr2 := addMetadataToMessage(&msg2, metadata2) - assert.NoError(t, parseErr2) + require.NoError(t, parseErr2) assert.Equal(t, int64(1718459130000000), msg2.ScheduledEnqueueTime.UnixMicro()) msg3 := azservicebus.Message{} @@ -529,6 +530,6 @@ func TestParseServiceBusMetadata(t *testing.T) { MessageKeyScheduledEnqueueTimeUtc: "Sat 2024-06-15 12:13:14 UTC+4", } parseErr3 := addMetadataToMessage(&msg3, metadata3) - assert.Error(t, parseErr3) + require.Error(t, parseErr3) }) } diff --git a/common/component/kafka/auth_test.go b/common/component/kafka/auth_test.go index 40306e13e2..41afc5f634 100644 --- a/common/component/kafka/auth_test.go +++ b/common/component/kafka/auth_test.go @@ -97,7 +97,7 @@ func TestAuth(t *testing.T) { require.True(t, mockConfig.Net.TLS.Enable) //nolint:staticcheck certs := mockConfig.Net.TLS.Config.RootCAs.Subjects() - require.Equal(t, 1, len(certs)) + require.Len(t, certs, 1) }) t.Run("certificate with auth type 'none'", func(t *testing.T) { diff --git a/common/component/kafka/metadata_test.go b/common/component/kafka/metadata_test.go index d435c8ec41..ce82ee7d1c 100644 --- a/common/component/kafka/metadata_test.go +++ b/common/component/kafka/metadata_test.go @@ -24,6 +24,7 @@ import ( "github.com/dapr/kit/logger" ) +//nolint:gosec var ( clientCertPemMock = `-----BEGIN CERTIFICATE----- Y2xpZW50Q2VydA== @@ -119,7 +120,7 @@ func assertMetadata(t *testing.T, meta *KafkaMetadata) { require.Equal(t, "a", meta.ConsumerGroup) require.Equal(t, "a", meta.ClientID) require.Equal(t, 2048, meta.MaxMessageBytes) - require.Equal(t, true, meta.TLSSkipVerify) + require.True(t, meta.TLSSkipVerify) require.Equal(t, clientCertPemMock, meta.TLSClientCert) require.Equal(t, clientKeyMock, meta.TLSClientKey) require.Equal(t, caCertMock, meta.TLSCaCert) @@ -297,7 +298,7 @@ func TestTls(t *testing.T) { c := &sarama.Config{} err = updateTLSConfig(c, meta) require.NoError(t, err) - require.Equal(t, false, c.Net.TLS.Enable) + require.False(t, c.Net.TLS.Enable) }) t.Run("wrong client cert format", func(t *testing.T) { diff --git a/common/component/postgresql/metadata_test.go b/common/component/postgresql/metadata_test.go index b87be22d3a..686f7493c1 100644 --- a/common/component/postgresql/metadata_test.go +++ b/common/component/postgresql/metadata_test.go @@ -18,6 +18,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -29,8 +30,8 @@ func TestMetadata(t *testing.T) { props := map[string]string{} err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.Error(t, err) - assert.ErrorContains(t, err, "connection string") + require.Error(t, err) + require.ErrorContains(t, err, "connection string") }) t.Run("has connection string", func(t *testing.T) { @@ -40,7 +41,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("default table name", func(t *testing.T) { @@ -50,8 +51,8 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) - assert.Equal(t, m.TableName, defaultTableName) + require.NoError(t, err) + assert.Equal(t, defaultTableName, m.TableName) }) t.Run("custom table name", func(t *testing.T) { @@ -62,8 +63,8 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) - assert.Equal(t, m.TableName, "mytable") + require.NoError(t, err) + assert.Equal(t, "mytable", m.TableName) }) t.Run("default timeout", func(t *testing.T) { @@ -73,7 +74,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, defaultTimeout*time.Second, m.Timeout) }) @@ -85,7 +86,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.Error(t, err) + require.Error(t, err) }) t.Run("positive timeout", func(t *testing.T) { @@ -96,7 +97,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, 42*time.Second, m.Timeout) }) @@ -108,7 +109,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.Error(t, err) + require.Error(t, err) }) t.Run("default cleanupIntervalInSeconds", func(t *testing.T) { @@ -118,7 +119,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) _ = assert.NotNil(t, m.CleanupInterval) && assert.Equal(t, defaultCleanupInternal*time.Second, *m.CleanupInterval) }) @@ -131,7 +132,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.Error(t, err) + require.Error(t, err) }) t.Run("positive cleanupIntervalInSeconds", func(t *testing.T) { @@ -142,7 +143,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) _ = assert.NotNil(t, m.CleanupInterval) && assert.Equal(t, 42*time.Second, *m.CleanupInterval) }) @@ -155,7 +156,7 @@ func TestMetadata(t *testing.T) { } err := m.InitWithMetadata(state.Metadata{Base: metadata.Base{Properties: props}}, false) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, m.CleanupInterval) }) } diff --git a/common/component/postgresql/postgresql_query_test.go b/common/component/postgresql/postgresql_query_test.go index a756dcdfde..ac88e211c5 100644 --- a/common/component/postgresql/postgresql_query_test.go +++ b/common/component/postgresql/postgresql_query_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state/query" ) @@ -55,10 +56,10 @@ func TestPostgresqlQueryBuildQuery(t *testing.T) { } for _, test := range tests { data, err := os.ReadFile(test.input) - assert.NoError(t, err) + require.NoError(t, err) var qq query.Query err = json.Unmarshal(data, &qq) - assert.NoError(t, err) + require.NoError(t, err) q := &Query{ tableName: defaultTableName, @@ -66,7 +67,7 @@ func TestPostgresqlQueryBuildQuery(t *testing.T) { } qbuilder := query.NewQueryBuilder(q) err = qbuilder.BuildQuery(&qq) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, test.query, q.query) } } diff --git a/common/component/postgresql/postgresql_test.go b/common/component/postgresql/postgresql_test.go index 70064ade80..2dbd00c14d 100644 --- a/common/component/postgresql/postgresql_test.go +++ b/common/component/postgresql/postgresql_test.go @@ -23,7 +23,7 @@ import ( "github.com/google/uuid" pgxmock "github.com/pashagolub/pgxmock/v2" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" pginterfaces "github.com/dapr/components-contrib/common/component/postgresql/interfaces" "github.com/dapr/components-contrib/state" @@ -57,7 +57,7 @@ func TestMultiWithNoRequests(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestValidSetRequest(t *testing.T) { @@ -83,7 +83,7 @@ func TestValidSetRequest(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestInvalidMultiSetRequestNoKey(t *testing.T) { @@ -104,7 +104,7 @@ func TestInvalidMultiSetRequestNoKey(t *testing.T) { }) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestValidMultiDeleteRequest(t *testing.T) { @@ -129,7 +129,7 @@ func TestValidMultiDeleteRequest(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestInvalidMultiDeleteRequestNoKey(t *testing.T) { @@ -148,7 +148,7 @@ func TestInvalidMultiDeleteRequestNoKey(t *testing.T) { }) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestMultiOperationOrder(t *testing.T) { @@ -178,7 +178,7 @@ func TestMultiOperationOrder(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func createSetRequest() state.SetRequest { diff --git a/common/component/redis/redis_test.go b/common/component/redis/redis_test.go index ee0a78cda8..257701123d 100644 --- a/common/component/redis/redis_test.go +++ b/common/component/redis/redis_test.go @@ -14,11 +14,11 @@ limitations under the License. package redis import ( - "errors" "testing" "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -78,12 +78,12 @@ func TestParseRedisMetadata(t *testing.T) { err := m.Decode(fakeProperties) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[host], m.Host) assert.Equal(t, fakeProperties[password], m.Password) assert.Equal(t, fakeProperties[username], m.Username) assert.Equal(t, fakeProperties[redisType], m.RedisType) - assert.Equal(t, true, m.EnableTLS) + assert.True(t, m.EnableTLS) assert.Equal(t, 5*time.Second, time.Duration(m.DialTimeout)) assert.Equal(t, 5*time.Second, time.Duration(m.ReadTimeout)) assert.Equal(t, 50000*time.Millisecond, time.Duration(m.WriteTimeout)) @@ -97,23 +97,24 @@ func TestParseRedisMetadata(t *testing.T) { assert.Equal(t, 1*time.Second, time.Duration(m.PoolTimeout)) assert.Equal(t, 1*time.Second, time.Duration(m.IdleTimeout)) assert.Equal(t, 1*time.Second, time.Duration(m.IdleCheckFrequency)) - assert.Equal(t, true, m.Failover) + assert.True(t, m.Failover) assert.Equal(t, "master", m.SentinelMasterName) }) - t.Run("host is not given", func(t *testing.T) { - fakeProperties := getFakeProperties() + // TODO: Refactor shared redis code to throw error for missing properties + // t.Run("host is not given", func(t *testing.T) { + // fakeProperties := getFakeProperties() - fakeProperties[host] = "" + // fakeProperties[host] = "" - // act - m := &Settings{} - err := m.Decode(fakeProperties) + // // act + // m := &Settings{} + // err := m.Decode(fakeProperties) - // assert - assert.Error(t, errors.New("redis streams error: missing host address"), err) - assert.Empty(t, m.Host) - }) + // // assert + // require.ErrorIs(t, err, errors.New("redis streams error: missing host address")) + // assert.Empty(t, m.Host) + // }) t.Run("check values can be set as -1", func(t *testing.T) { fakeProperties := getFakeProperties() @@ -128,11 +129,11 @@ func TestParseRedisMetadata(t *testing.T) { m := &Settings{} err := m.Decode(fakeProperties) // assert - assert.NoError(t, err) - assert.True(t, m.ReadTimeout == -1) - assert.True(t, m.IdleTimeout == -1) - assert.True(t, m.IdleCheckFrequency == -1) - assert.True(t, m.RedisMaxRetryInterval == -1) - assert.True(t, m.RedisMinRetryInterval == -1) + require.NoError(t, err) + assert.EqualValues(t, -1, m.ReadTimeout) + assert.EqualValues(t, -1, m.IdleTimeout) + assert.EqualValues(t, -1, m.IdleCheckFrequency) + assert.EqualValues(t, -1, m.RedisMaxRetryInterval) + assert.EqualValues(t, -1, m.RedisMinRetryInterval) }) } diff --git a/configuration/azure/appconfig/appconfig_test.go b/configuration/azure/appconfig/appconfig_test.go index 41f88d6d2c..b351f6b232 100644 --- a/configuration/azure/appconfig/appconfig_test.go +++ b/configuration/azure/appconfig/appconfig_test.go @@ -111,8 +111,8 @@ func Test_getConfigurationWithProvidedKeys(t *testing.T) { Metadata: map[string]string{}, } res, err := s.Get(context.Background(), &req) - assert.Nil(t, err) - assert.True(t, len(res.Items) == 1) + require.NoError(t, err) + assert.Len(t, res.Items, 1) }) } @@ -130,8 +130,8 @@ func Test_subscribeConfigurationWithProvidedKeys(t *testing.T) { Metadata: metadata, } subID, err := s.Subscribe(context.Background(), &req, updateEventHandler) - assert.True(t, len(subID) > 0) - assert.Nil(t, err) + assert.NotEmpty(t, subID) + require.NoError(t, err) unReq := &configuration.UnsubscribeRequest{ ID: subID, } @@ -144,7 +144,7 @@ func Test_subscribeConfigurationWithProvidedKeys(t *testing.T) { Metadata: make(map[string]string), } _, err := s.Subscribe(context.Background(), &req, updateEventHandler) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -160,7 +160,7 @@ func Test_unsubscribeConfigurationWithProvidedKeys(t *testing.T) { ID: "id_not_exist", } err := s.Unsubscribe(cancelContext, &req) - assert.NotNil(t, err) + require.Error(t, err) _, ok := s.subscribeCancelCtxMap.Load("id1") assert.True(t, ok) }) @@ -170,7 +170,7 @@ func Test_unsubscribeConfigurationWithProvidedKeys(t *testing.T) { ID: "id1", } err := s.Unsubscribe(cancelContext, &req) - assert.Nil(t, err) + require.NoError(t, err) _, ok := s.subscribeCancelCtxMap.Load("id1") assert.False(t, ok) }) @@ -187,8 +187,8 @@ func Test_getConfigurationWithNoProvidedKeys(t *testing.T) { Metadata: map[string]string{}, } res, err := s.Get(context.Background(), &req) - assert.Nil(t, err) - assert.True(t, len(res.Items) == 2) + require.NoError(t, err) + assert.Len(t, res.Items, 2) }) } @@ -208,7 +208,7 @@ func TestInit(t *testing.T) { }} err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) cs, ok := s.(*ConfigurationStore) assert.True(t, ok) assert.Equal(t, testProperties[host], cs.metadata.Host) @@ -233,7 +233,7 @@ func TestInit(t *testing.T) { }} err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) cs, ok := s.(*ConfigurationStore) assert.True(t, ok) assert.Equal(t, testProperties[connectionString], cs.metadata.ConnectionString) diff --git a/configuration/postgres/postgres_test.go b/configuration/postgres/postgres_test.go index 0441e4dbd9..8d8c805df3 100644 --- a/configuration/postgres/postgres_test.go +++ b/configuration/postgres/postgres_test.go @@ -45,7 +45,7 @@ func TestSelectAllQuery(t *testing.T) { if err != nil { t.Errorf("Error building query: %v ", err) } - assert.NoError(t, err, "Error building query: %v ", err) + require.NoError(t, err, "Error building query: %v ", err) assert.Equal(t, expected, query, "did not get expected result. Got: '%v' , Expected: '%v'", query, expected) } @@ -59,7 +59,7 @@ func TestPostgresbuildQuery(t *testing.T) { query, params, err := buildQuery(g, "cfgtbl") _ = params - assert.NoError(t, err, "Error building query: %v ", err) + require.NoError(t, err, "Error building query: %v ", err) expected := "SELECT * FROM cfgtbl WHERE KEY IN ($1) AND $2 = $3" assert.Equal(t, expected, query, "did not get expected result. Got: '%v' , Expected: '%v'", query, expected) i := 0 @@ -101,18 +101,18 @@ func TestConnectAndQuery(t *testing.T) { rows := mock.QueryRow(context.Background(), query) var id string err = rows.Scan(&id) - assert.NoError(t, err, "error in scan") + require.NoError(t, err, "error in scan") err = mock.ExpectationsWereMet() - assert.NoError(t, err, "pgxmock error in expectations were met") + require.NoError(t, err, "pgxmock error in expectations were met") } func TestValidateInput(t *testing.T) { keys := []string{"testKey1", "testKey2"} - assert.Nil(t, validateInput(keys), "incorrect input provided: %v", keys) + require.NoError(t, validateInput(keys), "incorrect input provided: %v", keys) var keys2 []string - assert.Nil(t, validateInput(keys), "incorrect input provided: %v", keys2) + require.NoError(t, validateInput(keys), "incorrect input provided: %v", keys2) keys3 := []string{"Name 1=1"} - assert.Error(t, validateInput(keys3), "invalid key : 'Name 1=1'") + require.Error(t, validateInput(keys3), "invalid key : 'Name 1=1'") } diff --git a/configuration/redis/internal/redis_value.go b/configuration/redis/internal/redis_value.go index f6b44fe7c5..9cfa37b8f9 100644 --- a/configuration/redis/internal/redis_value.go +++ b/configuration/redis/internal/redis_value.go @@ -15,6 +15,7 @@ package internal import ( "fmt" + "strconv" "strings" ) @@ -35,7 +36,7 @@ func GetRedisValueAndVersion(redisValue string) (string, string) { } func ParseRedisKeyFromChannel(eventChannel string, redisDB int) (string, error) { - channelPrefix := keySpacePrefix + fmt.Sprint(redisDB) + "__:" + channelPrefix := keySpacePrefix + strconv.Itoa(redisDB) + "__:" index := strings.Index(eventChannel, channelPrefix) if index == -1 { return "", fmt.Errorf("wrong format of event channel, it should start with '%s': eventChannel=%s", channelPrefix, eventChannel) @@ -45,6 +46,6 @@ func ParseRedisKeyFromChannel(eventChannel string, redisDB int) (string, error) } func GetRedisChannelFromKey(key string, redisDB int) string { - redisEvent := keySpacePrefix + fmt.Sprint(redisDB) + "__:" + key + redisEvent := keySpacePrefix + strconv.Itoa(redisDB) + "__:" + key return redisEvent } diff --git a/configuration/redis/redis_test.go b/configuration/redis/redis_test.go index 54c96f65ad..a59f4d7b11 100644 --- a/configuration/redis/redis_test.go +++ b/configuration/redis/redis_test.go @@ -21,6 +21,7 @@ import ( "github.com/alicebob/miniredis/v2" jsoniter "github.com/json-iterator/go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" redisComponent "github.com/dapr/components-contrib/common/component/redis" contribMetadata "github.com/dapr/components-contrib/metadata" @@ -32,8 +33,8 @@ import ( func TestConfigurationStore_Get(t *testing.T) { s, c := setupMiniredis() defer s.Close() - assert.Nil(t, s.Set("testKey", "testValue")) - assert.Nil(t, s.Set("testKey2", "testValue2")) + require.NoError(t, s.Set("testKey", "testValue")) + require.NoError(t, s.Set("testKey2", "testValue2")) type fields struct { client redisComponent.RedisClient diff --git a/crypto/pubkey_cache_test.go b/crypto/pubkey_cache_test.go index f627383f86..ed4ab134a7 100644 --- a/crypto/pubkey_cache_test.go +++ b/crypto/pubkey_cache_test.go @@ -54,7 +54,7 @@ func TestPubKeyCacheGetKey(t *testing.T) { ctx: kitctx.NewPool(), } result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) }) @@ -77,11 +77,11 @@ func TestPubKeyCacheGetKey(t *testing.T) { } result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) result, err = cache.GetKey(context.Background(), "another-key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey2, result) }) @@ -96,7 +96,7 @@ func TestPubKeyCacheGetKey(t *testing.T) { }) result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) assert.Equal(t, 1, called, "should be called once") }) @@ -117,10 +117,10 @@ func TestPubKeyCacheGetKey(t *testing.T) { }) result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) result, err = cache.GetKey(context.Background(), "another-key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey2, result) assert.Equal(t, 2, called, "should be called once") @@ -138,7 +138,7 @@ func TestPubKeyCacheGetKey(t *testing.T) { }) result, err := cache.GetKey(context.Background(), "key") - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, result) assert.Equal(t, 1, called, "should be called once") }) @@ -160,7 +160,7 @@ func TestPubKeyCacheGetKey(t *testing.T) { go func() { defer wg.Done() result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) }() } @@ -232,7 +232,7 @@ func TestPubKeyCacheGetKey(t *testing.T) { go func() { result, err := cache.GetKey(ctx2, "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) close(getKeyReturned) }() @@ -348,14 +348,14 @@ func TestPubKeyCacheGetKey(t *testing.T) { defer wg.Done() assertSize(1) result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) }() go func() { defer wg.Done() assertSize(2) result, err := cache.GetKey(context.Background(), "key") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey, result) }() diff --git a/go.mod b/go.mod index f80240e640..9f7fac67b5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/dapr/components-contrib -go 1.20 +go 1.21 + +toolchain go1.21.4 require ( cloud.google.com/go/datastore v1.15.0 @@ -24,7 +26,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0 github.com/Azure/go-amqp v1.0.2 github.com/DATA-DOG/go-sqlmock v1.5.0 - github.com/IBM/sarama v1.41.1 + github.com/IBM/sarama v1.42.1 github.com/aerospike/aerospike-client-go/v6 v6.12.0 github.com/alibaba/sentinel-golang v1.0.4 github.com/alibabacloud-go/darabonba-openapi v0.2.1 @@ -107,8 +109,6 @@ require ( github.com/xdg-go/scram v1.1.2 go.etcd.io/etcd/client/v3 v3.5.9 go.mongodb.org/mongo-driver v1.12.1 - go.temporal.io/api v1.18.1 - go.temporal.io/sdk v1.21.1 go.uber.org/multierr v1.11.0 go.uber.org/ratelimit v0.3.0 golang.org/x/crypto v0.14.0 @@ -197,7 +197,6 @@ require ( github.com/eapache/queue v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/emirpasic/gods v1.12.0 // indirect - github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gavv/httpexpect v2.0.0+incompatible // indirect @@ -224,9 +223,7 @@ require ( github.com/gofrs/uuid v3.3.0+incompatible // indirect github.com/gogap/errors v0.0.0-20200228125012-531a6449b28c // indirect github.com/gogap/stack v0.0.0-20150131034635-fef68dddd4f8 // indirect - github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect @@ -244,7 +241,7 @@ require ( github.com/google/s2a-go v0.1.5 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -311,7 +308,6 @@ require ( github.com/oleiade/lane v1.0.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/panjf2000/ants/v2 v2.8.1 // indirect - github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pierrec/lz4 v2.6.0+incompatible // indirect @@ -327,7 +323,6 @@ require ( github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/robfig/cron v1.2.0 // indirect github.com/rs/zerolog v1.28.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/segmentio/asm v1.2.0 // indirect diff --git a/go.sum b/go.sum index bc83085e10..e1133aed3d 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -14,393 +13,42 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= cloud.google.com/go/kms v1.15.3 h1:RYsbxTRmk91ydKCzekI2YjryO4c5Y2M80Zwcs9/D/cI= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/secretmanager v1.11.2 h1:52Z78hH8NBWIqbvIG0wi0EoTaAmSx99KIOAmDXIlX0M= cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.33.0 h1:PVrDOkIC8qQVa1P3SXGpQvfuJhN2LHOoyZvWs8D2X5M= cloud.google.com/go/storage v1.33.0/go.mod h1:Hhh/dogNRGca7IWv1RC2YqEn0c0G77ctA/OxflYkiD8= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= @@ -440,8 +88,11 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.1.1 h1:gZ1ZZvrVUhDNsGNpbo2N87Y0CJB8p3IS5UH9Z4Ui97g= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.1.1/go.mod h1:7fQVOnRA11ScLE8dOCWanXHQa2NMFOM2i0u/1VRICXA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1 h1:8TkzQBrN9PWIwo7ekdd696KpC6IfTltV2/F8qKKBWik= @@ -466,8 +117,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/IBM/sarama v1.41.1 h1:B4/TdHce/8Ipza+qrLIeNJ9D1AOxZVp/3uDv6H/dp2M= -github.com/IBM/sarama v1.41.1/go.mod h1:JFCPURVskaipJdKRFkiE/OZqQHw7jqliaJmRwXCmSSw= +github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= +github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d h1:wvStE9wLpws31NiWUx+38wny1msZ/tm+eL5xmm4Y7So= github.com/Netflix/go-env v0.0.0-20220526054621-78278af1949d/go.mod h1:9XMFaCeRyW7fC9XJOWQ+NdAv8VLG7ys7l3x4ozEGLUQ= @@ -605,6 +256,7 @@ github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAm github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f h1:Pf0BjJDga7C98f0vhw+Ip5EaiE07S3lTKpIYPNS0nMo= github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f/go.mod h1:SghidfnxvX7ribW6nHI7T+IBbc9puZ9kk5Tx/88h8P4= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -628,12 +280,15 @@ github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8b github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= github.com/brianvoe/gofakeit/v6 v6.16.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= +github.com/bytecodealliance/wasmtime-go/v3 v3.0.2/go.mod h1:RnUjnIXxEJcL6BgCvNyzCCRzZcxCgsZCi+RNlvYor5Q= github.com/bytedance/gopkg v0.0.0-20210705062217-74c74ebadcae/go.mod h1:birsdqRCbwnckJbdAvcSao+AzOyibVEoWB55MjpYpB8= github.com/bytedance/gopkg v0.0.0-20210709064845-3c00f9323f09/go.mod h1:birsdqRCbwnckJbdAvcSao+AzOyibVEoWB55MjpYpB8= github.com/bytedance/gopkg v0.0.0-20210716082555-acbf5a2aa7e2/go.mod h1:birsdqRCbwnckJbdAvcSao+AzOyibVEoWB55MjpYpB8= @@ -656,8 +311,6 @@ github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -731,17 +384,13 @@ github.com/cloudwego/thriftgo v0.2.8/go.mod h1:dAyXHEmKXo0LfMCrblVEY3mUZsdeuA5+i github.com/cloudwego/thriftgo v0.3.0 h1:BBb9hVcqmu9p4iKUP/PSIaDB21Vfutgd7k2zgK37Q9Q= github.com/cloudwego/thriftgo v0.3.0/go.mod h1:AvH0iEjvKHu3cdxG7JvhSAaffkS4h2f4/ZxpJbm48W4= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 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/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 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/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= @@ -791,7 +440,9 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/deepmap/oapi-codegen v1.11.0 h1:f/X2NdIkaBKsSdpeuwLnY/vDI0AtPUrmB5LMgc7YD+A= github.com/deepmap/oapi-codegen v1.11.0/go.mod h1:k+ujhoQGxmQYBZBbxhOZNZf4j08qv5mC+OH+fFTnKxM= github.com/dgraph-io/badger/v3 v3.2103.5 h1:ylPa6qzbjYRQMU6jokoj4wzcaweHylt//CH0AKt0akg= +github.com/dgraph-io/badger/v3 v3.2103.5/go.mod h1:4MPiseMeDQ3FNCYwRbbcBOGJLf5jsE0PPFzRiKjtcdw= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= @@ -803,6 +454,7 @@ github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hg github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= @@ -844,20 +496,14 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s 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.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.0/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/fasthttp-contrib/sessions v0.0.0-20160905201309-74f6ac73d5d5 h1:M4CVMQ5ueVmGZAtkW2bsO+ftesCYpfxl27JTqtzKBzE= @@ -872,17 +518,21 @@ github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBD github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= +github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= @@ -996,18 +646,13 @@ github.com/gogap/errors v0.0.0-20200228125012-531a6449b28c h1:dM8T2g87Kj9PBQjpst github.com/gogap/errors v0.0.0-20200228125012-531a6449b28c/go.mod h1:tbRYYYC7g/H7QlCeX0Z2zaThWKowF4QQCFIsGgAsqRo= github.com/gogap/stack v0.0.0-20150131034635-fef68dddd4f8 h1:AuxION6c7in+AsPmFjQTUKT6/o1suT8XEEpfU0pWsHA= github.com/gogap/stack v0.0.0-20150131034635-fef68dddd4f8/go.mod h1:6q1WEv2BiAO4FSdwLQTJbWQYAn1/qDNJHUGJNXCj9kM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= -github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= @@ -1022,6 +667,7 @@ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGw github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1054,7 +700,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD 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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 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= @@ -1104,9 +749,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -1114,15 +758,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20220608213341-c488b8fa1db3/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= @@ -1135,25 +771,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= @@ -1161,6 +784,7 @@ github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORR github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1177,14 +801,10 @@ github.com/grandcat/zeroconf v1.0.0/go.mod h1:lTKmG1zh86XyCoUeIHSA4FJMBwCJiQmGfc github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= @@ -1203,6 +823,7 @@ github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUU github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1222,6 +843,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -1252,6 +874,7 @@ github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -1287,7 +910,6 @@ github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.56 h1:ULzGSSe95hkOdh17NsiPV3lw github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.56/go.mod h1:bsqx6o47Kl4YsniIjPwuoeqiIB5Fc3JbSpB2b3o3WFQ= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -1339,6 +961,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= +github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -1392,13 +1015,13 @@ github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgSh github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7/go.mod h1:Y2SaZf2Rzd0pXkLVhLlCiAXFCLSXAIbTKDivVgff/AM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= @@ -1443,8 +1066,6 @@ github.com/linkedin/goavro/v2 v2.9.8 h1:jN50elxBsGBDGVDEKqUlDuU1cFwJ11K/yrJCBMe/ github.com/linkedin/goavro/v2 v2.9.8/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF8Jw03O5sjqA= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/machinebox/graphql v0.2.2 h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkBZfo= github.com/machinebox/graphql v0.2.2/go.mod h1:F+kbVMHuwrQ5tYgU9JXlnskM8nOaFxCAEolaQybkjWA= @@ -1483,6 +1104,7 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -1639,8 +1261,6 @@ github.com/pashagolub/pgxmock/v2 v2.12.0/go.mod h1:D3YslkN/nJ4+umVqWmbwfSXugJIjP github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= -github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= @@ -1667,8 +1287,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1744,8 +1362,6 @@ github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= -github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= -github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -1753,6 +1369,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= @@ -1813,8 +1430,6 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1824,6 +1439,7 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -1831,9 +1447,11 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stealthrocket/wasi-go v0.8.1-0.20230912180546-8efbab50fb58 h1:mTC4gyv3lcJ1XpzZMAckqkvWUqeT5Bva4RAT1IoHAAA= github.com/stealthrocket/wasi-go v0.8.1-0.20230912180546-8efbab50fb58/go.mod h1:ZAYCOqLJkc9P6fcq14TV4cf+gJ2fHthp9kCGxBViagE= github.com/stealthrocket/wazergo v0.19.1 h1:BPrITETPgSFwiytwmToO0MbUC/+RGC39JScz1JmmG6c= +github.com/stealthrocket/wazergo v0.19.1/go.mod h1:riI0hxw4ndZA5e6z7PesHg2BtTftcZaMxRcoiGGipTs= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1859,6 +1477,7 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/supplyon/gremcos v0.1.40 h1:OFJw3MV44HNE9N6SKYK0zRBbEwyugyyjjqeXiGi5E3w= github.com/supplyon/gremcos v0.1.40/go.mod h1:LI6lxKObicSoIw1N04rHyjz9tGSaevM6Ydbo3XfyZfA= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= @@ -1986,12 +1605,12 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.6-0.20201102222123-380f4078db9f/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0/go.mod h1:XiYsayHc36K3EByOO6nbAXnAWbrUxdjUROCEeeROOH8= go.opentelemetry.io/contrib/instrumentation/runtime v0.32.0/go.mod h1:qtaLlIO4HC4DfedkYTOrvS2u7nA3N/v8w9mehrBD4O8= go.opentelemetry.io/contrib/propagators/b3 v1.7.0/go.mod h1:gXx7AhL4xXCF42gpm9dQvdohoDa2qeyEx4eIIxqK+h4= go.opentelemetry.io/contrib/propagators/jaeger v1.7.0/go.mod h1:kt2lNImfxV6dETRsDCENd6jU6G0mPRS+P0qlNuvtkTE= @@ -2004,12 +1623,15 @@ go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeH go.opentelemetry.io/otel/bridge/opencensus v0.30.0/go.mod h1:jyERBSEU6EX7oR+LytaatX1UxNphEIRXj1q3n/6hIk0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0/go.mod h1:M1hVZHNxcbkAlcvrOMlpQ4YOO3Awf+4N2dxkZL3xm04= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.30.0/go.mod h1:8Lz1GGcrx1kPGE3zqDrK7ZcPzABEfIQqBjq7roQa5ZA= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.30.0/go.mod h1:RejW0QAFotPIixlFZKZka4/70S5UaFOqDO9DYOgScIs= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0/go.mod h1:ceUgdyfNv4h4gLxHR0WNfDiiVmZFodZhZSbOLhpxqXE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0/go.mod h1:E+/KKhwOSw8yoPxSSuUHG6vKppkvhN+S1Jc7Nib3k3o= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.4.1/go.mod h1:BFiGsTMZdqtxufux8ANXuMeRz9dMPVFdJZadUWDFD7o= go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= @@ -2024,14 +1646,9 @@ go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48 go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.16.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.temporal.io/api v1.16.0/go.mod h1:u3qLbaVTffmcZQbf9ueB+16LKmhkftH79SJOV517MDk= -go.temporal.io/api v1.18.1 h1:kC3TS0iVXaAKe12L39I37b9X59x4p7E6512EfG/+RCU= -go.temporal.io/api v1.18.1/go.mod h1:VWdEGKUWRYKMkKJPo3wONuGZKay+d5L641b+JRuw0Bo= -go.temporal.io/sdk v1.21.1 h1:SJCzSsZLBsFiHniJ+E7Yy74pcAs1lg7NbFnsUJ4ggIM= -go.temporal.io/sdk v1.21.1/go.mod h1:Pq3Mp7p0lWNFM+YS2guBy8V/lJySh329AcyS+Wj/Wmo= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -2063,13 +1680,13 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= goji.io v2.0.2+incompatible h1:uIssv/elbKRLznFUy3Xj4+2Mz/qKhek/9aZQDUMae7c= +goji.io v2.0.2+incompatible/go.mod h1:sbqFwrtqZACxLBTQcdgVjFh54yGVCvwq8+w49MVMMIk= golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/arch v0.0.0-20220722155209-00200b7164a7/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.2.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -2082,19 +1699,16 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -2155,10 +1769,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -2209,23 +1820,17 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2233,21 +1838,12 @@ golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220513224357-95641704303c/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -2261,27 +1857,9 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2297,7 +1875,6 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -2356,23 +1933,17 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2382,47 +1953,31 @@ golang.org/x/sys v0.0.0-20210415045647-66c3f260301c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2458,7 +2013,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -2480,8 +2034,6 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2542,27 +2094,18 @@ golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= @@ -2573,8 +2116,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -2602,41 +2143,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/api v0.138.0 h1:K/tVp05MxNVbHShRw9m7e9VJGdagNeTdMzqPH7AUqr0= google.golang.org/api v0.138.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -2646,11 +2152,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2685,93 +2189,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210106152847-07624b53cd92/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= @@ -2779,7 +2202,6 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -2799,38 +2221,21 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= 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/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 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= @@ -2945,7 +2350,9 @@ modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs= modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= @@ -2959,10 +2366,13 @@ modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0 modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= +modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/lock/redis/standalone_test.go b/lock/redis/standalone_test.go index dc641bba58..b4e99f49c3 100644 --- a/lock/redis/standalone_test.go +++ b/lock/redis/standalone_test.go @@ -43,7 +43,7 @@ func TestStandaloneRedisLock_InitError(t *testing.T) { // init err := comp.InitLockStore(context.Background(), cfg) - assert.Error(t, err) + require.Error(t, err) }) t.Run("error when no host", func(t *testing.T) { @@ -59,7 +59,7 @@ func TestStandaloneRedisLock_InitError(t *testing.T) { // init err := comp.InitLockStore(context.Background(), cfg) - assert.Error(t, err) + require.Error(t, err) }) t.Run("error when wrong MaxRetries", func(t *testing.T) { @@ -76,7 +76,7 @@ func TestStandaloneRedisLock_InitError(t *testing.T) { // init err := comp.InitLockStore(context.Background(), cfg) - assert.Error(t, err) + require.Error(t, err) }) } @@ -127,7 +127,7 @@ func TestStandaloneRedisLock_TryLock(t *testing.T) { LockOwner: ownerID1, }) require.NoError(t, err) - assert.True(t, unlockResp.Status == 0, "client1 failed to unlock!") + assert.EqualValues(t, 0, unlockResp.Status, "client1 failed to unlock!") // 4. Client 2 get lock owner2 = uuid.New().String() @@ -145,5 +145,5 @@ func TestStandaloneRedisLock_TryLock(t *testing.T) { LockOwner: owner2, }) require.NoError(t, err) - assert.True(t, unlockResp.Status == 0, "client2 failed to unlock!") + assert.EqualValues(t, 0, unlockResp.Status, "client2 failed to unlock!") } diff --git a/metadata/utils_test.go b/metadata/utils_test.go index 5ff30cacc3..3c9cecb23d 100644 --- a/metadata/utils_test.go +++ b/metadata/utils_test.go @@ -19,6 +19,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/kit/metadata" ) @@ -29,15 +30,15 @@ func TestIsRawPayload(t *testing.T) { "notfound": "1", }) - assert.Equal(t, false, val) - assert.NoError(t, err) + assert.False(t, val) + require.NoError(t, err) }) t.Run("Metadata map is nil", func(t *testing.T) { val, err := IsRawPayload(nil) - assert.Equal(t, false, val) - assert.NoError(t, err) + assert.False(t, val) + require.NoError(t, err) }) t.Run("Metadata with bad value", func(t *testing.T) { @@ -45,8 +46,8 @@ func TestIsRawPayload(t *testing.T) { "rawPayload": "Not a boolean", }) - assert.Equal(t, false, val) - assert.NotNil(t, err) + assert.False(t, val) + require.Error(t, err) }) t.Run("Metadata with correct value as false", func(t *testing.T) { @@ -54,8 +55,8 @@ func TestIsRawPayload(t *testing.T) { "rawPayload": "false", }) - assert.Equal(t, false, val) - assert.NoError(t, err) + assert.False(t, val) + require.NoError(t, err) }) t.Run("Metadata with correct value as true", func(t *testing.T) { @@ -63,8 +64,8 @@ func TestIsRawPayload(t *testing.T) { "rawPayload": "true", }) - assert.Equal(t, true, val) - assert.NoError(t, err) + assert.True(t, val) + require.NoError(t, err) }) } @@ -73,7 +74,7 @@ func TestTryGetContentType(t *testing.T) { val, ok := TryGetContentType(map[string]string{}) assert.Equal(t, "", val) - assert.Equal(t, false, ok) + assert.False(t, ok) }) t.Run("Metadata with empty content type", func(t *testing.T) { @@ -82,7 +83,7 @@ func TestTryGetContentType(t *testing.T) { }) assert.Equal(t, "", val) - assert.Equal(t, false, ok) + assert.False(t, ok) }) t.Run("Metadata with corrent content type", func(t *testing.T) { @@ -92,7 +93,7 @@ func TestTryGetContentType(t *testing.T) { }) assert.Equal(t, contentType, val) - assert.Equal(t, true, ok) + assert.True(t, ok) }) } diff --git a/middleware/http/bearer/metadata_test.go b/middleware/http/bearer/metadata_test.go index ea291b8672..b12193fb10 100644 --- a/middleware/http/bearer/metadata_test.go +++ b/middleware/http/bearer/metadata_test.go @@ -97,7 +97,7 @@ func TestParseMetadata(t *testing.T) { "audience": "foo", }) require.Error(t, err) - assert.ErrorContains(t, err, "metadata property 'issuer' is required") + require.ErrorContains(t, err, "metadata property 'issuer' is required") }) t.Run("missing audience", func(t *testing.T) { @@ -105,6 +105,6 @@ func TestParseMetadata(t *testing.T) { "issuer": "http://localhost", }) require.Error(t, err) - assert.ErrorContains(t, err, "metadata property 'audience' is required") + require.ErrorContains(t, err, "metadata property 'audience' is required") }) } diff --git a/middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware_test.go b/middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware_test.go index 93ece76eed..9d1ddbab3a 100644 --- a/middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware_test.go +++ b/middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware_test.go @@ -47,7 +47,7 @@ func TestOAuth2ClientCredentialsMetadata(t *testing.T) { log := logger.NewLogger("oauth2clientcredentials.test") _, err := NewOAuth2ClientCredentialsMiddleware(log).GetHandler(context.Background(), metadata) - assert.EqualError(t, err, "metadata errors: Parameter 'headerName' needs to be set. Parameter 'clientID' needs to be set. Parameter 'clientSecret' needs to be set. Parameter 'scopes' needs to be set. Parameter 'tokenURL' needs to be set. ") + require.EqualError(t, err, "metadata errors: Parameter 'headerName' needs to be set. Parameter 'clientID' needs to be set. Parameter 'clientSecret' needs to be set. Parameter 'scopes' needs to be set. Parameter 'tokenURL' needs to be set. ") // Invalid authStyle (non int) metadata.Properties = map[string]string{ @@ -59,17 +59,17 @@ func TestOAuth2ClientCredentialsMetadata(t *testing.T) { "authStyle": "asdf", // This is the value to test } _, err2 := NewOAuth2ClientCredentialsMiddleware(log).GetHandler(context.Background(), metadata) - assert.EqualError(t, err2, "metadata errors: 1 error(s) decoding:\n\n* cannot parse 'authStyle' as int: strconv.ParseInt: parsing \"asdf\": invalid syntax") + require.EqualError(t, err2, "metadata errors: 1 error(s) decoding:\n\n* cannot parse 'authStyle' as int: strconv.ParseInt: parsing \"asdf\": invalid syntax") // Invalid authStyle (int > 2) metadata.Properties["authStyle"] = "3" _, err3 := NewOAuth2ClientCredentialsMiddleware(log).GetHandler(context.Background(), metadata) - assert.EqualError(t, err3, "metadata errors: Parameter 'authStyle' can only have the values 0,1,2. Received: '3'. ") + require.EqualError(t, err3, "metadata errors: Parameter 'authStyle' can only have the values 0,1,2. Received: '3'. ") // Invalid authStyle (int < 0) metadata.Properties["authStyle"] = "-1" _, err4 := NewOAuth2ClientCredentialsMiddleware(log).GetHandler(context.Background(), metadata) - assert.EqualError(t, err4, "metadata errors: Parameter 'authStyle' can only have the values 0,1,2. Received: '-1'. ") + require.EqualError(t, err4, "metadata errors: Parameter 'authStyle' can only have the values 0,1,2. Received: '-1'. ") } // TestOAuth2ClientCredentialsToken will check diff --git a/middleware/http/opa/middleware_test.go b/middleware/http/opa/middleware_test.go index 28524ac0d5..b2f9b3b518 100644 --- a/middleware/http/opa/middleware_test.go +++ b/middleware/http/opa/middleware_test.go @@ -424,7 +424,7 @@ func TestStatus_UnmarshalJSON(t *testing.T) { return } - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, obj.Value, test.expectValue) }) } diff --git a/middleware/http/ratelimit/ratelimit_middleware_test.go b/middleware/http/ratelimit/ratelimit_middleware_test.go index 2cd06a01a7..0e86679e58 100644 --- a/middleware/http/ratelimit/ratelimit_middleware_test.go +++ b/middleware/http/ratelimit/ratelimit_middleware_test.go @@ -31,7 +31,7 @@ func TestMiddlewareGetNativeMetadata(t *testing.T) { maxRequestsPerSecondKey: "0", }}}) require.Error(t, err) - assert.ErrorContains(t, err, "metadata property "+maxRequestsPerSecondKey+" must be a positive value") + require.ErrorContains(t, err, "metadata property "+maxRequestsPerSecondKey+" must be a positive value") assert.Nil(t, res) }) @@ -40,7 +40,7 @@ func TestMiddlewareGetNativeMetadata(t *testing.T) { maxRequestsPerSecondKey: "-2", }}}) require.Error(t, err) - assert.ErrorContains(t, err, "metadata property "+maxRequestsPerSecondKey+" must be a positive value") + require.ErrorContains(t, err, "metadata property "+maxRequestsPerSecondKey+" must be a positive value") assert.Nil(t, res) }) @@ -49,7 +49,7 @@ func TestMiddlewareGetNativeMetadata(t *testing.T) { maxRequestsPerSecondKey: "foo-bar", }}}) require.Error(t, err) - assert.ErrorContains(t, err, "cannot parse 'MaxRequestsPerSecond' as float") + require.ErrorContains(t, err, "cannot parse 'MaxRequestsPerSecond' as float") assert.Nil(t, res) }) @@ -59,7 +59,7 @@ func TestMiddlewareGetNativeMetadata(t *testing.T) { }}}) require.NoError(t, err) require.NotNil(t, res) - assert.Equal(t, float64(10), res.MaxRequestsPerSecond) + assert.EqualValues(t, float64(10), res.MaxRequestsPerSecond) }) t.Run(maxRequestsPerSecondKey+" is a float", func(t *testing.T) { @@ -68,6 +68,6 @@ func TestMiddlewareGetNativeMetadata(t *testing.T) { }}}) require.NoError(t, err) require.NotNil(t, res) - assert.Equal(t, float64(42.42), res.MaxRequestsPerSecond) + assert.EqualValues(t, float64(42.42), res.MaxRequestsPerSecond) }) } diff --git a/middleware/http/routeralias/routeralias_middleware_test.go b/middleware/http/routeralias/routeralias_middleware_test.go index d6484ecc43..4efc99cccf 100644 --- a/middleware/http/routeralias/routeralias_middleware_test.go +++ b/middleware/http/routeralias/routeralias_middleware_test.go @@ -50,7 +50,7 @@ func TestRouterAlias(t *testing.T) { handler(http.HandlerFunc(mockedRequestHandler)).ServeHTTP(w, r) msg, err := io.ReadAll(w.Body) - assert.NoError(t, err) + require.NoError(t, err) result := w.Result() assert.Equal(t, http.StatusOK, result.StatusCode) assert.Equal(t, @@ -66,7 +66,7 @@ func TestRouterAlias(t *testing.T) { handler(http.HandlerFunc(mockedRequestHandler)).ServeHTTP(w, r) msg, err := io.ReadAll(w.Body) - assert.NoError(t, err) + require.NoError(t, err) result := w.Result() assert.Equal(t, http.StatusOK, result.StatusCode) assert.Equal(t, @@ -82,7 +82,7 @@ func TestRouterAlias(t *testing.T) { handler(http.HandlerFunc(mockedRequestHandler)).ServeHTTP(w, r) msg, err := io.ReadAll(w.Body) - assert.NoError(t, err) + require.NoError(t, err) result := w.Result() assert.Equal(t, http.StatusOK, result.StatusCode) assert.Equal(t, @@ -97,7 +97,7 @@ func TestRouterAlias(t *testing.T) { w := httptest.NewRecorder() handler(http.HandlerFunc(mockedRequestHandler)).ServeHTTP(w, r) msg, err := io.ReadAll(w.Body) - assert.NoError(t, err) + require.NoError(t, err) result := w.Result() assert.Equal(t, http.StatusOK, result.StatusCode) assert.Equal(t, diff --git a/middleware/http/routerchecker/routerchecker_middleware_test.go b/middleware/http/routerchecker/routerchecker_middleware_test.go index 987a24c3cc..f2288e3160 100644 --- a/middleware/http/routerchecker/routerchecker_middleware_test.go +++ b/middleware/http/routerchecker/routerchecker_middleware_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/middleware" @@ -39,7 +40,7 @@ func TestRequestHandlerWithIllegalRouterRule(t *testing.T) { log := logger.NewLogger("routerchecker.test") rchecker := NewMiddleware(log) handler, err := rchecker.GetHandler(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) r := httptest.NewRequest(http.MethodGet, "http://localhost:5001/v1.0/invoke/qcg.default/method/%20cat%20password", nil) w := httptest.NewRecorder() @@ -56,7 +57,7 @@ func TestRequestHandlerWithLegalRouterRule(t *testing.T) { log := logger.NewLogger("routerchecker.test") rchecker := NewMiddleware(log) handler, err := rchecker.GetHandler(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) r := httptest.NewRequest(http.MethodGet, "http://localhost:5001/v1.0/invoke/qcg.default/method", nil) w := httptest.NewRecorder() diff --git a/middleware/http/sentinel/middleware_test.go b/middleware/http/sentinel/middleware_test.go index c8594ad92b..c0b587e1fc 100644 --- a/middleware/http/sentinel/middleware_test.go +++ b/middleware/http/sentinel/middleware_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/middleware" @@ -50,7 +51,7 @@ func TestRequestHandlerWithFlowRules(t *testing.T) { log := logger.NewLogger("sentinel.test") sentinel := NewMiddleware(log) handler, err := sentinel.GetHandler(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) r := httptest.NewRequest(http.MethodGet, "http://localhost:5001/v1.0/nodeapp/healthz", nil) @@ -125,13 +126,14 @@ func TestLoadRules(t *testing.T) { } for _, c := range cases { + c := c t.Run(c.name, func(t *testing.T) { sentinel, _ := NewMiddleware(nil).(*Middleware) err := sentinel.loadSentinelRules(&c.meta) if c.expectErr { - assert.NotNil(t, err) + require.Error(t, err) } else { - assert.Nil(t, err) + require.NoError(t, err) } }) } diff --git a/middleware/http/sentinel/rules_test.go b/middleware/http/sentinel/rules_test.go index 2809ea02a3..f4d525108e 100644 --- a/middleware/http/sentinel/rules_test.go +++ b/middleware/http/sentinel/rules_test.go @@ -21,7 +21,7 @@ import ( "github.com/alibaba/sentinel-golang/core/flow" "github.com/alibaba/sentinel-golang/core/isolation" "github.com/alibaba/sentinel-golang/core/system" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestFlowRules(t *testing.T) { @@ -37,7 +37,7 @@ func TestFlowRules(t *testing.T) { b, _ := json.Marshal(rules) t.Logf("%s", b) err := loadRules(string(b), newFlowRuleDataSource) - assert.Nil(t, err) + require.NoError(t, err) } func TestCircuitBreakerRules(t *testing.T) { @@ -55,7 +55,7 @@ func TestCircuitBreakerRules(t *testing.T) { b, _ := json.Marshal(rules) t.Logf("%s", b) err := loadRules(string(b), newCircuitBreakerRuleDataSource) - assert.Nil(t, err) + require.NoError(t, err) } func TestHotspotParamRules(t *testing.T) { @@ -73,7 +73,7 @@ func TestHotspotParamRules(t *testing.T) { ] ` err := loadRules(rules, newHotSpotParamRuleDataSource) - assert.Nil(t, err) + require.NoError(t, err) } func TestIsolationRules(t *testing.T) { @@ -88,7 +88,7 @@ func TestIsolationRules(t *testing.T) { b, _ := json.Marshal(rules) t.Logf("%s", b) err := loadRules(string(b), newIsolationRuleDataSource) - assert.Nil(t, err) + require.NoError(t, err) } func TestSystemRules(t *testing.T) { @@ -104,5 +104,5 @@ func TestSystemRules(t *testing.T) { b, _ := json.Marshal(rules) t.Logf("%s", b) err := loadRules(string(b), newSystemRuleDataSource) - assert.Nil(t, err) + require.NoError(t, err) } diff --git a/nameresolution/consul/consul_test.go b/nameresolution/consul/consul_test.go index 3f36c3394b..8dda8fc77c 100644 --- a/nameresolution/consul/consul_test.go +++ b/nameresolution/consul/consul_test.go @@ -24,6 +24,7 @@ import ( consul "github.com/hashicorp/consul/api" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" nr "github.com/dapr/components-contrib/nameresolution" "github.com/dapr/kit/logger" @@ -768,7 +769,7 @@ func TestResolveID(t *testing.T) { resolver.Close() waitTillTrueOrTimeout(time.Second*1, func() bool { return mockReg.removeAllCalled.Load() == 1 }) assert.Equal(t, int32(1), mockReg.removeAllCalled.Load()) - assert.Equal(t, false, resolver.watcherStarted.Load()) + assert.False(t, resolver.watcherStarted.Load()) }, }, { @@ -786,7 +787,7 @@ func TestResolveID(t *testing.T) { _, err := resolver.ResolveID(context.Background(), req) assert.Equal(t, 1, mock.mockHealth.serviceCalled) - assert.Error(t, err) + require.Error(t, err) }, }, { @@ -994,7 +995,7 @@ func TestResolveID(t *testing.T) { _, err := resolver.ResolveID(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) }, }, { @@ -1019,7 +1020,7 @@ func TestResolveID(t *testing.T) { _, err := resolver.ResolveID(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) }, }, } @@ -1360,10 +1361,10 @@ func TestParseConfig(t *testing.T) { actual, err := parseConfig(tt.input) if tt.shouldParse { - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, tt.expected, actual) } else { - assert.Error(t, err) + require.Error(t, err) } }) } @@ -1392,13 +1393,13 @@ func TestGetConfig(t *testing.T) { // QueryOptions assert.NotNil(t, actual.QueryOptions) - assert.Equal(t, true, actual.QueryOptions.UseCache) + assert.True(t, actual.QueryOptions.UseCache) // DaprPortMetaKey assert.Equal(t, defaultDaprPortMetaKey, actual.DaprPortMetaKey) // Cache - assert.Equal(t, false, actual.UseCache) + assert.False(t, actual.UseCache) }, }, { @@ -1415,7 +1416,7 @@ func TestGetConfig(t *testing.T) { assert.Equal(t, consul.DefaultConfig().Address, actual.Client.Address) // Checks - assert.Equal(t, 1, len(actual.Registration.Checks)) + assert.Len(t, actual.Registration.Checks, 1) check := actual.Registration.Checks[0] assert.Equal(t, "Dapr Health Status", check.Name) assert.Equal(t, "daprHealth:test-app-"+metadata.Instance.Address+"-"+strconv.Itoa(metadata.Instance.DaprHTTPPort), check.CheckID) @@ -1423,17 +1424,17 @@ func TestGetConfig(t *testing.T) { assert.Equal(t, fmt.Sprintf("http://%s/v1.0/healthz?appid=%s", net.JoinHostPort(metadata.Instance.Address, strconv.Itoa(metadata.Instance.DaprHTTPPort)), metadata.Instance.AppID), check.HTTP) // Metadata - assert.Equal(t, 1, len(actual.Registration.Meta)) + assert.Len(t, actual.Registration.Meta, 1) assert.Equal(t, "50001", actual.Registration.Meta[actual.DaprPortMetaKey]) // QueryOptions - assert.Equal(t, true, actual.QueryOptions.UseCache) + assert.True(t, actual.QueryOptions.UseCache) // DaprPortMetaKey assert.Equal(t, defaultDaprPortMetaKey, actual.DaprPortMetaKey) // Cache - assert.Equal(t, false, actual.UseCache) + assert.False(t, actual.UseCache) }, }, { @@ -1466,7 +1467,7 @@ func TestGetConfig(t *testing.T) { func(t *testing.T, metadata nr.Metadata) { actual, _ := getConfig(metadata) - assert.Equal(t, true, actual.DeregisterOnClose) + assert.True(t, actual.DeregisterOnClose) }, }, { @@ -1479,7 +1480,7 @@ func TestGetConfig(t *testing.T) { }, func(t *testing.T, metadata nr.Metadata) { _, err := getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), nr.AppID) metadata.Configuration = configSpec{ @@ -1487,7 +1488,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) metadata.Configuration = configSpec{ AdvancedRegistration: &consul.AgentServiceRegistration{}, @@ -1495,7 +1496,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) }, }, { @@ -1508,7 +1509,7 @@ func TestGetConfig(t *testing.T) { }, func(t *testing.T, metadata nr.Metadata) { _, err := getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), nr.AppPort) metadata.Configuration = configSpec{ @@ -1516,7 +1517,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) metadata.Configuration = configSpec{ AdvancedRegistration: &consul.AgentServiceRegistration{}, @@ -1524,7 +1525,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) }, }, { @@ -1537,7 +1538,7 @@ func TestGetConfig(t *testing.T) { }, func(t *testing.T, metadata nr.Metadata) { _, err := getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), "HOST_ADDRESS") metadata.Configuration = configSpec{ @@ -1545,7 +1546,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) metadata.Configuration = configSpec{ AdvancedRegistration: &consul.AgentServiceRegistration{}, @@ -1553,7 +1554,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) }, }, { @@ -1566,7 +1567,7 @@ func TestGetConfig(t *testing.T) { }, func(t *testing.T, metadata nr.Metadata) { _, err := getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), "DAPR_HTTP_PORT") metadata.Configuration = configSpec{ @@ -1574,7 +1575,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) metadata.Configuration = configSpec{ AdvancedRegistration: &consul.AgentServiceRegistration{}, @@ -1582,7 +1583,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.NoError(t, err) + require.NoError(t, err) }, }, { @@ -1596,7 +1597,7 @@ func TestGetConfig(t *testing.T) { } _, err := getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), "DAPR_PORT") metadata.Configuration = configSpec{ @@ -1604,7 +1605,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), "DAPR_PORT") metadata.Configuration = configSpec{ @@ -1613,7 +1614,7 @@ func TestGetConfig(t *testing.T) { } _, err = getConfig(metadata) - assert.Error(t, err) + require.Error(t, err) assert.Contains(t, err.Error(), "DAPR_PORT") }, }, @@ -1662,10 +1663,10 @@ func TestGetConfig(t *testing.T) { assert.Equal(t, "8650", actual.Registration.Meta["APP_PORT"]) assert.Equal(t, "50005", actual.Registration.Meta["DAPR_GRPC_PORT"]) assert.Equal(t, strconv.Itoa(metadata.Instance.DaprInternalPort), actual.Registration.Meta["PORT"]) - assert.Equal(t, false, actual.QueryOptions.UseCache) + assert.False(t, actual.QueryOptions.UseCache) assert.Equal(t, "Checks.ServiceTags contains something", actual.QueryOptions.Filter) assert.Equal(t, "PORT", actual.DaprPortMetaKey) - assert.Equal(t, false, actual.UseCache) + assert.False(t, actual.UseCache) }, }, { diff --git a/nameresolution/kubernetes/kubernetes_test.go b/nameresolution/kubernetes/kubernetes_test.go index 0f5fc2f938..334d0d5be6 100644 --- a/nameresolution/kubernetes/kubernetes_test.go +++ b/nameresolution/kubernetes/kubernetes_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/nameresolution" "github.com/dapr/kit/logger" @@ -30,7 +31,7 @@ func TestResolve(t *testing.T) { const expect = "myid-dapr.abc.svc.cluster.local:1234" target, err := resolver.ResolveID(context.Background(), request) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expect, target) } @@ -46,7 +47,7 @@ func TestResolveWithCustomClusterDomain(t *testing.T) { const expect = "myid-dapr.abc.svc.mydomain.com:1234" target, err := resolver.ResolveID(context.Background(), request) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expect, target) } @@ -62,8 +63,8 @@ func TestResolveWithTemplate(t *testing.T) { const expected = "myid-abc.internal:1234" target, err := resolver.ResolveID(context.Background(), request) - assert.NoError(t, err) - assert.Equal(t, target, expected) + require.NoError(t, err) + assert.Equal(t, expected, target) } func TestResolveWithTemplateAndData(t *testing.T) { @@ -85,6 +86,6 @@ func TestResolveWithTemplateAndData(t *testing.T) { const expected = "myid-myland.internal:1234" target, err := resolver.ResolveID(context.Background(), request) - assert.NoError(t, err) - assert.Equal(t, target, expected) + require.NoError(t, err) + assert.Equal(t, expected, target) } diff --git a/nameresolution/mdns/mdns_test.go b/nameresolution/mdns/mdns_test.go index 18b6a9b8da..bbd50ee921 100644 --- a/nameresolution/mdns/mdns_test.go +++ b/nameresolution/mdns/mdns_test.go @@ -80,7 +80,7 @@ func TestInitMetadata(t *testing.T) { err := resolver.Init(context.Background(), nr.Metadata{Instance: tt.instance}) // assert - assert.Error(t, err) + require.Error(t, err) }) } } @@ -309,7 +309,7 @@ func ResolverConcurrencySubsriberClear(t *testing.T) { // Wait long enough for the background clear to occur. time.Sleep(3 * time.Second) - require.Equal(t, 0, len(resolver.subs)) + require.Empty(t, resolver.subs) } // WARN: This is deliberately not a test function. @@ -739,6 +739,6 @@ func TestUnion(t *testing.T) { } } } - require.Equal(t, len(tt.expected), matches) + require.Len(t, tt.expected, matches) } } diff --git a/pubsub/aws/snssqs/snssqs_test.go b/pubsub/aws/snssqs/snssqs_test.go index 8954a5953c..2a6ca77a0d 100644 --- a/pubsub/aws/snssqs/snssqs_test.go +++ b/pubsub/aws/snssqs/snssqs_test.go @@ -109,9 +109,9 @@ func Test_getSnsSqsMetatdata_defaults(t *testing.T) { r.Equal(int64(10), md.MessageRetryLimit) r.Equal(int64(2), md.MessageWaitTimeSeconds) r.Equal(int64(10), md.MessageMaxNumber) - r.Equal(false, md.DisableEntityManagement) - r.Equal(float64(5), md.AssetsManagementTimeoutSeconds) - r.Equal(false, md.DisableDeleteOnRetryLimit) + r.False(md.DisableEntityManagement) + r.EqualValues(float64(5), md.AssetsManagementTimeoutSeconds) + r.False(md.DisableDeleteOnRetryLimit) } func Test_getSnsSqsMetatdata_legacyaliases(t *testing.T) { @@ -293,7 +293,7 @@ func Test_replaceNameToAWSSanitizedName(t *testing.T) { name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^` v := nameToAWSSanitizedName(s, false) - r.Equal(80, len(v)) + r.Len(v, 80) r.Equal("Some_invalid-nameforanAWSresourceSomeinvalidnameforanAWSresourceSomeinvalidnamef", v) } @@ -305,7 +305,7 @@ func Test_replaceNameToAWSSanitizedFifoName_Trimmed(t *testing.T) { name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^Some invalid name // for an AWS resource &*()*&&^` v := nameToAWSSanitizedName(s, true) - r.Equal(80, len(v)) + r.Len(v, 80) r.Equal("Some_invalid-nameforanAWSresourceSomeinvalidnameforanAWSresourceSomeinvalid.fifo", v) } @@ -315,7 +315,7 @@ func Test_replaceNameToAWSSanitizedFifoName_NonTrimmed(t *testing.T) { s := `012345678901234567890123456789012345678901234567890123456789012345678901234` v := nameToAWSSanitizedName(s, true) - r.Equal(80, len(v)) + r.Len(v, 80) r.Equal("012345678901234567890123456789012345678901234567890123456789012345678901234.fifo", v) } @@ -325,7 +325,7 @@ func Test_replaceNameToAWSSanitizedExistingFifoName_NonTrimmed(t *testing.T) { s := `012345678901234567890123456789012345678901234567890123456789012345678901234.fifo` v := nameToAWSSanitizedName(s, true) - r.Equal(80, len(v)) + r.Len(v, 80) r.Equal("012345678901234567890123456789012345678901234567890123456789012345678901234.fifo", v) } @@ -335,7 +335,7 @@ func Test_replaceNameToAWSSanitizedExistingFifoName_NonMax(t *testing.T) { s := `0123456789` v := nameToAWSSanitizedName(s, true) - r.Equal(len(s)+len(".fifo"), len(v)) + r.EqualValues(len(s)+len(".fifo"), len(v)) r.Equal("0123456789.fifo", v) } @@ -345,7 +345,7 @@ func Test_replaceNameToAWSSanitizedExistingFifoName_NoFifoSetting(t *testing.T) s := `012345678901234567890123456789012345678901234567890123456789012345678901234.fifo` v := nameToAWSSanitizedName(s, false) - r.Equal(79, len(v)) + r.Len(v, 79) r.Equal("012345678901234567890123456789012345678901234567890123456789012345678901234fifo", v) } @@ -355,7 +355,7 @@ func Test_replaceNameToAWSSanitizedExistingFifoName_Trimmed(t *testing.T) { s := `01234567890123456789012345678901234567890123456789012345678901234567890123456789.fifo` v := nameToAWSSanitizedName(s, true) - r.Equal(80, len(v)) + r.Len(v, 80) r.Equal("012345678901234567890123456789012345678901234567890123456789012345678901234.fifo", v) } @@ -371,7 +371,7 @@ func Test_tryInsertCondition(t *testing.T) { policy.tryInsertCondition(sqsArn, snsArn) } - r.Equal(len(policy.Statement), 4) + r.Len(policy.Statement, 4) insertedStatement := policy.Statement[0] r.Equal(insertedStatement.Resource, sqsArn) r.Equal(insertedStatement.Condition.ValueArnEquals.AwsSourceArn, snsArns[0]) @@ -414,10 +414,10 @@ func Test_policy_compatible(t *testing.T) { ` policy := &policy{Version: "2012-10-17"} err := json.Unmarshal([]byte(oldPolicy), policy) - r.Equal(err, nil) + r.NoError(err) policy.tryInsertCondition(sqsArn, snsArn) - r.Equal(len(policy.Statement), 1) + r.Len(policy.Statement, 1) insertedStatement := policy.Statement[0] r.Equal(insertedStatement.Resource, sqsArn) r.Equal(insertedStatement.Condition.ValueArnEquals.AwsSourceArn, snsArn) diff --git a/pubsub/azure/eventhubs/eventhubs_integration_test.go b/pubsub/azure/eventhubs/eventhubs_integration_test.go index fc913ab36e..be769c2f7c 100644 --- a/pubsub/azure/eventhubs/eventhubs_integration_test.go +++ b/pubsub/azure/eventhubs/eventhubs_integration_test.go @@ -25,6 +25,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/pubsub" @@ -70,14 +71,14 @@ func testReadIotHubEvents(t *testing.T) { logger.SetOutputLevel(kitLogger.DebugLevel) eh := NewAzureEventHubs(logger).(*AzureEventHubs) err := eh.Init(context.Background(), createIotHubPubsubMetadata()) - assert.NoError(t, err) + require.NoError(t, err) // Invoke az CLI via bash script to send test IoT device events // Requires the AZURE_CREDENTIALS environment variable to be already set (output of `az ad sp create-for-rbac`) cmd := exec.Command("/bin/bash", "../../../tests/scripts/send-iot-device-events.sh") cmd.Env = append(os.Environ(), fmt.Sprintf("IOT_HUB_NAME=%s", os.Getenv(iotHubNameEnvKey))) out, err := cmd.CombinedOutput() - assert.NoError(t, err, "Error in send-iot-device-events.sh:\n%s", string(out)) + require.NoError(t, err, "Error in send-iot-device-events.sh:\n%s", string(out)) // Setup subscription to capture messages in a closure so that test asserts can be // performed on the main thread, including the case where the handler is never invoked. @@ -94,7 +95,7 @@ func testReadIotHubEvents(t *testing.T) { }, } err = eh.Subscribe(context.Background(), req, handler) - assert.NoError(t, err) + require.NoError(t, err) // Note: azure-event-hubs-go SDK defaultLeasePersistenceInterval is 5s // Sleep long enough so that the azure event hubs SDK has time to persist updated checkpoints diff --git a/pubsub/concurrency_test.go b/pubsub/concurrency_test.go index cc52d56931..0852cd221f 100644 --- a/pubsub/concurrency_test.go +++ b/pubsub/concurrency_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestConcurrency(t *testing.T) { @@ -46,6 +47,6 @@ func TestConcurrency(t *testing.T) { c, err := Concurrency(m) assert.Empty(t, c) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/pubsub/envelope_test.go b/pubsub/envelope_test.go index 0d038a00f8..0904b24422 100644 --- a/pubsub/envelope_test.go +++ b/pubsub/envelope_test.go @@ -16,8 +16,8 @@ package pubsub import ( "encoding/base64" "encoding/json" - "fmt" "math" + "strconv" "strings" "testing" "time" @@ -25,6 +25,7 @@ import ( format "github.com/cloudevents/sdk-go/binding/format/protobuf/v2" "github.com/cloudevents/sdk-go/v2/event" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" contribContenttype "github.com/dapr/components-contrib/contenttype" ) @@ -220,7 +221,7 @@ func TestCreateCloudEventsEnvelopeExpiration(t *testing.T) { envelope := NewCloudEventsEnvelope("a", "", "", "", "routed.topic", "mypubsub", "", []byte(str), "", "") ApplyMetadata(envelope, nil, map[string]string{ - "ttlInSeconds": fmt.Sprintf("%v", math.MaxInt64), + "ttlInSeconds": strconv.Itoa(math.MaxInt64), }) assert.NotEqual(t, "", envelope[ExpirationField]) assert.False(t, HasExpired(envelope)) @@ -257,7 +258,7 @@ func TestNewFromExisting(t *testing.T) { b, _ := json.Marshal(&m) n, err := FromCloudEvent(b, "b", "pubsub", "1", "key=value") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "1.0", n[SpecVersionField]) assert.Equal(t, "a", n["customfield"]) assert.Equal(t, "b", n[TopicField]) @@ -271,7 +272,7 @@ func TestNewFromExisting(t *testing.T) { t.Run("invalid cloudevent", func(t *testing.T) { _, err := FromCloudEvent([]byte("a"), "1", "", "", "") - assert.Error(t, err) + require.Error(t, err) }) t.Run("valid cloudevent with text data", func(t *testing.T) { @@ -284,7 +285,7 @@ func TestNewFromExisting(t *testing.T) { b, _ := json.Marshal(&m) n, err := FromCloudEvent(b, "b", "pubsub", "1", "key=value") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "1.0", n[SpecVersionField]) assert.Equal(t, "a", n["customfield"]) assert.Equal(t, "b", n[TopicField]) @@ -305,7 +306,7 @@ func TestNewFromExisting(t *testing.T) { b, _ := json.Marshal(&m) n, err := FromCloudEvent(b, "b", "pubsub", "1", "key=value") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "1.0", n[SpecVersionField]) assert.Equal(t, "a", n["customfield"]) assert.Equal(t, "b", n[TopicField]) @@ -326,7 +327,7 @@ func TestNewFromExisting(t *testing.T) { b, _ := json.Marshal(&m) n, err := FromCloudEvent(b, "b", "pubsub", "1", "2") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "1", n[TraceIDField]) assert.Equal(t, "1", n[TraceParentField]) assert.Equal(t, "2", n[TraceStateField]) @@ -344,7 +345,7 @@ func TestNewFromExisting(t *testing.T) { b, _ := json.Marshal(&m) n, err := FromCloudEvent(b, "b", "pubsub", "", "") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "e", n[TraceIDField]) assert.Equal(t, "f", n[TraceStateField]) assert.Equal(t, "g", n[TraceParentField]) diff --git a/pubsub/gcp/pubsub/pubsub_test.go b/pubsub/gcp/pubsub/pubsub_test.go index dba64c4907..99b699f8b6 100644 --- a/pubsub/gcp/pubsub/pubsub_test.go +++ b/pubsub/gcp/pubsub/pubsub_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/pubsub" ) @@ -43,7 +44,7 @@ func TestInit(t *testing.T) { "enableMessageOrdering": "true", } b, err := createMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "https://authcerturl", b.AuthProviderCertURL) assert.Equal(t, "https://auth", b.AuthURI) @@ -55,7 +56,7 @@ func TestInit(t *testing.T) { assert.Equal(t, "project1", b.IdentityProjectID) assert.Equal(t, "https://token", b.TokenURI) assert.Equal(t, "serviceaccount", b.Type) - assert.Equal(t, true, b.EnableMessageOrdering) + assert.True(t, b.EnableMessageOrdering) }) t.Run("metadata is correct with implicit creds", func(t *testing.T) { @@ -65,7 +66,7 @@ func TestInit(t *testing.T) { } b, err := createMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "superproject", b.ProjectID) assert.Equal(t, "service_account", b.Type) @@ -75,7 +76,7 @@ func TestInit(t *testing.T) { m := pubsub.Metadata{} m.Properties = map[string]string{} _, err := createMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) t.Run("missing optional maxReconnectionAttempts", func(t *testing.T) { @@ -87,7 +88,7 @@ func TestInit(t *testing.T) { pubSubMetadata, err := createMetadata(m) assert.Equal(t, 30, pubSubMetadata.MaxReconnectionAttempts) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional maxReconnectionAttempts", func(t *testing.T) { @@ -99,8 +100,8 @@ func TestInit(t *testing.T) { _, err := createMetadata(m) - assert.Error(t, err) - assert.ErrorContains(t, err, "maxReconnectionAttempts") + require.Error(t, err) + require.ErrorContains(t, err, "maxReconnectionAttempts") }) t.Run("missing optional connectionRecoveryInSec", func(t *testing.T) { @@ -112,7 +113,7 @@ func TestInit(t *testing.T) { pubSubMetadata, err := createMetadata(m) assert.Equal(t, 2, pubSubMetadata.ConnectionRecoveryInSec) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("invalid optional connectionRecoveryInSec", func(t *testing.T) { @@ -124,7 +125,7 @@ func TestInit(t *testing.T) { _, err := createMetadata(m) - assert.Error(t, err) - assert.ErrorContains(t, err, "connectionRecoveryInSec") + require.Error(t, err) + require.ErrorContains(t, err, "connectionRecoveryInSec") }) } diff --git a/pubsub/jetstream/jetstream_test.go b/pubsub/jetstream/jetstream_test.go index b6c4654106..82f9c10258 100644 --- a/pubsub/jetstream/jetstream_test.go +++ b/pubsub/jetstream/jetstream_test.go @@ -21,6 +21,7 @@ import ( "github.com/nats-io/nats-server/v2/server" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" mdata "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/pubsub" @@ -35,23 +36,23 @@ func setupServerAndStream(t *testing.T) (*server.Server, *nats.Conn) { JetStream: true, StoreDir: t.TempDir(), }) - assert.NoError(t, err) + require.NoError(t, err) go ns.Start() ns.ReadyForConnections(time.Second) // Create the stream for the test. nc, err := nats.Connect(ns.ClientURL()) - assert.NoError(t, err) + require.NoError(t, err) js, err := nc.JetStream() - assert.NoError(t, err) + require.NoError(t, err) _, err = js.AddStream(&nats.StreamConfig{ Name: "test", Subjects: []string{"test"}, Storage: nats.MemoryStorage, }) - assert.NoError(t, err) + require.NoError(t, err) return ns, nc } @@ -71,7 +72,7 @@ func TestNewJetStream_EmphemeralPushConsumer(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) ctx := context.Background() ch := make(chan []byte, 1) @@ -80,7 +81,7 @@ func TestNewJetStream_EmphemeralPushConsumer(t *testing.T) { ch <- msg.Data return nil }) - assert.NoError(t, err) + require.NoError(t, err) // Use minimal cloud event payload with `id` for NATS de-dupe. payload := []byte(`{"id": "ABCD", "data": "test"}`) @@ -88,7 +89,7 @@ func TestNewJetStream_EmphemeralPushConsumer(t *testing.T) { Data: payload, Topic: "test", }) - assert.NoError(t, err) + require.NoError(t, err) // Ensure the output is received. select { @@ -116,7 +117,7 @@ func TestNewJetStream_DurableQueuePushConsumer(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) ctx := context.Background() ch := make(chan []byte, 2) @@ -127,19 +128,19 @@ func TestNewJetStream_DurableQueuePushConsumer(t *testing.T) { ch <- msg.Data return nil }) - assert.NoError(t, err) + require.NoError(t, err) err = bus.Subscribe(ctx, pubsub.SubscribeRequest{Topic: "test"}, func(ctx context.Context, msg *pubsub.NewMessage) error { ch <- msg.Data return nil }) - assert.NoError(t, err) + require.NoError(t, err) js, _ := nc.JetStream() ci, err := js.ConsumerInfo("test", "test") - assert.NoError(t, err) - assert.Equal(t, ci.Config.Durable, "test") - assert.Equal(t, ci.Config.DeliverGroup, "test") + require.NoError(t, err) + assert.Equal(t, "test", ci.Config.Durable) + assert.Equal(t, "test", ci.Config.DeliverGroup) // Use minimal cloud event payload with `id` for NATS de-dupe. payload := []byte(`{"id": "ABCD-1", "data": "test"}`) @@ -147,7 +148,7 @@ func TestNewJetStream_DurableQueuePushConsumer(t *testing.T) { Data: payload, Topic: "test", }) - assert.NoError(t, err) + require.NoError(t, err) // Ensure the output is received. select { diff --git a/pubsub/kubemq/kubemq.go b/pubsub/kubemq/kubemq.go index 164a9f2a58..1007d04bac 100644 --- a/pubsub/kubemq/kubemq.go +++ b/pubsub/kubemq/kubemq.go @@ -2,8 +2,8 @@ package kubemq import ( "context" - "fmt" "reflect" + "strconv" "time" "github.com/google/uuid" @@ -73,7 +73,7 @@ func (k *kubeMQ) Close() error { func getRandomID() string { randomUUID, err := uuid.NewRandom() if err != nil { - return fmt.Sprintf("%d", time.Now().UnixNano()) + return strconv.FormatInt(time.Now().UnixNano(), 10) } return randomUUID.String() } diff --git a/pubsub/kubemq/kubemq_events_test.go b/pubsub/kubemq/kubemq_events_test.go index e2f40885fd..57cdc79db3 100644 --- a/pubsub/kubemq/kubemq_events_test.go +++ b/pubsub/kubemq/kubemq_events_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/kubemq-io/kubemq-go" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/pubsub" "github.com/dapr/kit/logger" @@ -138,9 +138,9 @@ func Test_kubeMQEvents_Publish(t *testing.T) { _ = k.setPublishStream() err := k.Publish(tt.req) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) } _ = k.Features() _ = k.Close() @@ -195,9 +195,9 @@ func Test_kubeMQEvents_Subscribe(t *testing.T) { } err := k.Subscribe(k.ctx, pubsub.SubscribeRequest{Topic: "some-topic"}, tt.subscribeHandler) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) } _ = k.Features() _ = k.Close() diff --git a/pubsub/kubemq/kubemq_eventstore_test.go b/pubsub/kubemq/kubemq_eventstore_test.go index bb2433d958..e4d3bd1bca 100644 --- a/pubsub/kubemq/kubemq_eventstore_test.go +++ b/pubsub/kubemq/kubemq_eventstore_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/kubemq-io/kubemq-go" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/pubsub" "github.com/dapr/kit/logger" @@ -161,9 +161,9 @@ func Test_kubeMQEventsStore_Publish(t *testing.T) { _ = k.setPublishStream() err := k.Publish(tt.req) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) } _ = k.Features() _ = k.Close() @@ -218,9 +218,9 @@ func Test_kubeMQkubeMQEventsStore_Subscribe(t *testing.T) { } err := k.Subscribe(k.ctx, pubsub.SubscribeRequest{Topic: "some-topic"}, tt.subscribeHandler) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) } _ = k.Features() _ = k.Close() diff --git a/pubsub/kubemq/metadata_test.go b/pubsub/kubemq/metadata_test.go index c0492021f1..8aebcfe9fe 100644 --- a/pubsub/kubemq/metadata_test.go +++ b/pubsub/kubemq/metadata_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" mdata "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/pubsub" @@ -149,9 +150,9 @@ func Test_createMetadata(t *testing.T) { t.Run(tt.name, func(t *testing.T) { got, err := createMetadata(tt.meta) if tt.wantErr { - assert.Error(t, err) + require.Error(t, err) } else { - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, tt.want, got) } }) diff --git a/pubsub/mqtt3/mqtt_test.go b/pubsub/mqtt3/mqtt_test.go index def979481a..8ff928014f 100644 --- a/pubsub/mqtt3/mqtt_test.go +++ b/pubsub/mqtt3/mqtt_test.go @@ -226,11 +226,11 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[mqttURL], m.URL) assert.Equal(t, byte(1), m.Qos) - assert.Equal(t, true, m.Retain) - assert.Equal(t, false, m.CleanSession) + assert.True(t, m.Retain) + assert.False(t, m.CleanSession) }) t.Run("missing consumerID", func(t *testing.T) { @@ -254,7 +254,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.ErrorContains(t, err, "missing url") + require.ErrorContains(t, err, "missing url") assert.Equal(t, fakeProperties[mqttURL], m.URL) }) @@ -273,7 +273,7 @@ func TestParseMetadata(t *testing.T) { require.NoError(t, err) assert.Equal(t, fakeProperties[mqttURL], m.URL) assert.Equal(t, byte(1), m.Qos) - assert.Equal(t, false, m.Retain) + assert.False(t, m.Retain) }) t.Run("invalid ca certificate", func(t *testing.T) { @@ -293,7 +293,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.TLSProperties.CACert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -319,7 +319,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.TLSProperties.ClientCert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -345,7 +345,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseMQTTMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, m.TLSProperties.ClientKey, "failed to parse valid client certificate key") }) } diff --git a/pubsub/pulsar/key_reader_test.go b/pubsub/pulsar/key_reader_test.go index c0daff0b54..395d9050a7 100644 --- a/pubsub/pulsar/key_reader_test.go +++ b/pubsub/pulsar/key_reader_test.go @@ -17,15 +17,16 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestDataKeyReader(t *testing.T) { kr := NewDataKeyReader("111", "222") pk, err := kr.PublicKey("1", map[string]string{}) - assert.Nil(t, err) + require.NoError(t, err) pr, err := kr.PrivateKey("2", map[string]string{}) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, pk) assert.NotNil(t, pr) diff --git a/pubsub/pulsar/pulsar_test.go b/pubsub/pulsar/pulsar_test.go index 7a9cacd2bc..9dada153a0 100644 --- a/pubsub/pulsar/pulsar_test.go +++ b/pubsub/pulsar/pulsar_test.go @@ -19,6 +19,7 @@ import ( "github.com/apache/pulsar-client-go/pulsar" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/pubsub" ) @@ -35,10 +36,10 @@ func TestParsePulsarMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) - assert.Equal(t, false, meta.EnableTLS) - assert.Equal(t, true, meta.DisableBatching) + assert.False(t, meta.EnableTLS) + assert.True(t, meta.DisableBatching) assert.Equal(t, defaultTenant, meta.Tenant) assert.Equal(t, defaultNamespace, meta.Namespace) assert.Equal(t, 5*time.Second, meta.BatchingMaxPublishDelay) @@ -57,7 +58,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 2) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value) @@ -73,7 +74,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 2) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value) @@ -89,7 +90,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 2) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value) @@ -105,7 +106,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 2) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value) @@ -124,7 +125,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 3) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan"].value) @@ -143,7 +144,7 @@ func TestParsePulsarSchemaMetadata(t *testing.T) { } meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "a", meta.Host) assert.Len(t, meta.internalTopicSchemas, 1) assert.Equal(t, "1", meta.internalTopicSchemas["obiwan.jsonschema"].value) @@ -177,7 +178,7 @@ func TestParsePublishMetadata(t *testing.T) { "deliverAfter": "60s", } msg, err := parsePublishMetadata(m, schemaMetadata{}) - assert.Nil(t, err) + require.NoError(t, err) val, _ := time.ParseDuration("60s") assert.Equal(t, val, msg.DeliverAfter) @@ -190,7 +191,7 @@ func TestMissingHost(t *testing.T) { m.Properties = map[string]string{"host": ""} meta, err := parsePulsarMetadata(m) - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, meta) assert.Equal(t, "pulsar error: missing pulsar host", err.Error()) } @@ -200,7 +201,7 @@ func TestInvalidTLSInputDefaultsToFalse(t *testing.T) { m.Properties = map[string]string{"host": "a", "enableTLS": "honk"} meta, err := parsePulsarMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, meta) assert.False(t, meta.EnableTLS) } @@ -219,7 +220,7 @@ func TestValidTenantAndNS(t *testing.T) { t.Run("test vaild tenant and namespace", func(t *testing.T) { meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, testTenant, meta.Tenant) assert.Equal(t, testNamespace, meta.Namespace) }) @@ -229,8 +230,8 @@ func TestValidTenantAndNS(t *testing.T) { p := Pulsar{metadata: *meta} res := p.formatTopic(testTopic) - assert.Nil(t, err) - assert.Equal(t, true, meta.Persistent) + require.NoError(t, err) + assert.True(t, meta.Persistent) assert.Equal(t, expectPersistentResult, res) }) @@ -240,8 +241,8 @@ func TestValidTenantAndNS(t *testing.T) { p := Pulsar{metadata: *meta} res := p.formatTopic(testTopic) - assert.Nil(t, err) - assert.Equal(t, false, meta.Persistent) + require.NoError(t, err) + assert.False(t, meta.Persistent) assert.Equal(t, expectNonPersistentResult, res) }) } @@ -253,7 +254,7 @@ func TestEncryptionKeys(t *testing.T) { t.Run("test encryption metadata", func(t *testing.T) { meta, err := parsePulsarMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "111", meta.PrivateKey) assert.Equal(t, "222", meta.PublicKey) assert.Equal(t, "a,b", meta.Keys) diff --git a/pubsub/rabbitmq/metadata_test.go b/pubsub/rabbitmq/metadata_test.go index b40e1ead44..435babeff4 100644 --- a/pubsub/rabbitmq/metadata_test.go +++ b/pubsub/rabbitmq/metadata_test.go @@ -23,6 +23,7 @@ import ( amqp "github.com/rabbitmq/amqp091-go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" mdata "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/pubsub" @@ -77,18 +78,18 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataConnectionStringKey], m.ConnectionString) assert.Equal(t, fakeProperties[metadataProtocolKey], m.internalProtocol) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataUsernameKey], m.Username) assert.Equal(t, fakeProperties[metadataPasswordKey], m.Password) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) - assert.Equal(t, false, m.AutoAck) - assert.Equal(t, false, m.RequeueInFailure) - assert.Equal(t, true, m.DeleteWhenUnused) - assert.Equal(t, false, m.EnableDeadLetter) - assert.Equal(t, false, m.PublisherConfirm) + assert.False(t, m.AutoAck) + assert.False(t, m.RequeueInFailure) + assert.True(t, m.DeleteWhenUnused) + assert.False(t, m.EnableDeadLetter) + assert.False(t, m.PublisherConfirm) assert.Equal(t, uint8(0), m.DeliveryMode) assert.Equal(t, uint8(0), m.PrefetchCount) assert.Equal(t, int64(0), m.MaxLen) @@ -97,7 +98,7 @@ func TestCreateMetadata(t *testing.T) { assert.Equal(t, "", m.ClientCert) assert.Equal(t, "", m.CACert) assert.Equal(t, fanoutExchangeKind, m.ExchangeKind) - assert.Equal(t, true, m.Durable) + assert.True(t, m.Durable) }) invalidDeliveryModes := []string{"3", "10", "-1"} @@ -136,7 +137,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, uint8(2), m.DeliveryMode) @@ -154,7 +155,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, "fakeclientname", m.ClientName) @@ -172,7 +173,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, time.Minute, m.HeartBeat) @@ -191,7 +192,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.False(t, m.Durable) @@ -210,9 +211,8 @@ func TestCreateMetadata(t *testing.T) { _, err := createMetadata(fakeMetaData, log) // assert - if assert.Error(t, err) { - assert.Equal(t, err.Error(), fmt.Sprintf("%s protocol does not match connection string, protocol: %s, connection string: %s", errorMessagePrefix, fakeMetaData.Properties[metadataProtocolKey], fakeMetaData.Properties[metadataConnectionStringKey])) - } + require.Error(t, err) + assert.Equal(t, err.Error(), fmt.Sprintf("%s protocol does not match connection string, protocol: %s, connection string: %s", errorMessagePrefix, fakeMetaData.Properties[metadataProtocolKey], fakeMetaData.Properties[metadataConnectionStringKey])) }) t.Run("connection string is empty, protocol is not empty", func(t *testing.T) { @@ -228,7 +228,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataProtocolKey], m.internalProtocol) }) @@ -244,7 +244,7 @@ func TestCreateMetadata(t *testing.T) { _, err := createMetadata(fakeMetaData, log) // assert - assert.Error(t, err) + require.Error(t, err) }) t.Run("prefetchCount is set", func(t *testing.T) { @@ -259,7 +259,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, uint8(1), m.PrefetchCount) @@ -279,7 +279,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, m.TLSProperties.ClientKey, "failed to parse valid client certificate key") block, _ := pem.Decode([]byte(m.TLSProperties.ClientCert)) cert, err := x509.ParseCertificate(block.Bytes) @@ -309,7 +309,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, int64(1), m.MaxLen) @@ -329,7 +329,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.AutoAck) @@ -349,7 +349,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.RequeueInFailure) @@ -369,7 +369,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.DeleteWhenUnused) @@ -389,7 +389,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.Durable) @@ -409,7 +409,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.PublisherConfirm) @@ -429,7 +429,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, tt.expected, m.EnableDeadLetter) @@ -450,7 +450,7 @@ func TestCreateMetadata(t *testing.T) { m, err := createMetadata(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[metadataHostnameKey], m.Hostname) assert.Equal(t, fakeProperties[metadataConsumerIDKey], m.ConsumerID) assert.Equal(t, exchangeKind, m.ExchangeKind) @@ -469,7 +469,7 @@ func TestCreateMetadata(t *testing.T) { _, err := createMetadata(fakeMetaData, log) // assert - assert.Error(t, err) + require.Error(t, err) }) } @@ -531,7 +531,7 @@ func TestConnectionURI(t *testing.T) { m, err := createMetadata(metadata, log) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testCase.expectedOutput, m.connectionURI()) } } diff --git a/pubsub/rabbitmq/rabbitmq_test.go b/pubsub/rabbitmq/rabbitmq_test.go index a0e6072cd8..d514b7e6f8 100644 --- a/pubsub/rabbitmq/rabbitmq_test.go +++ b/pubsub/rabbitmq/rabbitmq_test.go @@ -57,7 +57,7 @@ func TestNoConsumerOrQueueName(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{}, nil) assert.Contains(t, err.Error(), "consumerID is required for subscriptions that don't specify a queue name") } @@ -72,7 +72,7 @@ func TestPublishAndSubscribeWithPriorityQueue(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -90,42 +90,42 @@ func TestPublishAndSubscribeWithPriorityQueue(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic, Metadata: map[string]string{metadataMaxPriority: "5"}}, handler) - assert.Nil(t, err) + require.NoError(t, err) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hello world"), Metadata: map[string]string{metadataMaxPriority: "5"}}) - assert.Nil(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) // subscribe using classic queue type err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic, Metadata: map[string]string{reqMetadataQueueTypeKey: "classic"}}, handler) - assert.NoError(t, err) + require.NoError(t, err) // publish using classic queue type err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hey there"), Metadata: map[string]string{reqMetadataQueueTypeKey: "classic"}}) - assert.NoError(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 2, messageCount) assert.Equal(t, "hey there", lastMessage) // subscribe using quorum queue type err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic, Metadata: map[string]string{reqMetadataQueueTypeKey: "quorum"}}, handler) - assert.NoError(t, err) + require.NoError(t, err) // publish using quorum queue type err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hello friends"), Metadata: map[string]string{reqMetadataQueueTypeKey: "quorum"}}) - assert.NoError(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 3, messageCount) assert.Equal(t, "hello friends", lastMessage) // trying to subscribe using invalid queue type err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic, Metadata: map[string]string{reqMetadataQueueTypeKey: "invalid"}}, handler) - assert.Error(t, err) + require.Error(t, err) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("foo bar")}) - assert.NoError(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 4, messageCount) assert.Equal(t, "foo bar", lastMessage) @@ -143,7 +143,7 @@ func TestConcurrencyMode(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, pubsub.Parallel, pubsubRabbitMQ.metadata.Concurrency) }) @@ -158,7 +158,7 @@ func TestConcurrencyMode(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, pubsub.Single, pubsubRabbitMQ.metadata.Concurrency) }) @@ -172,7 +172,7 @@ func TestConcurrencyMode(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, pubsub.Parallel, pubsubRabbitMQ.metadata.Concurrency) }) } @@ -226,7 +226,7 @@ func TestPublishAndSubscribe(t *testing.T) { Properties: test.componentMetadata, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -241,18 +241,18 @@ func TestPublishAndSubscribe(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: test.topic, Metadata: test.subscribeMetadata}, handler) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, pubsubRabbitMQ.declaredExchanges[test.topic]) assert.ElementsMatch(t, test.declaredQueues, broker.declaredQueues) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: test.topic, Data: []byte("hello world")}) - assert.NoError(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: test.topic, Data: []byte("foo bar")}) - assert.NoError(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 2, messageCount) assert.Equal(t, "foo bar", lastMessage) @@ -270,7 +270,7 @@ func TestPublishReconnect(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -288,16 +288,16 @@ func TestPublishReconnect(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic}, handler) - assert.Nil(t, err) + require.NoError(t, err) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hello world")}) - assert.Nil(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte(errorChannelConnection)}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) // Check that reconnection happened @@ -305,7 +305,7 @@ func TestPublishReconnect(t *testing.T) { assert.Equal(t, int32(4), broker.closeCount.Load()) // four counts - one for connection, one for channel , times 2 reconnect attempts err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("foo bar")}) - assert.Nil(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 2, messageCount) assert.Equal(t, "foo bar", lastMessage) @@ -321,7 +321,7 @@ func TestPublishReconnectAfterClose(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -339,21 +339,21 @@ func TestPublishReconnectAfterClose(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic}, handler) - assert.Nil(t, err) + require.NoError(t, err) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hello world")}) - assert.Nil(t, err) + require.NoError(t, err) <-processed assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) // Close PubSub err = pubsubRabbitMQ.Close() - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(2), broker.closeCount.Load()) // two counts - one for connection, one for channel err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte(errorChannelConnection)}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, 1, messageCount) assert.Equal(t, "hello world", lastMessage) // Check that reconnection did not happened @@ -371,7 +371,7 @@ func TestSubscribeBindRoutingKeys(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -382,7 +382,7 @@ func TestSubscribeBindRoutingKeys(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic, Metadata: map[string]string{"routingKey": "keya,keyb,"}}, handler) - assert.Nil(t, err) + require.NoError(t, err) } func TestSubscribeReconnect(t *testing.T) { @@ -398,7 +398,7 @@ func TestSubscribeReconnect(t *testing.T) { }, }} err := pubsubRabbitMQ.Init(context.Background(), metadata) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, int32(1), broker.connectCount.Load()) assert.Equal(t, int32(0), broker.closeCount.Load()) @@ -416,10 +416,10 @@ func TestSubscribeReconnect(t *testing.T) { } err = pubsubRabbitMQ.Subscribe(context.Background(), pubsub.SubscribeRequest{Topic: topic}, handler) - assert.Nil(t, err) + require.NoError(t, err) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("hello world")}) - assert.Nil(t, err) + require.NoError(t, err) select { case <-processed: case <-time.After(5 * time.Second): @@ -429,7 +429,7 @@ func TestSubscribeReconnect(t *testing.T) { assert.Equal(t, "hello world", lastMessage) err = pubsubRabbitMQ.Publish(context.Background(), &pubsub.PublishRequest{Topic: topic, Data: []byte("foo bar")}) - assert.Nil(t, err) + require.NoError(t, err) select { case <-processed: case <-time.After(5 * time.Second): diff --git a/pubsub/redis/redis_test.go b/pubsub/redis/redis_test.go index a53fa2ceab..6c30754062 100644 --- a/pubsub/redis/redis_test.go +++ b/pubsub/redis/redis_test.go @@ -16,11 +16,12 @@ package redis import ( "context" "errors" - "fmt" + "strconv" "sync" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" commonredis "github.com/dapr/components-contrib/common/component/redis" mdata "github.com/dapr/components-contrib/metadata" @@ -50,26 +51,27 @@ func TestParseRedisMetadata(t *testing.T) { err := kitmd.DecodeMetadata(fakeMetaData, &m) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[consumerID], m.ConsumerID) assert.Equal(t, int64(1000), m.MaxLenApprox) }) - t.Run("consumerID is not given", func(t *testing.T) { - fakeProperties := getFakeProperties() - - fakeMetaData := pubsub.Metadata{ - Base: mdata.Base{Properties: fakeProperties}, - } - fakeMetaData.Properties[consumerID] = "" - - // act - m := commonredis.Settings{} - err := kitmd.DecodeMetadata(fakeMetaData, &m) - // assert - assert.Error(t, errors.New("redis streams error: missing consumerID"), err) - assert.Empty(t, m.ConsumerID) - }) + // TODO: fix the code to return the error for the missing property to make this test work + // t.Run("consumerID is not given", func(t *testing.T) { + // fakeProperties := getFakeProperties() + + // fakeMetaData := pubsub.Metadata{ + // Base: mdata.Base{Properties: fakeProperties}, + // } + // fakeMetaData.Properties[consumerID] = "" + + // // act + // m := commonredis.Settings{} + // err := kitmd.DecodeMetadata(fakeMetaData, &m) + // // assert + // require.ErrorIs(t, err, errors.New("redis streams error: missing consumerID")) + // assert.Empty(t, m.ConsumerID) + // }) } func TestProcessStreams(t *testing.T) { @@ -116,7 +118,7 @@ func TestProcessStreams(t *testing.T) { func generateRedisStreamTestData(topicCount, messageCount int, data string) []commonredis.RedisXMessage { generateXMessage := func(id int) commonredis.RedisXMessage { return commonredis.RedisXMessage{ - ID: fmt.Sprintf("%d", id), + ID: strconv.Itoa(id), Values: map[string]interface{}{ "data": data, }, diff --git a/pubsub/responses_test.go b/pubsub/responses_test.go index 7f07008065..d3aca3277b 100644 --- a/pubsub/responses_test.go +++ b/pubsub/responses_test.go @@ -41,7 +41,7 @@ func TestNewBulkPublishResponse(t *testing.T) { t.Run("populate failure", func(t *testing.T) { res := NewBulkPublishResponse(messages, assert.AnError) assert.NotEmpty(t, res, "expected res to be populated") - assert.Equal(t, 2, len(res.FailedEntries), "expected two statuses") + assert.Len(t, res.FailedEntries, 2, "expected two statuses") expectedRes := BulkPublishResponse{ FailedEntries: []BulkPublishResponseFailedEntry{ { diff --git a/pubsub/rocketmq/rocketmq_test.go b/pubsub/rocketmq/rocketmq_test.go index cdeea4e5aa..48c7d6fd91 100644 --- a/pubsub/rocketmq/rocketmq_test.go +++ b/pubsub/rocketmq/rocketmq_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" mdata "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/pubsub" @@ -42,19 +42,19 @@ func getTestMetadata() map[string]string { func TestParseRocketMQMetadata(t *testing.T) { meta := getTestMetadata() _, err := parseRocketMQMetaData(pubsub.Metadata{Base: mdata.Base{Properties: meta}}) - assert.Nil(t, err) + require.NoError(t, err) } func TestRocketMQ_Init(t *testing.T) { meta := getTestMetadata() r := NewRocketMQ(logger.NewLogger("test")) err := r.Init(context.Background(), pubsub.Metadata{Base: mdata.Base{Properties: meta}}) - assert.Nil(t, err) + require.NoError(t, err) } func TestRocketMQ_Publish_Currently(t *testing.T) { l, r, e := BuildRocketMQ() - assert.Nil(t, e) + require.NoError(t, e) req := &pubsub.PublishRequest{ Data: []byte("{\"key\": 1, \"value\": \"1\"}"), @@ -67,7 +67,7 @@ func TestRocketMQ_Publish_Currently(t *testing.T) { l.Error(e) return } - assert.Nil(t, e) + require.NoError(t, e) req = &pubsub.PublishRequest{ Data: []byte("{\"key\": 2, \"value\": \"2\"}"), @@ -81,7 +81,7 @@ func TestRocketMQ_Publish_Currently(t *testing.T) { }, } e = r.Publish(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) req = &pubsub.PublishRequest{ Data: []byte("{\"key\": 3, \"value\": \"3\"}"), @@ -94,7 +94,7 @@ func TestRocketMQ_Publish_Currently(t *testing.T) { }, } e = r.Publish(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) req = &pubsub.PublishRequest{ Data: []byte("{\"key\": 4, \"value\": \"4\"}"), @@ -107,15 +107,15 @@ func TestRocketMQ_Publish_Currently(t *testing.T) { }, } e = r.Publish(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) time.Sleep(time.Second) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func TestRocketMQ_Publish_Orderly(t *testing.T) { l, r, e := BuildRocketMQ() - assert.Nil(t, e) + require.NoError(t, e) req := &pubsub.PublishRequest{ Data: []byte("{\"key\": 1, \"value\": \"1\", \"sKey\": \"sKeyHello\"}"), @@ -133,7 +133,7 @@ func TestRocketMQ_Publish_Orderly(t *testing.T) { l.Error(e) return } - assert.Nil(t, e) + require.NoError(t, e) req = &pubsub.PublishRequest{ Data: []byte("{\"key\": 2, \"value\": \"2\", \"sKey\": \"sKeyHello\"}"), @@ -147,7 +147,7 @@ func TestRocketMQ_Publish_Orderly(t *testing.T) { }, } e = r.Publish(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) req = &pubsub.PublishRequest{ Data: []byte("{\"key\": 3, \"value\": \"3\", \"sKey\": \"sKeyHello\"}"), @@ -160,14 +160,14 @@ func TestRocketMQ_Publish_Orderly(t *testing.T) { }, } e = r.Publish(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) time.Sleep(2 * time.Second) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func TestRocketMQ_Subscribe_Currently(t *testing.T) { l, r, e := BuildRocketMQ() - assert.Nil(t, e) + require.NoError(t, e) req := pubsub.SubscribeRequest{ Topic: "ZCY_ZHIXING_TEST_test", @@ -181,14 +181,14 @@ func TestRocketMQ_Subscribe_Currently(t *testing.T) { l.Error(e) return } - assert.Nil(t, e) + require.NoError(t, e) time.Sleep(2 * time.Second) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func TestRocketMQ_Subscribe_Orderly(t *testing.T) { l, r, e := BuildRocketMQ() - assert.Nil(t, e) + require.NoError(t, e) handler := func(ctx context.Context, msg *pubsub.NewMessage) error { l.Info(msg.Topic, string(msg.Data)) @@ -206,7 +206,7 @@ func TestRocketMQ_Subscribe_Orderly(t *testing.T) { l.Error(e) return } - assert.Nil(t, e) + require.NoError(t, e) req = pubsub.SubscribeRequest{ Topic: "ZCY_ZHIXING_TEST_test", @@ -216,9 +216,9 @@ func TestRocketMQ_Subscribe_Orderly(t *testing.T) { }, } e = r.Subscribe(context.Background(), req, handler) - assert.Nil(t, e) + require.NoError(t, e) time.Sleep(2 * time.Second) - assert.NoError(t, r.Close()) + require.NoError(t, r.Close()) } func BuildRocketMQ() (logger.Logger, pubsub.PubSub, error) { diff --git a/pubsub/solace/amqp/amqp_test.go b/pubsub/solace/amqp/amqp_test.go index 610523d349..2c7a3b84bf 100644 --- a/pubsub/solace/amqp/amqp_test.go +++ b/pubsub/solace/amqp/amqp_test.go @@ -25,6 +25,7 @@ import ( "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func getFakeProperties() map[string]string { @@ -47,7 +48,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseAMQPMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fakeProperties[amqpURL], m.URL) }) @@ -62,7 +63,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseAMQPMetaData(fakeMetaData, log) // assert - assert.EqualError(t, err, errors.New(errorMsgPrefix+" missing url").Error()) + require.EqualError(t, err, errors.New(errorMsgPrefix+" missing url").Error()) assert.Equal(t, fakeProperties[amqpURL], m.URL) }) @@ -83,7 +84,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseAMQPMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.tlsCfg.CaCert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -109,7 +110,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseAMQPMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) block, _ := pem.Decode([]byte(m.tlsCfg.ClientCert)) cert, err := x509.ParseCertificate(block.Bytes) if err != nil { @@ -135,7 +136,7 @@ func TestParseMetadata(t *testing.T) { m, err := parseAMQPMetaData(fakeMetaData, log) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, m.tlsCfg.ClientKey, "failed to parse valid client certificate key") }) } diff --git a/pubsub/tls_test.go b/pubsub/tls_test.go index fab646be42..7ec212ecd6 100644 --- a/pubsub/tls_test.go +++ b/pubsub/tls_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestConvertTLSPropertiesToTLSConfig(t *testing.T) { @@ -19,8 +20,8 @@ func TestConvertTLSPropertiesToTLSConfig(t *testing.T) { c, err := ConvertTLSPropertiesToTLSConfig(fakeProperties) // assert - assert.NoError(t, err) - assert.Equal(t, len(c.Certificates), 1) + require.NoError(t, err) + assert.Len(t, c.Certificates, 1) assert.NotNil(t, c.RootCAs) }) @@ -31,8 +32,8 @@ func TestConvertTLSPropertiesToTLSConfig(t *testing.T) { c, err := ConvertTLSPropertiesToTLSConfig(fakeProperties) // assert - assert.NoError(t, err) - assert.Equal(t, len(c.Certificates), 0) + require.NoError(t, err) + assert.Empty(t, c.Certificates) assert.Nil(t, c.RootCAs) }) @@ -71,7 +72,7 @@ func TestTLS(t *testing.T) { p, err := TLS(fakeProperties) // assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, p.ClientKey, "failed to parse valid client certificate key") block, _ := pem.Decode([]byte(p.ClientCert)) cert, err := x509.ParseCertificate(block.Bytes) diff --git a/secretstores/alicloud/parameterstore/parameterstore_test.go b/secretstores/alicloud/parameterstore/parameterstore_test.go index a4da720324..530dc5965c 100644 --- a/secretstores/alicloud/parameterstore/parameterstore_test.go +++ b/secretstores/alicloud/parameterstore/parameterstore_test.go @@ -22,6 +22,7 @@ import ( util "github.com/alibabacloud-go/tea-utils/service" "github.com/alibabacloud-go/tea/tea" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" @@ -78,7 +79,7 @@ func TestInit(t *testing.T) { "accessKeySecret": "a", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Init without regionId", func(t *testing.T) { @@ -87,7 +88,7 @@ func TestInit(t *testing.T) { "accessKeySecret": "a", } err := s.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -103,7 +104,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, output.Data[req.Name]) }) @@ -119,7 +120,7 @@ func TestGetSecret(t *testing.T) { }, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, output.Data[req.Name]) }) }) @@ -137,7 +138,7 @@ func TestGetSecret(t *testing.T) { }, } _, e := s.GetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) t.Run("with parameter store retrieve error", func(t *testing.T) { @@ -150,7 +151,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } _, e := s.GetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) }) } @@ -166,7 +167,7 @@ func TestBulkGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Contains(t, output.Data, secretName) }) @@ -181,7 +182,7 @@ func TestBulkGetSecret(t *testing.T) { }, } output, e := s.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Contains(t, output.Data, secretName) }) }) @@ -196,7 +197,7 @@ func TestBulkGetSecret(t *testing.T) { Metadata: map[string]string{}, } _, e := s.BulkGetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) }) } diff --git a/secretstores/aws/parameterstore/parameterstore_integ_test.go b/secretstores/aws/parameterstore/parameterstore_integ_test.go index 178b346384..fd0a3a9b2e 100644 --- a/secretstores/aws/parameterstore/parameterstore_integ_test.go +++ b/secretstores/aws/parameterstore/parameterstore_integ_test.go @@ -23,6 +23,7 @@ import ( "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // TestIntegrationGetSecret requires AWS specific environments for authentication AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID, @@ -38,12 +39,12 @@ func TestIntegrationGetSecret(t *testing.T) { "SessionToken": os.Getenv("AWS_SESSION_TOKEN"), }, }) - assert.Nil(t, err) + require.NoError(t, err) response, err := sm.GetSecret(secretstores.GetSecretRequest{ Name: secretName, Metadata: map[string]string{}, }) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, response) } @@ -57,8 +58,8 @@ func TestIntegrationBulkGetSecret(t *testing.T) { "SessionToken": os.Getenv("AWS_SESSION_TOKEN"), }, }) - assert.Nil(t, err) + require.NoError(t, err) response, err := sm.BulkGetSecret(secretstores.BulkGetSecretRequest{}) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, response) } diff --git a/secretstores/aws/parameterstore/parameterstore_test.go b/secretstores/aws/parameterstore/parameterstore_test.go index 571e461231..a1fbde29cc 100644 --- a/secretstores/aws/parameterstore/parameterstore_test.go +++ b/secretstores/aws/parameterstore/parameterstore_test.go @@ -25,6 +25,7 @@ import ( "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/ssm/ssmiface" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" @@ -58,7 +59,7 @@ func TestInit(t *testing.T) { "SessionToken": "a", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) }) } @@ -85,7 +86,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "secret", output.Data[req.Name]) }) @@ -116,7 +117,7 @@ func TestGetSecret(t *testing.T) { }, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, output.Data[req.Name]) }) @@ -143,7 +144,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "secret", output.Data[req.Name]) }) }) @@ -161,7 +162,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } _, err := s.GetSecret(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } @@ -196,7 +197,7 @@ func TestGetBulkSecrets(t *testing.T) { Metadata: map[string]string{}, } output, e := s.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Contains(t, output.Data, "/aws/dev/secret1") assert.Contains(t, output.Data, "/aws/dev/secret2") }) @@ -232,7 +233,7 @@ func TestGetBulkSecrets(t *testing.T) { Metadata: map[string]string{}, } output, e := s.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "map[/aws/dev/secret1:/prefix/aws/dev/secret1-secret]", fmt.Sprint(output.Data["/aws/dev/secret1"])) assert.Equal(t, "map[/aws/dev/secret2:/prefix/aws/dev/secret2-secret]", fmt.Sprint(output.Data["/aws/dev/secret2"])) }) @@ -259,7 +260,7 @@ func TestGetBulkSecrets(t *testing.T) { Metadata: map[string]string{}, } _, err := s.BulkGetSecret(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("unsuccessfully retrieve bulk secrets on describe parameter", func(t *testing.T) { @@ -274,7 +275,7 @@ func TestGetBulkSecrets(t *testing.T) { Metadata: map[string]string{}, } _, err := s.BulkGetSecret(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/secretstores/aws/secretmanager/secretmanager_integ_test.go b/secretstores/aws/secretmanager/secretmanager_integ_test.go index acdab2d7fe..feadcf69d6 100644 --- a/secretstores/aws/secretmanager/secretmanager_integ_test.go +++ b/secretstores/aws/secretmanager/secretmanager_integ_test.go @@ -23,6 +23,7 @@ import ( "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // TestIntegrationGetSecret requires AWS specific environments for authentication AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID, @@ -38,12 +39,12 @@ func TestIntegrationGetSecret(t *testing.T) { "SessionToken": os.Getenv("AWS_SESSION_TOKEN"), }, }) - assert.Nil(t, err) + require.NoError(t, err) response, err := sm.GetSecret(secretstores.GetSecretRequest{ Name: secretName, Metadata: map[string]string{}, }) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, response) } @@ -58,8 +59,8 @@ func TestIntegrationBulkGetSecret(t *testing.T) { "SessionToken": os.Getenv("AWS_SESSION_TOKEN"), }, }) - assert.Nil(t, err) + require.NoError(t, err) response, err := sm.BulkGetSecret(secretstores.BulkGetSecretRequest{}) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, response) } diff --git a/secretstores/aws/secretmanager/secretmanager_test.go b/secretstores/aws/secretmanager/secretmanager_test.go index 8dc5b60d6e..bdf6348222 100644 --- a/secretstores/aws/secretmanager/secretmanager_test.go +++ b/secretstores/aws/secretmanager/secretmanager_test.go @@ -23,6 +23,7 @@ import ( "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/secretsmanager/secretsmanageriface" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" @@ -51,7 +52,7 @@ func TestInit(t *testing.T) { "SessionToken": "a", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) }) } @@ -78,7 +79,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "secret", output.Data[req.Name]) }) @@ -104,7 +105,7 @@ func TestGetSecret(t *testing.T) { }, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, output.Data[req.Name]) }) @@ -130,7 +131,7 @@ func TestGetSecret(t *testing.T) { }, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, output.Data[req.Name]) }) }) @@ -148,7 +149,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } _, err := s.GetSecret(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) }) } diff --git a/secretstores/azure/keyvault/keyvault_test.go b/secretstores/azure/keyvault/keyvault_test.go index 7022d95a6e..e41d2ee443 100644 --- a/secretstores/azure/keyvault/keyvault_test.go +++ b/secretstores/azure/keyvault/keyvault_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/secretstores" "github.com/dapr/kit/logger" @@ -35,11 +36,11 @@ func TestInit(t *testing.T) { "azureClientSecret": "passw0rd", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) kv, ok := s.(*keyvaultSecretStore) assert.True(t, ok) - assert.Equal(t, kv.vaultName, "foo") - assert.Equal(t, kv.vaultDNSSuffix, "vault.azure.net") + assert.Equal(t, "foo", kv.vaultName) + assert.Equal(t, "vault.azure.net", kv.vaultDNSSuffix) assert.NotNil(t, kv.vaultClient) }) t.Run("Init with valid metadata and Azure environment", func(t *testing.T) { @@ -51,11 +52,11 @@ func TestInit(t *testing.T) { "azureEnvironment": "AZURECHINACLOUD", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) kv, ok := s.(*keyvaultSecretStore) assert.True(t, ok) - assert.Equal(t, kv.vaultName, "foo") - assert.Equal(t, kv.vaultDNSSuffix, "vault.azure.cn") + assert.Equal(t, "foo", kv.vaultName) + assert.Equal(t, "vault.azure.cn", kv.vaultDNSSuffix) assert.NotNil(t, kv.vaultClient) }) t.Run("Init with Azure environment as part of vaultName FQDN (1) - legacy", func(t *testing.T) { @@ -66,11 +67,11 @@ func TestInit(t *testing.T) { "azureClientSecret": "passw0rd", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) kv, ok := s.(*keyvaultSecretStore) assert.True(t, ok) - assert.Equal(t, kv.vaultName, "foo") - assert.Equal(t, kv.vaultDNSSuffix, "vault.azure.cn") + assert.Equal(t, "foo", kv.vaultName) + assert.Equal(t, "vault.azure.cn", kv.vaultDNSSuffix) assert.NotNil(t, kv.vaultClient) }) t.Run("Init with Azure environment as part of vaultName FQDN (2) - legacy", func(t *testing.T) { @@ -81,11 +82,11 @@ func TestInit(t *testing.T) { "azureClientSecret": "passw0rd", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) kv, ok := s.(*keyvaultSecretStore) assert.True(t, ok) - assert.Equal(t, kv.vaultName, "foo") - assert.Equal(t, kv.vaultDNSSuffix, "vault.usgovcloudapi.net") + assert.Equal(t, "foo", kv.vaultName) + assert.Equal(t, "vault.usgovcloudapi.net", kv.vaultDNSSuffix) assert.NotNil(t, kv.vaultClient) }) } diff --git a/secretstores/gcp/secretmanager/secretmanager.go b/secretstores/gcp/secretmanager/secretmanager.go index de317c3d60..d1ed139aa4 100644 --- a/secretstores/gcp/secretmanager/secretmanager.go +++ b/secretstores/gcp/secretmanager/secretmanager.go @@ -170,7 +170,7 @@ func (s *Store) getSecret(ctx context.Context, secretName string, versionID stri return nil, err } - secret := string(result.Payload.Data) + secret := string(result.GetPayload().GetData()) return &secret, nil } diff --git a/secretstores/gcp/secretmanager/secretmanager_test.go b/secretstores/gcp/secretmanager/secretmanager_test.go index 62dfe46c13..ce125ab49b 100644 --- a/secretstores/gcp/secretmanager/secretmanager_test.go +++ b/secretstores/gcp/secretmanager/secretmanager_test.go @@ -22,6 +22,7 @@ import ( "cloud.google.com/go/secretmanager/apiv1/secretmanagerpb" "github.com/googleapis/gax-go/v2" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/secretstores" @@ -69,7 +70,7 @@ func TestInit(t *testing.T) { } err := sm.Init(ctx, m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("failed to setup secretmanager client: google: could not parse key: private key should be a PEM or plain PKCS1 or PKCS8; parse error: asn1: syntax error: truncated tag or length")) }) @@ -78,7 +79,7 @@ func TestInit(t *testing.T) { "dummy": "a", } err := sm.Init(ctx, m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing property `type` in metadata")) }) @@ -87,7 +88,7 @@ func TestInit(t *testing.T) { "type": "service_account", } err := sm.Init(ctx, m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing property `project_id` in metadata")) }) } @@ -98,7 +99,7 @@ func TestGetSecret(t *testing.T) { t.Run("Get Secret - without Init", func(t *testing.T) { v, err := sm.GetSecret(context.Background(), secretstores.GetSecretRequest{Name: "test"}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("client is not initialized")) assert.Equal(t, secretstores.GetSecretResponse{Data: nil}, v) }) @@ -120,7 +121,7 @@ func TestGetSecret(t *testing.T) { }} sm.Init(ctx, m) v, err := sm.GetSecret(context.Background(), secretstores.GetSecretRequest{Name: "test"}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, secretstores.GetSecretResponse{Data: nil}, v) }) @@ -130,7 +131,7 @@ func TestGetSecret(t *testing.T) { s.ProjectID = "test_project" resp, err := sm.GetSecret(context.Background(), secretstores.GetSecretRequest{}) - assert.NotNil(t, err) + require.Error(t, err) assert.Nil(t, resp.Data) }) @@ -140,9 +141,9 @@ func TestGetSecret(t *testing.T) { s.ProjectID = "test_project" resp, err := sm.GetSecret(context.Background(), secretstores.GetSecretRequest{Name: "test"}) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, resp.Data) - assert.Equal(t, resp.Data["test"], "test") + assert.Equal(t, "test", resp.Data["test"]) }) } @@ -152,7 +153,7 @@ func TestBulkGetSecret(t *testing.T) { t.Run("Bulk Get Secret - without Init", func(t *testing.T) { v, err := sm.BulkGetSecret(context.Background(), secretstores.BulkGetSecretRequest{}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("client is not initialized")) assert.Equal(t, secretstores.BulkGetSecretResponse{Data: nil}, v) }) @@ -176,7 +177,7 @@ func TestBulkGetSecret(t *testing.T) { } sm.Init(ctx, m) v, err := sm.BulkGetSecret(context.Background(), secretstores.BulkGetSecretRequest{}) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, secretstores.BulkGetSecretResponse{Data: nil}, v) }) } diff --git a/secretstores/hashicorp/vault/vault_test.go b/secretstores/hashicorp/vault/vault_test.go index ce3818882f..21d4a602f7 100644 --- a/secretstores/hashicorp/vault/vault_test.go +++ b/secretstores/hashicorp/vault/vault_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/secretstores" @@ -38,14 +39,14 @@ const ( func createTempFileWithContent(t *testing.T, contents string) (fileName string, cleanUpFunc func()) { dir := os.TempDir() f, err := os.CreateTemp(dir, "vault-token") - assert.NoError(t, err) + require.NoError(t, err) fileName = f.Name() cleanUpFunc = func() { os.Remove(fileName) } _, err = f.WriteString(contents) - assert.NoError(t, err) + require.NoError(t, err) return fileName, cleanUpFunc } @@ -65,7 +66,7 @@ func TestReadVaultToken(t *testing.T) { } err := v.initVaultToken() - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, tokenString, v.vaultToken) }) @@ -75,7 +76,7 @@ func TestReadVaultToken(t *testing.T) { } err := v.initVaultToken() - assert.Nil(t, err) + require.NoError(t, err) assert.NotEqual(t, "ThisIs-NOT-TheRootToken", v.vaultToken) }) @@ -86,7 +87,7 @@ func TestReadVaultToken(t *testing.T) { err := v.initVaultToken() - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, expectedTok, v.vaultToken) }) } @@ -106,11 +107,11 @@ func TestVaultTLSConfig(t *testing.T) { meta := VaultMetadata{} err := kitmd.DecodeMetadata(m.Properties, &meta) - assert.NoError(t, err) + require.NoError(t, err) tlsConfig := metadataToTLSConfig(&meta) skipVerify, err := strconv.ParseBool(properties["skipVerify"]) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, properties["caCert"], tlsConfig.vaultCACert) assert.Equal(t, skipVerify, tlsConfig.vaultSkipVerify) assert.Equal(t, properties["tlsServerName"], tlsConfig.vaultServerName) @@ -124,8 +125,8 @@ func TestVaultEnginePath(t *testing.T) { } err := v.Init(context.Background(), secretstores.Metadata{Base: metadata.Base{Properties: map[string]string{componentVaultToken: expectedTok, "skipVerify": "true"}}}) - assert.Nil(t, err) - assert.Equal(t, v.vaultEnginePath, defaultVaultEnginePath) + require.NoError(t, err) + assert.Equal(t, defaultVaultEnginePath, v.vaultEnginePath) }) t.Run("with engine path config", func(t *testing.T) { @@ -134,8 +135,8 @@ func TestVaultEnginePath(t *testing.T) { } err := v.Init(context.Background(), secretstores.Metadata{Base: metadata.Base{Properties: map[string]string{componentVaultToken: expectedTok, "skipVerify": "true", vaultEnginePath: "kv"}}}) - assert.Nil(t, err) - assert.Equal(t, v.vaultEnginePath, "kv") + require.NoError(t, err) + assert.Equal(t, "kv", v.vaultEnginePath) }) } @@ -225,7 +226,7 @@ func TestVaultTokenMountPathOrVaultTokenRequired(t *testing.T) { assert.Equal(t, "", target.vaultToken) assert.Equal(t, "", target.vaultTokenMountPath) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, "token mount path and token not set", err.Error()) }) @@ -292,7 +293,7 @@ func TestVaultTokenMountPathOrVaultTokenRequired(t *testing.T) { assert.Equal(t, expectedTok, target.vaultToken) assert.Equal(t, expectedTokMountPath, target.vaultTokenMountPath) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, "token mount path and token both set", err.Error()) }) } @@ -341,7 +342,7 @@ func TestVaultValueType(t *testing.T) { } err := target.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, target.vaultValueType.isMapType()) }) @@ -362,7 +363,7 @@ func TestVaultValueType(t *testing.T) { } err := target.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) assert.False(t, target.vaultValueType.isMapType()) }) @@ -382,7 +383,7 @@ func TestVaultValueType(t *testing.T) { } err := target.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, target.vaultValueType.isMapType()) }) @@ -403,7 +404,7 @@ func TestVaultValueType(t *testing.T) { } err := target.Init(context.Background(), m) - assert.Error(t, err, "vault init error, invalid value type incorrect, accepted values are map or text") + require.Error(t, err, "vault init error, invalid value type incorrect, accepted values are map or text") }) } diff --git a/secretstores/huaweicloud/csms/csms_test.go b/secretstores/huaweicloud/csms/csms_test.go index 00e07b0ef6..93dd6d9e8e 100644 --- a/secretstores/huaweicloud/csms/csms_test.go +++ b/secretstores/huaweicloud/csms/csms_test.go @@ -20,6 +20,7 @@ import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/csms/v1/model" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/secretstores" ) @@ -98,7 +99,7 @@ func TestGetSecret(t *testing.T) { } resp, e := c.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, resp.Data[req.Name]) }) @@ -113,7 +114,7 @@ func TestGetSecret(t *testing.T) { } _, e := c.GetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) } @@ -130,7 +131,7 @@ func TestBulkGetSecret(t *testing.T) { }, } resp, e := c.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, expectedSecrets, resp.Data) }) @@ -142,7 +143,7 @@ func TestBulkGetSecret(t *testing.T) { req := secretstores.BulkGetSecretRequest{} _, e := c.BulkGetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) t.Run("with failed to retrieve the secret", func(t *testing.T) { @@ -152,7 +153,7 @@ func TestBulkGetSecret(t *testing.T) { req := secretstores.BulkGetSecretRequest{} _, e := c.BulkGetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) }) } diff --git a/secretstores/kubernetes/kubernetes_test.go b/secretstores/kubernetes/kubernetes_test.go index 3a8c1645e6..479856449a 100644 --- a/secretstores/kubernetes/kubernetes_test.go +++ b/secretstores/kubernetes/kubernetes_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/kit/logger" ) @@ -28,7 +29,7 @@ func TestGetNamespace(t *testing.T) { namespace := "a" ns, err := store.getNamespaceFromMetadata(map[string]string{"namespace": namespace}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, namespace, ns) }) @@ -37,7 +38,7 @@ func TestGetNamespace(t *testing.T) { t.Setenv("NAMESPACE", "b") ns, err := store.getNamespaceFromMetadata(map[string]string{}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "b", ns) }) @@ -46,8 +47,8 @@ func TestGetNamespace(t *testing.T) { os.Setenv("NAMESPACE", "") _, err := store.getNamespaceFromMetadata(map[string]string{}) - assert.Error(t, err) - assert.ErrorContains(t, err, "namespace is missing") + require.Error(t, err) + require.ErrorContains(t, err, "namespace is missing") }) t.Run("has default namespace", func(t *testing.T) { @@ -59,7 +60,7 @@ func TestGetNamespace(t *testing.T) { } ns, err := store.getNamespaceFromMetadata(map[string]string{}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "c", ns) }) } diff --git a/secretstores/local/file/filestore_test.go b/secretstores/local/file/filestore_test.go index 118e1c5341..374d8c8001 100644 --- a/secretstores/local/file/filestore_test.go +++ b/secretstores/local/file/filestore_test.go @@ -43,7 +43,7 @@ func TestInit(t *testing.T) { "nestedSeparator": "a", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Init with missing metadata", func(t *testing.T) { @@ -51,7 +51,7 @@ func TestInit(t *testing.T) { "dummy": "a", } err := s.Init(context.Background(), m) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing local secrets file in metadata")) }) } @@ -75,14 +75,14 @@ func TestSeparator(t *testing.T) { "nestedSeparator": ".", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) req := secretstores.GetSecretRequest{ Name: "root.key1", Metadata: map[string]string{}, } output, err := s.GetSecret(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "value1", output.Data[req.Name]) }) @@ -91,14 +91,14 @@ func TestSeparator(t *testing.T) { "secretsFile": "a", } err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) req := secretstores.GetSecretRequest{ Name: "root:key2", Metadata: map[string]string{}, } output, err := s.GetSecret(context.Background(), req) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "value2", output.Data[req.Name]) }) } @@ -126,7 +126,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } output, e := s.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "secret", output.Data[req.Name]) }) @@ -136,7 +136,7 @@ func TestGetSecret(t *testing.T) { Metadata: map[string]string{}, } _, err := s.GetSecret(context.Background(), req) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("secret %s not found", req.Name)) }) @@ -165,7 +165,7 @@ func TestBulkGetSecret(t *testing.T) { t.Run("successfully retrieve secrets", func(t *testing.T) { req := secretstores.BulkGetSecretRequest{} output, e := s.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, "secret", output.Data["secret"]["secret"]) }) } diff --git a/secretstores/tencentcloud/ssm/ssm_test.go b/secretstores/tencentcloud/ssm/ssm_test.go index 3c69a5c874..9ca94965ee 100644 --- a/secretstores/tencentcloud/ssm/ssm_test.go +++ b/secretstores/tencentcloud/ssm/ssm_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ssm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm/v20190923" "github.com/dapr/components-contrib/secretstores" @@ -103,7 +104,7 @@ func TestGetSecret(t *testing.T) { } resp, e := c.GetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, secretValue, resp.Data[req.Name]) }) @@ -118,7 +119,7 @@ func TestGetSecret(t *testing.T) { } _, e := c.GetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) } @@ -137,7 +138,7 @@ func TestBulkGetSecret(t *testing.T) { }, } resp, e := c.BulkGetSecret(context.Background(), req) - assert.Nil(t, e) + require.NoError(t, e) assert.Equal(t, expectedSecrets, resp.Data) }) @@ -149,7 +150,7 @@ func TestBulkGetSecret(t *testing.T) { req := secretstores.BulkGetSecretRequest{} _, e := c.BulkGetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) t.Run("with failed to retrieve the secret", func(t *testing.T) { @@ -159,7 +160,7 @@ func TestBulkGetSecret(t *testing.T) { req := secretstores.BulkGetSecretRequest{} _, e := c.BulkGetSecret(context.Background(), req) - assert.NotNil(t, e) + require.Error(t, e) }) }) } diff --git a/state/aerospike/aerospike_test.go b/state/aerospike/aerospike_test.go index dc223808e7..6cb1ea6d87 100644 --- a/state/aerospike/aerospike_test.go +++ b/state/aerospike/aerospike_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -52,7 +53,7 @@ func TestValidateMetadataForValidInputs(t *testing.T) { t.Run(test.name, func(t *testing.T) { metadata := state.Metadata{Base: metadata.Base{Properties: test.properties}} _, err := parseAndValidateMetadata(metadata) - assert.NoError(t, err) + require.NoError(t, err) }) } } @@ -86,7 +87,7 @@ func TestValidateMetadataForInvalidInputs(t *testing.T) { t.Run(test.name, func(t *testing.T) { metadata := state.Metadata{Base: metadata.Base{Properties: test.properties}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) } } @@ -104,9 +105,9 @@ func TestParseHostsForValidInputs(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { result, err := parseHosts(test.hostPorts) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, result) - assert.True(t, len(result) >= 1) + assert.NotEmpty(t, result) }) } } @@ -125,7 +126,7 @@ func TestParseHostsForInvalidInputs(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { _, err := parseHosts(test.hostPorts) - assert.Error(t, err) + require.Error(t, err) }) } } @@ -133,12 +134,12 @@ func TestParseHostsForInvalidInputs(t *testing.T) { func TestConvertETag(t *testing.T) { t.Run("valid conversion", func(t *testing.T) { result, err := convertETag("42") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, uint32(42), result) }) t.Run("invalid conversion", func(t *testing.T) { _, err := convertETag("junk") - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/alicloud/tablestore/tablestore_test.go b/state/alicloud/tablestore/tablestore_test.go index 0f99a39d50..a69e0851e5 100644 --- a/state/alicloud/tablestore/tablestore_test.go +++ b/state/alicloud/tablestore/tablestore_test.go @@ -122,7 +122,7 @@ func TestReadAndWrite(t *testing.T) { }}, state.BulkGetOpts{}) require.NoError(t, err) - assert.Equal(t, 2, len(resp)) + assert.Len(t, resp, 2) assert.Equal(t, "666", string(resp[0].Data)) assert.Equal(t, "777", string(resp[1].Data)) }) @@ -143,7 +143,7 @@ func TestReadAndWrite(t *testing.T) { }}, state.BulkGetOpts{}) require.NoError(t, err) - assert.Equal(t, 1, len(resp)) + assert.Len(t, resp, 1) assert.Equal(t, "777", string(resp[0].Data)) }) } diff --git a/state/aws/dynamodb/dynamodb_test.go b/state/aws/dynamodb/dynamodb_test.go index 440aad3a9e..2c0ce1b9c8 100644 --- a/state/aws/dynamodb/dynamodb_test.go +++ b/state/aws/dynamodb/dynamodb_test.go @@ -27,6 +27,7 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" ) @@ -79,7 +80,7 @@ func TestInit(t *testing.T) { t.Run("NewDynamoDBStateStore Default Partition Key", func(t *testing.T) { assert.NotNil(t, s) - assert.Equal(t, s.partitionKey, defaultPartitionKeyName) + assert.Equal(t, defaultPartitionKeyName, s.partitionKey) }) t.Run("Init with valid metadata", func(t *testing.T) { @@ -92,7 +93,7 @@ func TestInit(t *testing.T) { "TtlAttributeName": "a", } err := s.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Init with missing table", func(t *testing.T) { @@ -100,7 +101,7 @@ func TestInit(t *testing.T) { "Dummy": "a", } err := s.Init(context.Background(), m) - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing dynamodb table name")) }) @@ -110,7 +111,7 @@ func TestInit(t *testing.T) { "Region": "eu-west-1", } err := s.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Init with partition key", func(t *testing.T) { @@ -120,7 +121,7 @@ func TestInit(t *testing.T) { "partitionKey": pkey, } err := s.Init(context.Background(), m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, s.partitionKey, pkey) }) } @@ -156,7 +157,7 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, []byte("some value"), out.Data) assert.Equal(t, "1bdead4badc0ffee", *out.ETag) assert.NotContains(t, out.Metadata, "ttlExpireTime") @@ -193,12 +194,13 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, []byte("some value"), out.Data) assert.Equal(t, "1bdead4badc0ffee", *out.ETag) assert.Contains(t, out.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, out.Metadata["ttlExpireTime"]) - _ = assert.NoError(t, err) && assert.Equal(t, expireTime.Unix(), int64(4074862051)) + require.NoError(t, err) + assert.Equal(t, int64(4074862051), expireTime.Unix()) }) t.Run("Successfully retrieve item (with expired ttl)", func(t *testing.T) { ss := StateStore{ @@ -232,7 +234,7 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, out.Data) assert.Nil(t, out.ETag) assert.Nil(t, out.Metadata) @@ -253,7 +255,7 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, out) }) t.Run("Unsuccessfully with empty response", func(t *testing.T) { @@ -274,7 +276,7 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, out.Data) assert.Nil(t, out.ETag) assert.Nil(t, out.Metadata) @@ -301,7 +303,7 @@ func TestGet(t *testing.T) { }, } out, err := ss.Get(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) assert.Empty(t, out.Data) assert.Nil(t, out.ETag) }) @@ -324,7 +326,7 @@ func TestSet(t *testing.T) { assert.Equal(t, dynamodb.AttributeValue{ S: aws.String(`{"Value":"value"}`), }, *input.Item["value"]) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) return &dynamodb.PutItemOutput{ Attributes: map[string]*dynamodb.AttributeValue{ @@ -342,7 +344,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Successfully set item with matching etag", func(t *testing.T) { @@ -361,7 +363,7 @@ func TestSet(t *testing.T) { assert.Equal(t, &dynamodb.AttributeValue{ S: aws.String("1bdead4badc0ffee"), }, input.ExpressionAttributeValues[":etag"]) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) return &dynamodb.PutItemOutput{ Attributes: map[string]*dynamodb.AttributeValue{ @@ -381,7 +383,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Unsuccessfully set item with mismatched etag", func(t *testing.T) { @@ -400,7 +402,7 @@ func TestSet(t *testing.T) { assert.Equal(t, &dynamodb.AttributeValue{ S: aws.String("bogusetag"), }, input.ExpressionAttributeValues[":etag"]) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) var checkErr dynamodb.ConditionalCheckFailedException return nil, &checkErr @@ -416,10 +418,10 @@ func TestSet(t *testing.T) { } err := ss.Set(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) switch tagErr := err.(type) { case *state.ETagError: - assert.Equal(t, tagErr.Kind(), state.ETagMismatch) + assert.Equal(t, state.ETagMismatch, tagErr.Kind()) default: assert.True(t, false) } @@ -438,7 +440,7 @@ func TestSet(t *testing.T) { S: aws.String(`{"Value":"value"}`), }, *input.Item["value"]) assert.Equal(t, "attribute_not_exists(etag)", *input.ConditionExpression) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) return &dynamodb.PutItemOutput{ Attributes: map[string]*dynamodb.AttributeValue{ @@ -459,7 +461,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Unsuccessfully set item with first-write-concurrency", func(t *testing.T) { @@ -475,7 +477,7 @@ func TestSet(t *testing.T) { S: aws.String(`{"Value":"value"}`), }, *input.Item["value"]) assert.Equal(t, "attribute_not_exists(etag)", *input.ConditionExpression) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) var checkErr dynamodb.ConditionalCheckFailedException return nil, &checkErr @@ -491,7 +493,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) switch err.(type) { case *state.ETagError: assert.True(t, false) @@ -505,11 +507,11 @@ func TestSet(t *testing.T) { } ss.client = &mockedDynamoDB{ PutItemWithContextFn: func(ctx context.Context, input *dynamodb.PutItemInput, op ...request.Option) (output *dynamodb.PutItemOutput, err error) { - assert.Equal(t, len(input.Item), 4) + assert.Len(t, input.Item, 4) result := DynamoDBItem{} dynamodbattribute.UnmarshalMap(input.Item, &result) - assert.Equal(t, result.Key, "someKey") - assert.Equal(t, result.Value, "{\"Value\":\"someValue\"}") + assert.Equal(t, "someKey", result.Key) + assert.Equal(t, "{\"Value\":\"someValue\"}", result.Value) assert.Greater(t, result.TestAttributeName, time.Now().Unix()-2) assert.Less(t, result.TestAttributeName, time.Now().Unix()) @@ -534,7 +536,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Successfully set item with 'correct' ttl", func(t *testing.T) { ss := &StateStore{ @@ -542,11 +544,11 @@ func TestSet(t *testing.T) { } ss.client = &mockedDynamoDB{ PutItemWithContextFn: func(ctx context.Context, input *dynamodb.PutItemInput, op ...request.Option) (output *dynamodb.PutItemOutput, err error) { - assert.Equal(t, len(input.Item), 4) + assert.Len(t, input.Item, 4) result := DynamoDBItem{} dynamodbattribute.UnmarshalMap(input.Item, &result) - assert.Equal(t, result.Key, "someKey") - assert.Equal(t, result.Value, "{\"Value\":\"someValue\"}") + assert.Equal(t, "someKey", result.Key) + assert.Equal(t, "{\"Value\":\"someValue\"}", result.Value) assert.Greater(t, result.TestAttributeName, time.Now().Unix()+180-1) assert.Less(t, result.TestAttributeName, time.Now().Unix()+180+1) @@ -571,7 +573,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Unsuccessfully set item", func(t *testing.T) { @@ -590,7 +592,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) }) t.Run("Successfully set item with correct ttl but without component metadata", func(t *testing.T) { ss := &StateStore{ @@ -604,7 +606,7 @@ func TestSet(t *testing.T) { assert.Equal(t, dynamodb.AttributeValue{ S: aws.String(`{"Value":"someValue"}`), }, *input.Item["value"]) - assert.Equal(t, len(input.Item), 3) + assert.Len(t, input.Item, 3) return &dynamodb.PutItemOutput{ Attributes: map[string]*dynamodb.AttributeValue{ @@ -625,7 +627,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Unsuccessfully set item with ttl (invalid value)", func(t *testing.T) { ss := StateStore{ @@ -664,7 +666,7 @@ func TestSet(t *testing.T) { }, } err := ss.Set(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "dynamodb error: failed to parse ttlInSeconds: strconv.ParseInt: parsing \"invalidvalue\": invalid syntax", err.Error()) }) } @@ -691,7 +693,7 @@ func TestDelete(t *testing.T) { } err := ss.Delete(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Successfully delete item with matching etag", func(t *testing.T) { @@ -720,7 +722,7 @@ func TestDelete(t *testing.T) { } err := ss.Delete(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Unsuccessfully delete item with mismatched etag", func(t *testing.T) { @@ -751,10 +753,10 @@ func TestDelete(t *testing.T) { } err := ss.Delete(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) switch tagErr := err.(type) { case *state.ETagError: - assert.Equal(t, tagErr.Kind(), state.ETagMismatch) + assert.Equal(t, state.ETagMismatch, tagErr.Kind()) default: assert.True(t, false) } @@ -772,7 +774,7 @@ func TestDelete(t *testing.T) { Key: "key", } err := ss.Delete(context.Background(), req) - assert.Error(t, err) + require.Error(t, err) }) } @@ -808,7 +810,7 @@ func TestMultiTx(t *testing.T) { TransactWriteItemsWithContextFn: func(ctx context.Context, input *dynamodb.TransactWriteItemsInput, op ...request.Option) (*dynamodb.TransactWriteItemsOutput, error) { // ops - duplicates exOps := len(ops) - 1 - assert.Equal(t, exOps, len(input.TransactItems), "unexpected number of operations") + assert.Len(t, input.TransactItems, exOps, "unexpected number of operations") txs := map[string]int{ "P": 0, @@ -835,6 +837,6 @@ func TestMultiTx(t *testing.T) { Metadata: map[string]string{}, } err := ss.Multi(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) } diff --git a/state/azure/blobstorage/internal/blobstorage_test.go b/state/azure/blobstorage/internal/blobstorage_test.go index 6a93735656..233b24e028 100644 --- a/state/azure/blobstorage/internal/blobstorage_test.go +++ b/state/azure/blobstorage/internal/blobstorage_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" "github.com/dapr/kit/logger" @@ -35,7 +36,7 @@ func TestInit(t *testing.T) { "invalidValue": "a", } err := s.Init(context.Background(), m) - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, err, fmt.Errorf("missing or empty accountName field from metadata")) }) } diff --git a/state/azure/cosmosdb/cosmosdb_query_test.go b/state/azure/cosmosdb/cosmosdb_query_test.go index 3a2de4a63d..fc44c0c1f7 100644 --- a/state/azure/cosmosdb/cosmosdb_query_test.go +++ b/state/azure/cosmosdb/cosmosdb_query_test.go @@ -20,6 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state/query" ) @@ -128,15 +129,15 @@ func TestCosmosDbQuery(t *testing.T) { } for _, test := range tests { data, err := os.ReadFile(test.input) - assert.NoError(t, err) + require.NoError(t, err) var qq query.Query err = json.Unmarshal(data, &qq) - assert.NoError(t, err) + require.NoError(t, err) q := &Query{} qbuilder := query.NewQueryBuilder(q) err = qbuilder.BuildQuery(&qq) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, test.query, q.query) } } diff --git a/state/azure/cosmosdb/cosmosdb_test.go b/state/azure/cosmosdb/cosmosdb_test.go index f671483404..27d51f1aa6 100644 --- a/state/azure/cosmosdb/cosmosdb_test.go +++ b/state/azure/cosmosdb/cosmosdb_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" stateutils "github.com/dapr/components-contrib/state/utils" @@ -38,7 +39,7 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Equal(t, value, item.Value) @@ -46,11 +47,11 @@ func TestCreateCosmosItem(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := j["value"].(map[string]interface{}) assert.Truef(t, ok, "value should be a map") @@ -62,7 +63,7 @@ func TestCreateCosmosItem(t *testing.T) { t.Run("create item for JSON bytes", func(t *testing.T) { // Bytes are handled the same way, does not matter if is JSON or JPEG. bytes, err := json.Marshal(value) - assert.NoError(t, err) + require.NoError(t, err) req := state.SetRequest{ Key: "testKey", @@ -70,18 +71,18 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Nil(t, item.TTL) // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := j["value"].(map[string]interface{}) assert.Truef(t, ok, "value should be a map") @@ -93,7 +94,7 @@ func TestCreateCosmosItem(t *testing.T) { t.Run("create item for String bytes", func(t *testing.T) { // Bytes are handled the same way, does not matter if is JSON or JPEG. bytes, err := json.Marshal(value) - assert.NoError(t, err) + require.NoError(t, err) req := state.SetRequest{ Key: "testKey", @@ -101,18 +102,18 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("text/plain", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Nil(t, item.TTL) // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) value := j["value"] m, ok := value.(string) @@ -132,18 +133,18 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Nil(t, item.TTL) // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) value := j["value"] m, ok := value.(string) @@ -163,18 +164,18 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/octet-stream", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Nil(t, item.TTL) // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) value := j["value"] m, ok := value.(string) @@ -187,7 +188,7 @@ func TestCreateCosmosItem(t *testing.T) { t.Run("create item with null data", func(t *testing.T) { // Bytes are handled the same way, does not matter if is JSON or JPEG. bytes, err := json.Marshal(nil) - assert.NoError(t, err) + require.NoError(t, err) req := state.SetRequest{ Key: "testKey", @@ -195,7 +196,7 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.False(t, item.IsBinary) @@ -203,11 +204,11 @@ func TestCreateCosmosItem(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, j["value"]) }) @@ -222,7 +223,7 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.False(t, item.IsBinary) @@ -230,11 +231,11 @@ func TestCreateCosmosItem(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := (j["value"].(string)) @@ -253,7 +254,7 @@ func TestCreateCosmosItem(t *testing.T) { } item, err := createUpsertItem("text/plain", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.False(t, item.IsBinary) @@ -261,11 +262,11 @@ func TestCreateCosmosItem(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := (j["value"].(string)) @@ -290,7 +291,7 @@ func TestCreateCosmosItemWithTTL(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Equal(t, value, item.Value) @@ -298,11 +299,11 @@ func TestCreateCosmosItemWithTTL(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := j["value"].(map[string]interface{}) assert.Truef(t, ok, "value should be a map") @@ -322,7 +323,7 @@ func TestCreateCosmosItemWithTTL(t *testing.T) { } item, err := createUpsertItem("application/json", req, partitionKey) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, partitionKey, item.PartitionKey) assert.Equal(t, "testKey", item.ID) assert.Equal(t, value, item.Value) @@ -330,11 +331,11 @@ func TestCreateCosmosItemWithTTL(t *testing.T) { // items need to be marshallable to JSON with encoding/json b, err := json.Marshal(item) - assert.NoError(t, err) + require.NoError(t, err) j := map[string]interface{}{} err = json.Unmarshal(b, &j) - assert.NoError(t, err) + require.NoError(t, err) m, ok := j["value"].(map[string]interface{}) assert.Truef(t, ok, "value should be a map") @@ -353,6 +354,6 @@ func TestCreateCosmosItemWithTTL(t *testing.T) { } _, err := createUpsertItem("application/json", req, partitionKey) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/azure/tablestorage/tablestorage_test.go b/state/azure/tablestorage/tablestorage_test.go index 128c18cff4..eea3973484 100644 --- a/state/azure/tablestorage/tablestorage_test.go +++ b/state/azure/tablestorage/tablestorage_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestGetTableStorageMetadata(t *testing.T) { @@ -24,7 +25,7 @@ func TestGetTableStorageMetadata(t *testing.T) { m := make(map[string]string) _, err := getTablesMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) t.Run("All parameters passed and parsed", func(t *testing.T) { @@ -35,11 +36,11 @@ func TestGetTableStorageMetadata(t *testing.T) { m[cosmosDBModeKey] = "on" meta, err := getTablesMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "acc", meta.AccountName) assert.Equal(t, "key", meta.AccountKey) assert.Equal(t, "dapr", meta.TableName) - assert.Equal(t, true, meta.CosmosDBMode) + assert.True(t, meta.CosmosDBMode) }) t.Run("All parameters passed and parsed, using aliases", func(t *testing.T) { @@ -49,7 +50,7 @@ func TestGetTableStorageMetadata(t *testing.T) { m["table"] = "dapr" meta, err := getTablesMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "acc", meta.AccountName) assert.Equal(t, "key", meta.AccountKey) assert.Equal(t, "dapr", meta.TableName) diff --git a/state/bulk_test.go b/state/bulk_test.go index 9c179fe985..5bd739c974 100644 --- a/state/bulk_test.go +++ b/state/bulk_test.go @@ -82,10 +82,10 @@ func TestBulkStore(t *testing.T) { require.Len(t, errs, 2) for i := 0; i < 2; i++ { var bse BulkStoreError - assert.ErrorAs(t, errs[i], &bse) + require.ErrorAs(t, errs[i], &bse) assert.True(t, bse.key == "error-key1" || bse.key == "error-key2") - assert.ErrorIs(t, bse, errSimulated) - assert.ErrorIs(t, errs[i], errSimulated) + require.ErrorIs(t, bse, errSimulated) + require.ErrorIs(t, errs[i], errSimulated) } require.Equal(t, expectCount, s.count.Load()) require.Equal(t, expectBulkCount, s.bulkCount.Load()) diff --git a/state/cassandra/cassandra.go b/state/cassandra/cassandra.go index 7191accd9e..370e9d6385 100644 --- a/state/cassandra/cassandra.go +++ b/state/cassandra/cassandra.go @@ -62,15 +62,16 @@ type Cassandra struct { } type cassandraMetadata struct { - Hosts []string - Port int - ProtoVersion int - ReplicationFactor int - Username string - Password string - Consistency string - Table string - Keyspace string + Hosts []string + Port int + ProtoVersion int + ReplicationFactor int + Username string + Password string + Consistency string + Table string + Keyspace string + EnableHostVerification bool } // NewCassandraStateStore returns a new cassandra state store. @@ -124,7 +125,7 @@ func (c *Cassandra) Features() []state.Feature { } func (c *Cassandra) tryCreateKeyspace(keyspace string, replicationFactor int) error { - return c.session.Query(fmt.Sprintf("CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : %s};", keyspace, fmt.Sprintf("%v", replicationFactor))).Exec() + return c.session.Query(fmt.Sprintf("CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : %s};", keyspace, strconv.Itoa(replicationFactor))).Exec() } func (c *Cassandra) tryCreateTable(table, keyspace string) error { @@ -136,6 +137,11 @@ func (c *Cassandra) createClusterConfig(metadata *cassandraMetadata) (*gocql.Clu if metadata.Username != "" && metadata.Password != "" { clusterConfig.Authenticator = gocql.PasswordAuthenticator{Username: metadata.Username, Password: metadata.Password} } + if metadata.EnableHostVerification { + clusterConfig.SslOpts = &gocql.SslOptions{ + EnableHostVerification: true, + } + } clusterConfig.Port = metadata.Port clusterConfig.ProtoVersion = metadata.ProtoVersion cons, err := c.getConsistency(metadata.Consistency) diff --git a/state/cassandra/cassandra_test.go b/state/cassandra/cassandra_test.go index 3ab7ecac8d..42df4e2666 100644 --- a/state/cassandra/cassandra_test.go +++ b/state/cassandra/cassandra_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -33,7 +34,7 @@ func TestGetCassandraMetadata(t *testing.T) { } metadata, err := getCassandraMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties[hosts], metadata.Hosts[0]) assert.Equal(t, "All", metadata.Consistency) assert.Equal(t, defaultKeyspace, metadata.Keyspace) @@ -60,7 +61,7 @@ func TestGetCassandraMetadata(t *testing.T) { } metadata, err := getCassandraMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, strings.Split(properties[hosts], ",")[0], metadata.Hosts[0]) assert.Equal(t, strings.Split(properties[hosts], ",")[1], metadata.Hosts[1]) assert.Equal(t, properties[consistency], metadata.Consistency) @@ -89,7 +90,7 @@ func TestGetCassandraMetadata(t *testing.T) { } _, err := getCassandraMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) t.Run("Missing hosts", func(t *testing.T) { @@ -107,6 +108,6 @@ func TestGetCassandraMetadata(t *testing.T) { } _, err := getCassandraMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/cassandra/metadata.yaml b/state/cassandra/metadata.yaml index 55e5bd96d3..cc7b14dfb6 100644 --- a/state/cassandra/metadata.yaml +++ b/state/cassandra/metadata.yaml @@ -38,6 +38,11 @@ metadata: description: "Port for communication." default: "9042" example: "8080" + - name: enableHostVerification + type: bool + description: "Enables host verification. Secures the traffic between client server with TLS." + default: "false" + example: "true" - name: table type: string description: "The name of the table to use." diff --git a/state/cockroachdb/cockroachdb_integration_test.go b/state/cockroachdb/cockroachdb_integration_test.go index dbffe0d796..ba6cae5fc4 100644 --- a/state/cockroachdb/cockroachdb_integration_test.go +++ b/state/cockroachdb/cockroachdb_integration_test.go @@ -199,11 +199,11 @@ func testCreateTable(t *testing.T, db *pgxpool.Pool) { require.NoError(t, err) exists, err = tableExists(ctx, db, "test_state") - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, exists) exists, err = tableExists(ctx, db, "test_metadata") - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, exists) dropTable(t, db, "test_state") @@ -214,7 +214,7 @@ func dropTable(t *testing.T, db *pgxpool.Pool, tableName string) { t.Helper() _, err := db.Exec(context.Background(), fmt.Sprintf("DROP TABLE %s", tableName)) - assert.NoError(t, err) + require.NoError(t, err) } func deleteItemThatDoesNotExist(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -231,7 +231,7 @@ func deleteItemThatDoesNotExist(t *testing.T, pgs *postgresql.PostgreSQL) { }, } err := pgs.Delete(context.Background(), deleteReq) - assert.NoError(t, err) + require.NoError(t, err) } func multiWithSetOnly(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -259,7 +259,7 @@ func multiWithSetOnly(t *testing.T, pgs *postgresql.PostgreSQL) { Operations: operations, Metadata: nil, }) - assert.NoError(t, err) + require.NoError(t, err) for _, set := range setRequests { assert.True(t, storeItemExists(t, set.Key)) @@ -297,7 +297,7 @@ func multiWithDeleteOnly(t *testing.T, pgs *postgresql.PostgreSQL) { Operations: operations, Metadata: nil, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -352,7 +352,7 @@ func multiWithDeleteAndSet(t *testing.T, pgs *postgresql.PostgreSQL) { Operations: operations, Metadata: nil, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -384,7 +384,7 @@ func deleteWithInvalidEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { }, } err := pgs.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) } func deleteWithNoKeyFails(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -400,7 +400,7 @@ func deleteWithNoKeyFails(t *testing.T, pgs *postgresql.PostgreSQL) { }, } err := pgs.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) } // newItemWithEtagFails creates a new item and also supplies an ETag, which is invalid - expect failure. @@ -423,7 +423,7 @@ func newItemWithEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } func updateWithOldEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -457,7 +457,7 @@ func updateWithOldEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { ContentType: nil, } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } func updateAndDeleteWithEtagSucceeds(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -509,7 +509,7 @@ func getItemWithNoKey(t *testing.T, pgs *postgresql.PostgreSQL) { } response, getErr := pgs.Get(context.Background(), getReq) - assert.NotNil(t, getErr) + require.Error(t, getErr) assert.Nil(t, response) } @@ -552,7 +552,7 @@ func setItemWithNoKey(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } // Tests valid bulk sets and deletes. @@ -571,7 +571,7 @@ func testBulkSetAndBulkDelete(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.BulkSet(context.Background(), setReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, storeItemExists(t, setReq[0].Key)) assert.True(t, storeItemExists(t, setReq[1].Key)) @@ -585,7 +585,7 @@ func testBulkSetAndBulkDelete(t *testing.T, pgs *postgresql.PostgreSQL) { } err = pgs.BulkDelete(context.Background(), deleteReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, storeItemExists(t, setReq[0].Key)) assert.False(t, storeItemExists(t, setReq[1].Key)) } @@ -623,10 +623,10 @@ func testInitConfiguration(t *testing.T) { err := cockroackDB.Init(context.Background(), metadata) if rowTest.expectedErr == "" { - assert.NoError(t, err) + require.NoError(t, err) } else { - assert.NotNil(t, err) - assert.Equal(t, err.Error(), rowTest.expectedErr) + require.Error(t, err) + assert.Equal(t, rowTest.expectedErr, err.Error()) } }) } @@ -652,7 +652,7 @@ func setItem(t *testing.T, pgs *postgresql.PostgreSQL, key string, value interfa } err := pgs.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) itemExists := storeItemExists(t, key) assert.True(t, itemExists) } @@ -700,7 +700,7 @@ func getItem(t *testing.T, pgs *postgresql.PostgreSQL, key string) (*state.GetRe } response, getErr := pgs.Get(context.Background(), getReq) - assert.NoError(t, getErr) + require.NoError(t, getErr) assert.NotNil(t, response) outputObject := &fakeItem{ Color: "", @@ -724,7 +724,7 @@ func deleteItem(t *testing.T, pgs *postgresql.PostgreSQL, key string, etag *stri } deleteErr := pgs.Delete(context.Background(), deleteReq) - assert.NoError(t, deleteErr) + require.NoError(t, deleteErr) assert.False(t, storeItemExists(t, key)) } @@ -732,13 +732,13 @@ func storeItemExists(t *testing.T, key string) bool { t.Helper() databaseConnection, err := sql.Open("pgx", getConnectionString()) - assert.NoError(t, err) + require.NoError(t, err) defer databaseConnection.Close() exists := false statement := fmt.Sprintf(`SELECT EXISTS (SELECT * FROM %s WHERE key = $1)`, defaultTableName) err = databaseConnection.QueryRow(statement, key).Scan(&exists) - assert.NoError(t, err) + require.NoError(t, err) return exists } @@ -747,11 +747,11 @@ func getRowData(t *testing.T, key string) (returnValue string, insertdate sql.Nu t.Helper() databaseConnection, err := sql.Open("pgx", getConnectionString()) - assert.NoError(t, err) + require.NoError(t, err) defer databaseConnection.Close() err = databaseConnection.QueryRow(fmt.Sprintf("SELECT value, insertdate, updatedate FROM %s WHERE key = $1", defaultTableName), key).Scan(&returnValue, &insertdate, &updatedate) - assert.NoError(t, err) + require.NoError(t, err) return returnValue, insertdate, updatedate } @@ -774,7 +774,7 @@ func setItemWithTTL(t *testing.T, pgs *postgresql.PostgreSQL, key string, value } err := pgs.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) itemExists := storeItemExists(t, key) assert.True(t, itemExists) } diff --git a/state/couchbase/couchbase_test.go b/state/couchbase/couchbase_test.go index ac52533635..49c01a5ff1 100644 --- a/state/couchbase/couchbase_test.go +++ b/state/couchbase/couchbase_test.go @@ -14,10 +14,11 @@ limitations under the License. package couchbase import ( - "fmt" + "strconv" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gopkg.in/couchbase/gocb.v1" "github.com/dapr/components-contrib/metadata" @@ -35,7 +36,7 @@ func TestValidateMetadata(t *testing.T) { metadata := state.Metadata{Base: metadata.Base{Properties: props}} meta, err := parseAndValidateMetadata(metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, props[couchbaseURL], meta.CouchbaseURL) }) t.Run("with optional fields", func(t *testing.T) { @@ -50,9 +51,9 @@ func TestValidateMetadata(t *testing.T) { metadata := state.Metadata{Base: metadata.Base{Properties: props}} meta, err := parseAndValidateMetadata(metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, props[couchbaseURL], meta.CouchbaseURL) - assert.Equal(t, props[numReplicasDurablePersistence], fmt.Sprintf("%d", meta.NumReplicasDurablePersistence)) + assert.Equal(t, props[numReplicasDurablePersistence], strconv.FormatUint(uint64(meta.NumReplicasDurablePersistence), 10)) }) t.Run("With missing couchbase URL", func(t *testing.T) { props := map[string]string{ @@ -62,7 +63,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) t.Run("With missing username", func(t *testing.T) { props := map[string]string{ @@ -72,7 +73,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) t.Run("With missing password", func(t *testing.T) { props := map[string]string{ @@ -82,7 +83,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) t.Run("With missing bucket", func(t *testing.T) { props := map[string]string{ @@ -92,7 +93,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) t.Run("With invalid durable replication", func(t *testing.T) { props := map[string]string{ @@ -103,7 +104,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) t.Run("With invalid durable persistence", func(t *testing.T) { props := map[string]string{ @@ -114,7 +115,7 @@ func TestValidateMetadata(t *testing.T) { } metadata := state.Metadata{Base: metadata.Base{Properties: props}} _, err := parseAndValidateMetadata(metadata) - assert.Error(t, err) + require.Error(t, err) }) } @@ -124,11 +125,11 @@ func TestETagToCas(t *testing.T) { ver := uint64(1572938024378368000) expectedCas := gocb.Cas(ver) cas, err := eTagToCas(casStr) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expectedCas, cas) }) t.Run("with empty string", func(t *testing.T) { _, err := eTagToCas("") - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/etcd/etcd_test.go b/state/etcd/etcd_test.go index 5c09a814f2..7b71118bf3 100644 --- a/state/etcd/etcd_test.go +++ b/state/etcd/etcd_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -32,7 +33,7 @@ func TestGetEtcdMetadata(t *testing.T) { } metadata, err := metadataToConfig(m.Properties) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties["endpoints"], metadata.Endpoints) }) @@ -47,7 +48,7 @@ func TestGetEtcdMetadata(t *testing.T) { } metadata, err := metadataToConfig(m.Properties) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties["endpoints"], metadata.Endpoints) assert.Equal(t, properties["keyPrefixPath"], metadata.KeyPrefixPath) assert.Equal(t, properties["tlsEnable"], metadata.TLSEnable) diff --git a/state/etcd/schema.go b/state/etcd/schema.go index 4d7972fc95..790e294606 100644 --- a/state/etcd/schema.go +++ b/state/etcd/schema.go @@ -81,11 +81,11 @@ func (schemaV2) decode(data []byte) ([]byte, map[string]string, error) { } var metadata map[string]string - if value.Ttl != nil { + if value.GetTtl() != nil { metadata = map[string]string{ - state.GetRespMetaKeyTTLExpireTime: value.Ts.AsTime().Add(value.Ttl.AsDuration()).Format(time.RFC3339), + state.GetRespMetaKeyTTLExpireTime: value.GetTs().AsTime().Add(value.GetTtl().AsDuration()).Format(time.RFC3339), } } - return value.Data, metadata, nil + return value.GetData(), metadata, nil } diff --git a/state/gcp/firestore/firestore_test.go b/state/gcp/firestore/firestore_test.go index a1019174b4..21c98aca8c 100644 --- a/state/gcp/firestore/firestore_test.go +++ b/state/gcp/firestore/firestore_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -41,13 +42,13 @@ func TestGetFirestoreMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } metadata, err := getFirestoreMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "service_account", metadata.Type) assert.Equal(t, "myprojectid", metadata.ProjectID) assert.Equal(t, "123", metadata.PrivateKeyID) assert.Equal(t, "mykey", metadata.PrivateKey) assert.Equal(t, defaultEntityKind, metadata.EntityKind) - assert.Equal(t, true, metadata.NoIndex) + assert.True(t, metadata.NoIndex) }) t.Run("With incorrect properties", func(t *testing.T) { @@ -60,6 +61,6 @@ func TestGetFirestoreMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } _, err := getFirestoreMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/hashicorp/consul/consul_test.go b/state/hashicorp/consul/consul_test.go index ca83505c39..b8e08a8407 100644 --- a/state/hashicorp/consul/consul_test.go +++ b/state/hashicorp/consul/consul_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -33,7 +34,7 @@ func TestGetConsulMetadata(t *testing.T) { } metadata, err := metadataToConfig(m.Properties) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties["datacenter"], metadata.Datacenter) assert.Equal(t, properties["httpAddr"], metadata.HTTPAddr) }) @@ -51,7 +52,7 @@ func TestGetConsulMetadata(t *testing.T) { } metadata, err := metadataToConfig(m.Properties) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties["datacenter"], metadata.Datacenter) assert.Equal(t, properties["httpAddr"], metadata.HTTPAddr) assert.Equal(t, properties["aclToken"], metadata.ACLToken) diff --git a/state/hazelcast/hazelcast_test.go b/state/hazelcast/hazelcast_test.go index 109f04b431..ec8bcbb0ff 100644 --- a/state/hazelcast/hazelcast_test.go +++ b/state/hazelcast/hazelcast_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -29,7 +30,7 @@ func TestValidateMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } _, err := validateAndParseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("without server configuration", func(t *testing.T) { @@ -40,7 +41,7 @@ func TestValidateMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } _, err := validateAndParseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("without map configuration", func(t *testing.T) { @@ -51,7 +52,7 @@ func TestValidateMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } _, err := validateAndParseMetadata(m) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("with valid configuration", func(t *testing.T) { @@ -63,7 +64,7 @@ func TestValidateMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } meta, err := validateAndParseMetadata(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, properties["hazelcastServers"], meta.HazelcastServers) }) } diff --git a/state/in-memory/in_memory_test.go b/state/in-memory/in_memory_test.go index e532315c77..66c0f64836 100644 --- a/state/in-memory/in_memory_test.go +++ b/state/in-memory/in_memory_test.go @@ -47,13 +47,13 @@ func TestReadAndWrite(t *testing.T) { Value: valueA, } err := store.Set(context.Background(), setReq) - assert.Nil(t, err) + require.NoError(t, err) // get after set getReq := &state.GetRequest{ Key: keyA, } resp, err := store.Get(context.Background(), getReq) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) assert.Equal(t, `"`+valueA+`"`, string(resp.Data)) _ = assert.NotNil(t, resp.ETag) && @@ -68,7 +68,7 @@ func TestReadAndWrite(t *testing.T) { Metadata: map[string]string{"ttlInSeconds": "1"}, } err := store.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // simulate expiration fakeClock.Step(2 * time.Second) // get @@ -76,7 +76,7 @@ func TestReadAndWrite(t *testing.T) { Key: keyA, } resp, err := store.Get(context.Background(), getReq) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) assert.Nil(t, resp.Data) assert.Nil(t, resp.ETag) @@ -93,14 +93,14 @@ func TestReadAndWrite(t *testing.T) { } err := store.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // get getReq := &state.GetRequest{ Key: keyA, } resp, err := store.Get(context.Background(), getReq) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) assert.Equal(t, `"value of key"`, string(resp.Data)) assert.Len(t, resp.Metadata, 1) @@ -109,12 +109,12 @@ func TestReadAndWrite(t *testing.T) { }) t.Run("return expire time when ttlInSeconds set with GetBulk", func(t *testing.T) { - assert.NoError(t, store.Set(context.Background(), &state.SetRequest{ + require.NoError(t, store.Set(context.Background(), &state.SetRequest{ Key: "a", Value: "123", Metadata: map[string]string{"ttlInSeconds": "1000"}, })) - assert.NoError(t, store.Set(context.Background(), &state.SetRequest{ + require.NoError(t, store.Set(context.Background(), &state.SetRequest{ Key: "b", Value: "456", Metadata: map[string]string{"ttlInSeconds": "2001"}, @@ -124,7 +124,7 @@ func TestReadAndWrite(t *testing.T) { {Key: "a"}, {Key: "b"}, }, state.BulkGetOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) require.Len(t, resp, 2) sort.Slice(resp, func(i, j int) bool { @@ -147,13 +147,13 @@ func TestReadAndWrite(t *testing.T) { Value: 1234, } err := store.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // get getReq := &state.GetRequest{ Key: "theSecondKey", } resp, err := store.Get(context.Background(), getReq) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) assert.Equal(t, `1234`, string(resp.Data)) }) @@ -167,7 +167,7 @@ func TestReadAndWrite(t *testing.T) { Value: "84", }}, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("delete theFirstKey", func(t *testing.T) { @@ -175,6 +175,6 @@ func TestReadAndWrite(t *testing.T) { Key: "theFirstKey", } err := store.Delete(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) }) } diff --git a/state/memcached/memcached_test.go b/state/memcached/memcached_test.go index 53f8cf6f64..785fd7b11b 100644 --- a/state/memcached/memcached_test.go +++ b/state/memcached/memcached_test.go @@ -35,7 +35,7 @@ func TestMemcachedMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } _, err := getMemcachedMetadata(m) - assert.Error(t, err) + require.Error(t, err) }) t.Run("with required configuration, single host", func(t *testing.T) { @@ -46,7 +46,7 @@ func TestMemcachedMetadata(t *testing.T) { Base: metadata.Base{Properties: properties}, } metadata, err := getMemcachedMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, properties["hosts"], metadata.Hosts[0]) assert.Equal(t, defaultMaxIdleConnections, metadata.MaxIdleConnections) assert.Equal(t, -1, metadata.Timeout) @@ -61,7 +61,7 @@ func TestMemcachedMetadata(t *testing.T) { } split := strings.Split(properties["hosts"], ",") metadata, err := getMemcachedMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, split, metadata.Hosts) assert.Equal(t, defaultMaxIdleConnections, metadata.MaxIdleConnections) assert.Equal(t, -1, metadata.Timeout) @@ -78,7 +78,7 @@ func TestMemcachedMetadata(t *testing.T) { } split := strings.Split(properties["hosts"], ",") metadata, err := getMemcachedMetadata(m) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, split, metadata.Hosts) assert.Equal(t, 10, metadata.MaxIdleConnections) assert.Equal(t, int(5000*time.Millisecond), metadata.Timeout*int(time.Millisecond)) @@ -96,7 +96,7 @@ func TestParseTTL(t *testing.T) { }, }) - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, ttl) }) t.Run("TTL is a negative integer ends up translated to 0", func(t *testing.T) { @@ -106,8 +106,8 @@ func TestParseTTL(t *testing.T) { "ttlInSeconds": strconv.Itoa(ttlInSeconds), }, }) - assert.NoError(t, err) - assert.Equal(t, int(*ttl), 0) + require.NoError(t, err) + assert.Equal(t, 0, int(*ttl)) }) t.Run("TTL specified with wrong key", func(t *testing.T) { ttlInSeconds := 12345 @@ -117,7 +117,7 @@ func TestParseTTL(t *testing.T) { }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, ttl) }) t.Run("TTL is a number", func(t *testing.T) { @@ -128,7 +128,7 @@ func TestParseTTL(t *testing.T) { }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int(*ttl), ttlInSeconds) }) @@ -140,7 +140,7 @@ func TestParseTTL(t *testing.T) { }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int(*ttl), ttlInSeconds) }) diff --git a/state/mongodb/mongodb_query_test.go b/state/mongodb/mongodb_query_test.go index 98a49d80c7..23de063ecd 100644 --- a/state/mongodb/mongodb_query_test.go +++ b/state/mongodb/mongodb_query_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state/query" ) @@ -51,15 +52,15 @@ func TestMongoQuery(t *testing.T) { } for _, test := range tests { data, err := os.ReadFile(test.input) - assert.NoError(t, err) + require.NoError(t, err) var qq query.Query err = json.Unmarshal(data, &qq) - assert.NoError(t, err) + require.NoError(t, err) q := &Query{} qbuilder := query.NewQueryBuilder(q) err = qbuilder.BuildQuery(&qq) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, test.query, q.query) } } diff --git a/state/mongodb/mongodb_test.go b/state/mongodb/mongodb_test.go index dec15e52ff..4f0e8e1f71 100644 --- a/state/mongodb/mongodb_test.go +++ b/state/mongodb/mongodb_test.go @@ -19,6 +19,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.mongodb.org/mongo-driver/bson" "github.com/dapr/components-contrib/metadata" @@ -35,7 +36,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, properties[host], metadata.Host) assert.Equal(t, defaultDatabaseName, metadata.DatabaseName) assert.Equal(t, defaultCollectionName, metadata.CollectionName) @@ -54,7 +55,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, properties[host], metadata.Host) assert.Equal(t, properties[databaseName], metadata.DatabaseName) assert.Equal(t, properties[collectionName], metadata.CollectionName) @@ -72,7 +73,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } _, err := getMongoDBMetaData(m) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Valid connection details without params", func(t *testing.T) { @@ -88,7 +89,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) uri := metadata.getMongoConnectionString() expected := "mongodb://username:password@127.0.0.2/TestDB" @@ -107,7 +108,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) uri := metadata.getMongoConnectionString() expected := "mongodb://localhost:27017/TestDB" @@ -129,7 +130,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) uri := metadata.getMongoConnectionString() expected := "mongodb://username:password@127.0.0.2/TestDB?ssl=true" @@ -149,7 +150,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) uri := metadata.getMongoConnectionString() expected := "mongodb+srv://server.example.com/?ssl=true" @@ -167,7 +168,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } _, err := getMongoDBMetaData(m) - assert.NotNil(t, err) + require.Error(t, err) expected := "must set 'host' or 'server' fields in metadata" assert.Equal(t, expected, err.Error()) @@ -185,7 +186,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } _, err := getMongoDBMetaData(m) - assert.NotNil(t, err) + require.Error(t, err) expected := "'host' or 'server' fields are mutually exclusive" assert.Equal(t, expected, err.Error()) @@ -203,7 +204,7 @@ func TestGetMongoDBMetadata(t *testing.T) { } metadata, err := getMongoDBMetaData(m) - assert.Nil(t, err) + require.NoError(t, err) uri := metadata.getMongoConnectionString() expected := "mongodb://localhost:99999/UnchanedDB" @@ -215,7 +216,7 @@ func TestGetMongoDBMetadata(t *testing.T) { mongo := MongoDB{} time.Local = time.UTC thetime, err := time.Parse(time.RFC3339, "2023-02-01T12:13:09Z") - assert.NoError(t, err) + require.NoError(t, err) timestring := thetime.UTC().Format("2006-01-02T15:04:05Z") msg := bson.M{ @@ -227,17 +228,17 @@ func TestGetMongoDBMetadata(t *testing.T) { } res, err := mongo.decodeData(msg) - assert.NoError(t, err) + require.NoError(t, err) var data map[string]interface{} err = json.Unmarshal(res, &data) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "test message", data["message"]) assert.Equal(t, timestring, data["time"]) assert.Equal(t, 123.456789, data["decimal"]) assert.Equal(t, float64(123456789), data["integer"]) - assert.Equal(t, true, data["boolean"]) + assert.True(t, data["boolean"].(bool)) msg2 := bson.D{ {Key: "message", Value: "test message"}, @@ -251,17 +252,17 @@ func TestGetMongoDBMetadata(t *testing.T) { } res2, err := mongo.decodeData(msg2) - assert.NoError(t, err) + require.NoError(t, err) var data2 map[string]interface{} err = json.Unmarshal(res2, &data2) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "test message", data2["message"]) assert.Equal(t, timestring, data2["time"]) assert.Equal(t, 123.456789, data2["decimal"]) assert.Equal(t, float64(123456789), data2["integer"]) - assert.Equal(t, true, data2["boolean"]) + assert.True(t, data2["boolean"].(bool)) assert.Equal(t, []interface{}{"test", float64(123), 123.456, true, timestring}, data2["nestedarray"]) // this is an array type @@ -270,10 +271,10 @@ func TestGetMongoDBMetadata(t *testing.T) { bson.D{{Key: "somedecimal", Value: 9.87654321}, {Key: "sometime", Value: thetime}}, } res3, err := mongo.decodeData(msg3) - assert.NoError(t, err) + require.NoError(t, err) var data3 []interface{} err = json.Unmarshal(res3, &data3) - assert.NoError(t, err) + require.NoError(t, err) assert.Contains(t, data3, "test message") assert.Contains(t, data3, timestring) diff --git a/state/mysql/mysql.go b/state/mysql/mysql.go index 6537ad3408..fd476a0093 100644 --- a/state/mysql/mysql.go +++ b/state/mysql/mysql.go @@ -509,6 +509,7 @@ func (m *MySQL) Get(parentCtx context.Context, req *state.GetRequest) (*state.Ge ctx, cancel := context.WithTimeout(parentCtx, m.timeout) defer cancel() // Concatenation is required for table name because sql.DB does not substitute parameters for table names + //nolint:gosec query := `SELECT id, value, eTag, isbinary, IFNULL(expiredate, "") FROM ` + m.tableName + ` WHERE id = ? AND (expiredate IS NULL OR expiredate > CURRENT_TIMESTAMP)` row := m.db.QueryRowContext(ctx, query, req.Key) @@ -668,6 +669,7 @@ func (m *MySQL) BulkGet(parentCtx context.Context, req []state.GetRequest, _ sta } // Concatenation is required for table name because sql.DB does not substitute parameters for table names + //nolint:gosec stmt := `SELECT id, value, eTag, isbinary, IFNULL(expiredate, "") FROM ` + m.tableName + ` WHERE id IN (` + inClause + `) diff --git a/state/mysql/mysql_integration_test.go b/state/mysql/mysql_integration_test.go index 31beb61fd2..22052ad5e8 100644 --- a/state/mysql/mysql_integration_test.go +++ b/state/mysql/mysql_integration_test.go @@ -120,10 +120,10 @@ func TestMySQLIntegration(t *testing.T) { err := p.Init(context.Background(), metadata) if tt.expectedErr == "" { - assert.NoError(t, err) + require.NoError(t, err) } else { - assert.NotNil(t, err) - assert.Equal(t, err.Error(), tt.expectedErr) + require.Error(t, err) + assert.Equal(t, tt.expectedErr, err.Error()) } }) } @@ -152,7 +152,7 @@ func TestMySQLIntegration(t *testing.T) { // Drop the table if it already exists exists, err := tableExists(context.Background(), mys.db, "dapr_state_store", tableName, 10*time.Second) - assert.NoError(t, err) + require.NoError(t, err) if exists { dropTable(t, mys.db, tableName) } @@ -160,11 +160,11 @@ func TestMySQLIntegration(t *testing.T) { // Create the state table and test for its existence // There should be no error err = mys.ensureStateTable(context.Background(), "dapr_state_store", tableName) - assert.NoError(t, err) + require.NoError(t, err) // Now create it and make sure there are no errors exists, err = tableExists(context.Background(), mys.db, "dapr_state_store", tableName, 10*time.Second) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, exists) // Drop the state table @@ -210,7 +210,7 @@ func TestMySQLIntegration(t *testing.T) { } response, getErr := mys.Get(context.Background(), getReq) - assert.NotNil(t, getErr) + require.Error(t, getErr) assert.Nil(t, response) }) @@ -247,7 +247,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Set(context.Background(), setReq) - assert.NotNil(t, err, "Error was not nil when setting item with no key.") + require.Error(t, err, "Error was not nil when setting item with no key.") }) t.Run("Bulk set and bulk delete", func(t *testing.T) { @@ -313,7 +313,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Set(context.Background(), setReq) - assert.NotNil(t, err, "Error was not thrown using old eTag") + require.Error(t, err, "Error was not thrown using old eTag") }) t.Run("Insert with eTag fails", func(t *testing.T) { @@ -329,7 +329,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Delete with invalid eTag fails", func(t *testing.T) { @@ -349,7 +349,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Delete item with no key fails", func(t *testing.T) { @@ -360,7 +360,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) }) t.Run("Delete an item that does not exist", func(t *testing.T) { @@ -372,7 +372,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Delete(context.Background(), deleteReq) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("Inserts with first-write-wins", func(t *testing.T) { @@ -389,7 +389,7 @@ func TestMySQLIntegration(t *testing.T) { } err := mys.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // Get the etag getResponse, _ := getItem(t, mys, key) @@ -407,7 +407,7 @@ func TestMySQLIntegration(t *testing.T) { } err = mys.Set(context.Background(), setReq) - assert.ErrorContains(t, err, "Duplicate entry") + require.ErrorContains(t, err, "Duplicate entry") // Insert with invalid etag should fail on existing keys setReq = &state.SetRequest{ @@ -420,7 +420,7 @@ func TestMySQLIntegration(t *testing.T) { } err = mys.Set(context.Background(), setReq) - assert.ErrorContains(t, err, "possible etag mismatch") + require.ErrorContains(t, err, "possible etag mismatch") // Insert with valid etag should succeed on existing keys setReq = &state.SetRequest{ @@ -433,7 +433,7 @@ func TestMySQLIntegration(t *testing.T) { } err = mys.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // Insert with an etag should fail on new keys setReq = &state.SetRequest{ @@ -446,7 +446,7 @@ func TestMySQLIntegration(t *testing.T) { } err = mys.Set(context.Background(), setReq) - assert.ErrorContains(t, err, "possible etag mismatch") + require.ErrorContains(t, err, "possible etag mismatch") }) t.Run("Multi with delete and set", func(t *testing.T) { @@ -481,7 +481,7 @@ func TestMySQLIntegration(t *testing.T) { err := mys.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -514,7 +514,7 @@ func TestMySQLIntegration(t *testing.T) { err := mys.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -538,7 +538,7 @@ func TestMySQLIntegration(t *testing.T) { err := mys.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, set := range setRequests { assert.True(t, storeItemExists(t, set.Key)) @@ -561,7 +561,7 @@ func testBulkSetAndBulkDelete(t *testing.T, mys *MySQL) { } err := mys.BulkSet(context.Background(), setReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, storeItemExists(t, setReq[0].Key)) assert.True(t, storeItemExists(t, setReq[1].Key)) @@ -575,14 +575,14 @@ func testBulkSetAndBulkDelete(t *testing.T, mys *MySQL) { } err = mys.BulkDelete(context.Background(), deleteReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, storeItemExists(t, setReq[0].Key)) assert.False(t, storeItemExists(t, setReq[1].Key)) } func testGetExpireTime(t *testing.T, mys *MySQL) { key1 := randomKey() - assert.NoError(t, mys.Set(context.Background(), &state.SetRequest{ + require.NoError(t, mys.Set(context.Background(), &state.SetRequest{ Key: key1, Value: "123", Metadata: map[string]string{ @@ -591,7 +591,7 @@ func testGetExpireTime(t *testing.T, mys *MySQL) { })) resp, err := mys.Get(context.Background(), &state.GetRequest{Key: key1}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, `"123"`, string(resp.Data)) require.Len(t, resp.Metadata, 1) expireTime, err := time.Parse(time.RFC3339, resp.Metadata["ttlExpireTime"]) @@ -603,14 +603,14 @@ func testGetBulkExpireTime(t *testing.T, mys *MySQL) { key1 := randomKey() key2 := randomKey() - assert.NoError(t, mys.Set(context.Background(), &state.SetRequest{ + require.NoError(t, mys.Set(context.Background(), &state.SetRequest{ Key: key1, Value: "123", Metadata: map[string]string{ "ttlInSeconds": "1000", }, })) - assert.NoError(t, mys.Set(context.Background(), &state.SetRequest{ + require.NoError(t, mys.Set(context.Background(), &state.SetRequest{ Key: key2, Value: "456", Metadata: map[string]string{ @@ -643,7 +643,7 @@ func dropTable(t *testing.T, db *sql.DB, tableName string) { _, err := db.Exec(fmt.Sprintf( `DROP TABLE %s;`, tableName)) - assert.NoError(t, err) + require.NoError(t, err) } func setItem(t *testing.T, mys *MySQL, key string, value interface{}, eTag *string) { @@ -654,7 +654,7 @@ func setItem(t *testing.T, mys *MySQL, key string, value interface{}, eTag *stri } err := mys.Set(context.Background(), setReq) - assert.Nil(t, err, "Error setting an item") + require.NoError(t, err, "Error setting an item") itemExists := storeItemExists(t, key) assert.True(t, itemExists, "Item does not exist after being set") } @@ -666,7 +666,7 @@ func getItem(t *testing.T, mys *MySQL, key string) (*state.GetResponse, *fakeIte } response, getErr := mys.Get(context.Background(), getReq) - assert.Nil(t, getErr) + require.NoError(t, getErr) assert.NotNil(t, response) outputObject := &fakeItem{} _ = json.Unmarshal(response.Data, outputObject) @@ -682,13 +682,13 @@ func deleteItem(t *testing.T, mys *MySQL, key string, eTag *string) { } deleteErr := mys.Delete(context.Background(), deleteReq) - assert.Nil(t, deleteErr, "There was an error deleting a record") + require.NoError(t, deleteErr, "There was an error deleting a record") assert.False(t, storeItemExists(t, key), "Item still exists after delete") } func storeItemExists(t *testing.T, key string) bool { db, err := connectToDB(t) - assert.NoError(t, err) + require.NoError(t, err) defer db.Close() exists := false @@ -696,20 +696,20 @@ func storeItemExists(t *testing.T, key string) bool { `SELECT EXISTS (SELECT * FROM %s WHERE id = ?)`, defaultTableName) err = db.QueryRow(statement, key).Scan(&exists) - assert.NoError(t, err) + require.NoError(t, err) return exists } func getRowData(t *testing.T, key string) (returnValue string, insertdate sql.NullString, updatedate sql.NullString, eTag string) { db, err := connectToDB(t) - assert.NoError(t, err) + require.NoError(t, err) defer db.Close() err = db.QueryRow(fmt.Sprintf( `SELECT value, insertdate, updatedate, eTag FROM %s WHERE id = ?`, defaultTableName), key).Scan(&returnValue, &insertdate, &updatedate, &eTag) - assert.NoError(t, err) + require.NoError(t, err) return returnValue, insertdate, updatedate, eTag } @@ -721,7 +721,7 @@ func connectToDB(t *testing.T) (*sql.DB, error) { rootCertPool := x509.NewCertPool() pem, readErr := os.ReadFile(val) - assert.Nil(t, readErr, "Could not read PEM file") + require.NoError(t, readErr, "Could not read PEM file") ok := rootCertPool.AppendCertsFromPEM(pem) diff --git a/state/mysql/mysql_test.go b/state/mysql/mysql_test.go index 707d51b9c9..4dadb24e98 100644 --- a/state/mysql/mysql_test.go +++ b/state/mysql/mysql_test.go @@ -27,6 +27,7 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -71,7 +72,7 @@ func TestFinishInitHandlesSchemaExistsError(t *testing.T) { actualErr := m.mySQL.finishInit(context.Background(), m.mySQL.db) // Assert - assert.Error(t, actualErr, "now error returned") + require.Error(t, actualErr, "now error returned") assert.Equal(t, "existsError", actualErr.Error(), "wrong error") } @@ -90,7 +91,7 @@ func TestFinishInitHandlesDatabaseCreateError(t *testing.T) { actualErr := m.mySQL.finishInit(context.Background(), m.mySQL.db) // Assert - assert.Error(t, actualErr, "now error returned") + require.Error(t, actualErr, "now error returned") assert.Equal(t, "createDatabaseError", actualErr.Error(), "wrong error") } @@ -114,7 +115,7 @@ func TestFinishInitHandlesPingError(t *testing.T) { actualErr := m.mySQL.finishInit(context.Background(), m.mySQL.db) // Assert - assert.NotNil(t, actualErr, "now error returned") + require.Error(t, actualErr, "now error returned") assert.Equal(t, "pingError", actualErr.Error(), "wrong error") } @@ -142,7 +143,7 @@ func TestFinishInitHandlesTableExistsError(t *testing.T) { err := m.mySQL.finishInit(context.Background(), m.mySQL.db) // Assert - assert.NotNil(t, err, "no error returned") + require.Error(t, err, "no error returned") assert.Equal(t, "tableExistsError", err.Error(), "tableExists did not return err") } @@ -156,7 +157,7 @@ func TestClosingDatabaseTwiceReturnsNil(t *testing.T) { err := m.mySQL.Close() // Assert - assert.Nil(t, err, "error returned") + require.NoError(t, err, "error returned") } func TestMultiCannotBeginTransaction(t *testing.T) { @@ -170,7 +171,7 @@ func TestMultiCannotBeginTransaction(t *testing.T) { err := m.mySQL.Multi(context.Background(), nil) // Assert - assert.NotNil(t, err, "no error returned") + require.Error(t, err, "no error returned") assert.Equal(t, "beginError", err.Error(), "wrong error returned") } @@ -196,7 +197,7 @@ func TestMultiCommitSetsAndDeletes(t *testing.T) { err := m.mySQL.Multi(context.Background(), &request) // Assert - assert.NoError(t, err, "error returned") + require.NoError(t, err, "error returned") } func TestSetHandlesOptionsError(t *testing.T) { @@ -212,7 +213,7 @@ func TestSetHandlesOptionsError(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestSetHandlesNoKey(t *testing.T) { @@ -227,7 +228,7 @@ func TestSetHandlesNoKey(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "missing key in set operation", err.Error(), "wrong error returned") } @@ -247,7 +248,7 @@ func TestSetHandlesUpdate(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestSetHandlesErr(t *testing.T) { @@ -263,7 +264,7 @@ func TestSetHandlesErr(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "error", err.Error()) }) @@ -275,7 +276,7 @@ func TestSetHandlesErr(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("no rows effected error", func(t *testing.T) { @@ -289,9 +290,9 @@ func TestSetHandlesErr(t *testing.T) { err := m.mySQL.Set(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.IsType(t, &state.ETagError{}, err) - assert.Equal(t, err.(*state.ETagError).Kind(), state.ETagMismatch) + assert.Equal(t, state.ETagMismatch, err.(*state.ETagError).Kind()) }) } @@ -306,7 +307,7 @@ func TestMySQLDeleteHandlesNoKey(t *testing.T) { err := m.mySQL.Delete(context.Background(), &request) // Asset - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "missing key in delete operation", err.Error(), "wrong error returned") } @@ -325,7 +326,7 @@ func TestDeleteWithETag(t *testing.T) { err := m.mySQL.Delete(context.Background(), &request) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestDeleteWithErr(t *testing.T) { @@ -342,7 +343,7 @@ func TestDeleteWithErr(t *testing.T) { err := m.mySQL.Delete(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "error", err.Error()) }) @@ -357,9 +358,9 @@ func TestDeleteWithErr(t *testing.T) { err := m.mySQL.Delete(context.Background(), &request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.IsType(t, &state.ETagError{}, err) - assert.Equal(t, err.(*state.ETagError).Kind(), state.ETagMismatch) + assert.Equal(t, state.ETagMismatch, err.(*state.ETagError).Kind()) }) } @@ -378,7 +379,7 @@ func TestGetHandlesNoRows(t *testing.T) { response, err := m.mySQL.Get(context.Background(), request) // Assert - assert.NoError(t, err, "returned error") + require.NoError(t, err, "returned error") assert.NotNil(t, response, "did not return empty response") } @@ -395,7 +396,7 @@ func TestGetHandlesNoKey(t *testing.T) { response, err := m.mySQL.Get(context.Background(), request) // Assert - assert.Error(t, err, "returned error") + require.Error(t, err, "returned error") assert.Equal(t, "missing key in get operation", err.Error(), "wrong error returned") assert.Nil(t, response, "returned response") } @@ -415,7 +416,7 @@ func TestGetHandlesGenericError(t *testing.T) { response, err := m.mySQL.Get(context.Background(), request) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, response) } @@ -436,7 +437,7 @@ func TestGetSucceeds(t *testing.T) { response, err := m.mySQL.Get(context.Background(), request) // Assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, response) assert.Equal(t, "{}", string(response.Data)) assert.NotContains(t, response.Metadata, state.GetRespMetaKeyTTLExpireTime) @@ -457,7 +458,7 @@ func TestGetSucceeds(t *testing.T) { response, err := m.mySQL.Get(context.Background(), request) // Assert - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, response) assert.Equal(t, "abcdefg", string(response.Data)) assert.Contains(t, response.Metadata, state.GetRespMetaKeyTTLExpireTime) @@ -481,7 +482,7 @@ func TestTableExists(t *testing.T) { actual, err := tableExists(context.Background(), m.mySQL.db, "dapr_state_store", "store", 10*time.Second) // Assert - assert.Nil(t, err, `error was returned`) + require.NoError(t, err, `error was returned`) assert.True(t, actual, `table does not exists`) } @@ -499,7 +500,7 @@ func TestEnsureStateTableHandlesCreateTableError(t *testing.T) { err := m.mySQL.ensureStateTable(context.Background(), "dapr_state_store", "state") // Assert - assert.NotNil(t, err, "no error returned") + require.Error(t, err, "no error returned") assert.Equal(t, "CreateTableError", err.Error(), "wrong error returned") } @@ -523,7 +524,7 @@ func TestEnsureStateTableCreatesTable(t *testing.T) { err := m.mySQL.ensureStateTable(context.Background(), "dapr_state_store", "state") // Assert - assert.NoError(t, err) + require.NoError(t, err) } // Verify that the call to MySQL init get passed through @@ -540,7 +541,7 @@ func TestInitReturnsErrorOnNoConnectionString(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, defaultTableName, m.mySQL.tableName, "table name did not default") } @@ -557,7 +558,7 @@ func TestInitReturnsErrorOnFailOpen(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestInitHandlesRegisterTLSConfigError(t *testing.T) { @@ -580,7 +581,7 @@ func TestInitHandlesRegisterTLSConfigError(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "registerTLSConfigError", err.Error(), "wrong error") } @@ -596,7 +597,7 @@ func TestInitSetsTableName(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "stateStore", m.mySQL.tableName, "table name did not default") } @@ -612,7 +613,7 @@ func TestInitInvalidTableName(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.ErrorContains(t, err, "table name '🙃' is not valid") + require.ErrorContains(t, err, "table name '🙃' is not valid") } func TestInitSetsSchemaName(t *testing.T) { @@ -627,7 +628,7 @@ func TestInitSetsSchemaName(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, "stateStoreSchema", m.mySQL.schemaName, "table name did not default") } @@ -643,7 +644,7 @@ func TestInitInvalidSchemaName(t *testing.T) { err := m.mySQL.Init(context.Background(), *metadata) // Assert - assert.ErrorContains(t, err, "schema name '?' is not valid") + require.ErrorContains(t, err, "schema name '?' is not valid") } func TestMultiWithNoRequestsDoesNothing(t *testing.T) { @@ -662,7 +663,7 @@ func TestMultiWithNoRequestsDoesNothing(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestClosingMySQLWithNilDba(t *testing.T) { @@ -677,7 +678,7 @@ func TestClosingMySQLWithNilDba(t *testing.T) { err := m.mySQL.Close() // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestValidSetRequest(t *testing.T) { @@ -698,7 +699,7 @@ func TestValidSetRequest(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestInvalidMultiSetRequestNoKey(t *testing.T) { @@ -719,7 +720,7 @@ func TestInvalidMultiSetRequestNoKey(t *testing.T) { }) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestValidMultiDeleteRequest(t *testing.T) { @@ -740,7 +741,7 @@ func TestValidMultiDeleteRequest(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) } func TestInvalidMultiDeleteRequestNoKey(t *testing.T) { @@ -760,7 +761,7 @@ func TestInvalidMultiDeleteRequestNoKey(t *testing.T) { }) // Assert - assert.Error(t, err) + require.Error(t, err) } func TestMultiOperationOrder(t *testing.T) { @@ -789,10 +790,10 @@ func TestMultiOperationOrder(t *testing.T) { }) // Assert - assert.NoError(t, err) + require.NoError(t, err) err = m.mock1.ExpectationsWereMet() - assert.NoError(t, err) + require.NoError(t, err) } func createSetRequest() state.SetRequest { diff --git a/state/oci/objectstorage/objectstorage_integration_test.go b/state/oci/objectstorage/objectstorage_integration_test.go index 224f48466f..5ae2317eeb 100644 --- a/state/oci/objectstorage/objectstorage_integration_test.go +++ b/state/oci/objectstorage/objectstorage_integration_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" "github.com/dapr/kit/logger" @@ -88,65 +89,65 @@ func testGet(t *testing.T, ociProperties map[string]string) { t.Run("Get an non-existing key", func(t *testing.T) { err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: "xyzq"}) assert.Equal(t, &state.GetResponse{}, getResponse, "Response must be empty") - assert.NoError(t, err, "Non-existing key must not be treated as error") + require.NoError(t, err, "Non-existing key must not be treated as error") }) t.Run("Get an existing key", func(t *testing.T) { err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: "test-key", Value: []byte("test-value")}) - assert.Nil(t, err) + require.NoError(t, err) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: "test-key"}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal to value set") assert.NotNil(t, *getResponse.ETag, "ETag should be set") }) t.Run("Get an existing composed key", func(t *testing.T) { err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: "test-app||test-key", Value: []byte("test-value")}) - assert.Nil(t, err) + require.NoError(t, err) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: "test-app||test-key"}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal to value set") }) t.Run("Get an unexpired state element with TTL set", func(t *testing.T) { testKey := "unexpired-ttl-test-key" err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "100", })}) - assert.Nil(t, err) + require.NoError(t, err) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal to value set despite TTL setting") }) t.Run("Get a state element with TTL set to -1 (not expire)", func(t *testing.T) { testKey := "never-expiring-ttl-test-key" err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "-1", })}) - assert.Nil(t, err) + require.NoError(t, err) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal (TTL setting of -1 means never expire)") }) t.Run("Get an expired (TTL in the past) state element", func(t *testing.T) { err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: "ttl-test-key", Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "1", })}) - assert.Nil(t, err) + require.NoError(t, err) time.Sleep(time.Second * 2) getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: "ttl-test-key"}) assert.Equal(t, &state.GetResponse{}, getResponse, "Response must be empty") - assert.NoError(t, err, "Expired element must not be treated as error") + require.NoError(t, err, "Expired element must not be treated as error") }) } @@ -156,31 +157,31 @@ func testSet(t *testing.T, ociProperties map[string]string) { statestore := NewOCIObjectStorageStore(logger.NewLogger("logger")) t.Run("Set without a key", func(t *testing.T) { err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Value: []byte("test-value")}) assert.Equal(t, err, fmt.Errorf("key for value to set was missing from request"), "Lacking Key results in error") }) t.Run("Regular Set Operation", func(t *testing.T) { testKey := "local-test-key" err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper key should be errorfree") + require.NoError(t, err, "Setting a value with a proper key should be errorfree") getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal to value set") assert.NotNil(t, *getResponse.ETag, "ETag should be set") }) t.Run("Regular Set Operation with composite key", func(t *testing.T) { testKey := "test-app||other-test-key" err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper composite key should be errorfree") + require.NoError(t, err, "Setting a value with a proper composite key should be errorfree") getResponse, err := statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, "test-value", string(getResponse.Data), "Value retrieved should be equal to value set") assert.NotNil(t, *getResponse.ETag, "ETag should be set") }) @@ -189,31 +190,31 @@ func testSet(t *testing.T, ociProperties map[string]string) { err := statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "500", })}) - assert.Nil(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") + require.NoError(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "XXX", })}) - assert.NotNil(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") }) t.Run("Testing Set & Concurrency (ETags)", func(t *testing.T) { testKey := "etag-test-key" err := statestore.Init(context.Background(), meta) - assert.Nil(t, err) + require.NoError(t, err) err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper key should be errorfree") + require.NoError(t, err, "Setting a value with a proper key should be errorfree") getResponse, _ := statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) etag := getResponse.ETag err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("overwritten-value"), ETag: etag, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.Nil(t, err, "Updating value with proper etag should go fine") + require.NoError(t, err, "Updating value with proper etag should go fine") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("more-overwritten-value"), ETag: etag, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Updating value with the old etag should be refused") + require.Error(t, err, "Updating value with the old etag should be refused") // retrieve the latest etag - assigned by the previous set operation. getResponse, _ = statestore.Get(context.Background(), &state.GetRequest{Key: testKey}) @@ -222,7 +223,7 @@ func testSet(t *testing.T, ociProperties map[string]string) { err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("more-overwritten-value"), ETag: etag, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.Nil(t, err, "Updating value with the latest etag should be accepted") + require.NoError(t, err, "Updating value with the latest etag should be accepted") }) } @@ -232,29 +233,29 @@ func testDelete(t *testing.T, ociProperties map[string]string) { s := NewOCIObjectStorageStore(logger.NewLogger("logger")) t.Run("Delete without a key", func(t *testing.T) { err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) err = s.Delete(context.Background(), &state.DeleteRequest{}) assert.Equal(t, err, fmt.Errorf("key for value to delete was missing from request"), "Lacking Key results in error") }) t.Run("Regular Delete Operation", func(t *testing.T) { testKey := "test-key" err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) err = s.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper key should be errorfree") + require.NoError(t, err, "Setting a value with a proper key should be errorfree") err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey}) - assert.Nil(t, err, "Deleting an existing value with a proper key should be errorfree") + require.NoError(t, err, "Deleting an existing value with a proper key should be errorfree") }) t.Run("Regular Delete Operation for composite key", func(t *testing.T) { testKey := "test-app||some-test-key" err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) err = s.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper composite key should be errorfree") + require.NoError(t, err, "Setting a value with a proper composite key should be errorfree") err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey}) - assert.Nil(t, err, "Deleting an existing value with a proper composite key should be errorfree") + require.NoError(t, err, "Deleting an existing value with a proper composite key should be errorfree") }) t.Run("Delete with an unknown key", func(t *testing.T) { err := s.Delete(context.Background(), &state.DeleteRequest{Key: "unknownKey"}) @@ -264,10 +265,10 @@ func testDelete(t *testing.T, ociProperties map[string]string) { t.Run("Testing Delete & Concurrency (ETags)", func(t *testing.T) { testKey := "etag-test-delete-key" err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) // create document. err = s.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper key should be errorfree") + require.NoError(t, err, "Setting a value with a proper key should be errorfree") getResponse, _ := s.Get(context.Background(), &state.GetRequest{Key: testKey}) etag := getResponse.ETag @@ -275,12 +276,12 @@ func testDelete(t *testing.T, ociProperties map[string]string) { err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey, ETag: &incorrectETag, Options: state.DeleteStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Deleting value with an incorrect etag should be prevented") + require.Error(t, err, "Deleting value with an incorrect etag should be prevented") err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey, ETag: etag, Options: state.DeleteStateOption{ Concurrency: state.FirstWrite, }}) - assert.Nil(t, err, "Deleting value with proper etag should go fine") + require.NoError(t, err, "Deleting value with proper etag should go fine") }) } @@ -290,8 +291,8 @@ func testPing(t *testing.T, ociProperties map[string]string) { s := NewOCIObjectStorageStore(logger.NewLogger("logger")).(*StateStore) t.Run("Ping", func(t *testing.T) { err := s.Init(context.Background(), m) - assert.Nil(t, err) + require.NoError(t, err) err = s.Ping(context.Background()) - assert.Nil(t, err, "Ping should be successful") + require.NoError(t, err, "Ping should be successful") }) } diff --git a/state/oci/objectstorage/objectstorage_test.go b/state/oci/objectstorage/objectstorage_test.go index d389807b5f..5f40a6ec00 100644 --- a/state/oci/objectstorage/objectstorage_test.go +++ b/state/oci/objectstorage/objectstorage_test.go @@ -21,6 +21,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" "github.com/dapr/kit/logger" @@ -45,57 +46,57 @@ func TestInit(t *testing.T) { t.Run("Init with beautifully complete yet incorrect metadata", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) - assert.Error(t, err, "Incorrect configuration data should result in failure to create client") + require.Error(t, err) + require.Error(t, err, "Incorrect configuration data should result in failure to create client") assert.Contains(t, err.Error(), "failed to initialize client", "Incorrect configuration data should result in failure to create client") }) t.Run("Init with missing region", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[regionKey] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty region field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with missing tenancyOCID", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties["tenancyOCID"] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty tenancyOCID field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with missing userOCID", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[userKey] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty userOCID field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with missing compartmentOCID", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[compartmentKey] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty compartmentOCID field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with missing fingerprint", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[fingerPrintKey] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty fingerPrint field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with missing private key", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[privateKeyKey] = "" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err) + require.Error(t, err) assert.Equal(t, fmt.Errorf("missing or empty privateKey field from metadata"), err, "Lacking configuration property should be spotted") }) t.Run("Init with incorrect value for instancePrincipalAuthentication", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() meta.Properties[instancePrincipalAuthenticationKey] = "ZQWE" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err, "if instancePrincipalAuthentication is defined, it should be true or false; if not: error should be raised ") + require.Error(t, err, "if instancePrincipalAuthentication is defined, it should be true or false; if not: error should be raised ") }) t.Run("Init with missing fingerprint with instancePrincipalAuthentication", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() @@ -111,7 +112,7 @@ func TestInit(t *testing.T) { meta.Properties[configFileAuthenticationKey] = "true" meta.Properties[configFilePathKey] = "file_does_not_exist" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err, "if configFileAuthentication is true and configFilePath does not indicate an existing file, then an error should be produced") + require.Error(t, err, "if configFileAuthentication is true and configFilePath does not indicate an existing file, then an error should be produced") if err != nil { assert.Contains(t, err.Error(), "does not exist", "if configFileAuthentication is true and configFilePath does not indicate an existing file, then an error should be produced that indicates this") } @@ -121,7 +122,7 @@ func TestInit(t *testing.T) { meta.Properties[configFileAuthenticationKey] = "true" meta.Properties[configFilePathKey] = "~/some-file" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err, "if configFileAuthentication is true and configFilePath contains a value that starts with ~/ , then an error should be produced") + require.Error(t, err, "if configFileAuthentication is true and configFilePath contains a value that starts with ~/ , then an error should be produced") if err != nil { assert.Contains(t, err.Error(), "~", "if configFileAuthentication is true and configFilePath starts with ~/, then an error should be produced that indicates this") } @@ -131,7 +132,7 @@ func TestInit(t *testing.T) { meta.Properties[fingerPrintKey] = "" meta.Properties[instancePrincipalAuthenticationKey] = "false" err := statestore.Init(context.Background(), meta) - assert.NotNil(t, err, "if instancePrincipalAuthentication and configFileAuthentication are both false, then fingerprint is required and an error should be raised when it is missing") + require.Error(t, err, "if instancePrincipalAuthentication and configFileAuthentication are both false, then fingerprint is required and an error should be raised when it is missing") }) t.Run("Init with missing fingerprint with configFileAuthentication", func(t *testing.T) { meta.Properties = getDummyOCIObjectStorageConfiguration() @@ -158,7 +159,7 @@ func TestGetObjectStorageMetadata(t *testing.T) { t.Parallel() t.Run("Test getObjectStorageMetadata with full properties map", func(t *testing.T) { meta, err := getObjectStorageMetadata(getDummyOCIObjectStorageConfiguration()) - assert.Nil(t, err, "No error expected in clean property set") + require.NoError(t, err, "No error expected in clean property set") assert.Equal(t, getDummyOCIObjectStorageConfiguration()["region"], meta.Region, "Region in object storage metadata should match region in properties") }) t.Run("Test getObjectStorageMetadata with incomplete property set", func(t *testing.T) { @@ -166,7 +167,7 @@ func TestGetObjectStorageMetadata(t *testing.T) { "region": "xxxus-ashburn-1", } _, err := getObjectStorageMetadata(properties) - assert.NotNil(t, err, "Error expected with incomplete property set") + require.Error(t, err, "Error expected with incomplete property set") }) } @@ -239,22 +240,22 @@ func TestGetWithMockClient(t *testing.T) { assert.True(t, mockClient.getIsCalled, "function Get should be invoked on the mockClient") assert.Equal(t, "Hello World", string(getResponse.Data), "Value retrieved should be equal to value set") assert.NotNil(t, *getResponse.ETag, "ETag should be set") - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Test Get with composite key", func(t *testing.T) { getResponse, err := s.Get(context.Background(), &state.GetRequest{Key: "test-app||test-key"}) assert.Equal(t, "Hello Continent", string(getResponse.Data), "Value retrieved should be equal to value set") - assert.Nil(t, err) + require.NoError(t, err) }) t.Run("Test Get with an unknown key", func(t *testing.T) { getResponse, err := s.Get(context.Background(), &state.GetRequest{Key: "unknownKey"}) assert.Nil(t, getResponse.Data, "No value should be retrieved for an unknown key") - assert.Nil(t, err, "404", "Not finding an object because of unknown key should not result in an error") + require.NoError(t, err, "404", "Not finding an object because of unknown key should not result in an error") }) t.Run("Test expired element (because of TTL) ", func(t *testing.T) { getResponse, err := s.Get(context.Background(), &state.GetRequest{Key: "test-expired-ttl-key"}) assert.Nil(t, getResponse.Data, "No value should be retrieved for an expired state element") - assert.Nil(t, err, "Not returning an object because of expiration should not result in an error") + require.NoError(t, err, "Not returning an object because of expiration should not result in an error") }) } @@ -265,7 +266,7 @@ func TestInitWithMockClient(t *testing.T) { meta := state.Metadata{} t.Run("Test Init with incomplete configuration", func(t *testing.T) { err := s.Init(context.Background(), meta) - assert.NotNil(t, err, "Init should complain about lacking configuration settings") + require.Error(t, err, "Init should complain about lacking configuration settings") }) } @@ -277,7 +278,7 @@ func TestPingWithMockClient(t *testing.T) { t.Run("Test Ping", func(t *testing.T) { err := s.Ping(context.Background()) - assert.Nil(t, err) + require.NoError(t, err) assert.True(t, mockClient.pingBucketIsCalled, "function pingBucket should be invoked on the mockClient") }) } @@ -294,7 +295,7 @@ func TestSetWithMockClient(t *testing.T) { t.Run("Regular Set Operation", func(t *testing.T) { testKey := "test-key" err := statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value")}) - assert.Nil(t, err, "Setting a value with a proper key should be errorfree") + require.NoError(t, err, "Setting a value with a proper key should be errorfree") assert.True(t, mockClient.putIsCalled, "function put should be invoked on the mockClient") }) t.Run("Regular Set Operation with TTL", func(t *testing.T) { @@ -302,17 +303,17 @@ func TestSetWithMockClient(t *testing.T) { err := statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "5", })}) - assert.Nil(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") + require.NoError(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "XXX", })}) - assert.NotNil(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("test-value"), Metadata: (map[string]string{ "ttlInSeconds": "1", })}) - assert.Nil(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") + require.NoError(t, err, "Setting a value with a proper key and a correct TTL value should be errorfree") }) t.Run("Testing Set & Concurrency (ETags)", func(t *testing.T) { testKey := "etag-test-key" @@ -322,22 +323,22 @@ func TestSetWithMockClient(t *testing.T) { err := statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("overwritten-value"), ETag: &incorrectETag, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Updating value with wrong etag should fail") + require.Error(t, err, "Updating value with wrong etag should fail") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("overwritten-value"), ETag: nil, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Asking for FirstWrite concurrency policy without ETag should fail") + require.Error(t, err, "Asking for FirstWrite concurrency policy without ETag should fail") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("overwritten-value"), ETag: &etag, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.Nil(t, err, "Updating value with proper etag should go fine") + require.NoError(t, err, "Updating value with proper etag should go fine") err = statestore.Set(context.Background(), &state.SetRequest{Key: testKey, Value: []byte("overwritten-value"), ETag: nil, Options: state.SetStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Updating value with concurrency policy at FirstWrite should fail when ETag is missing") + require.Error(t, err, "Updating value with concurrency policy at FirstWrite should fail when ETag is missing") }) } @@ -357,7 +358,7 @@ func TestDeleteWithMockClient(t *testing.T) { t.Run("Regular Delete Operation", func(t *testing.T) { testKey := "test-key" err := s.Delete(context.Background(), &state.DeleteRequest{Key: testKey}) - assert.Nil(t, err, "Deleting an existing value with a proper key should be errorfree") + require.NoError(t, err, "Deleting an existing value with a proper key should be errorfree") assert.True(t, mockClient.deleteIsCalled, "function delete should be invoked on the mockClient") }) t.Run("Testing Delete & Concurrency (ETags)", func(t *testing.T) { @@ -366,18 +367,18 @@ func TestDeleteWithMockClient(t *testing.T) { err := s.Delete(context.Background(), &state.DeleteRequest{Key: testKey, ETag: &incorrectETag, Options: state.DeleteStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Deleting value with an incorrect etag should be prevented") + require.Error(t, err, "Deleting value with an incorrect etag should be prevented") etag := "correctETag" err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey, ETag: &etag, Options: state.DeleteStateOption{ Concurrency: state.FirstWrite, }}) - assert.Nil(t, err, "Deleting value with proper etag should go fine") + require.NoError(t, err, "Deleting value with proper etag should go fine") err = s.Delete(context.Background(), &state.DeleteRequest{Key: testKey, ETag: nil, Options: state.DeleteStateOption{ Concurrency: state.FirstWrite, }}) - assert.NotNil(t, err, "Asking for FirstWrite concurrency policy without ETag should fail") + require.Error(t, err, "Asking for FirstWrite concurrency policy without ETag should fail") }) } diff --git a/state/oracledatabase/oracledatabase_integration_test.go b/state/oracledatabase/oracledatabase_integration_test.go index 5dad3b6c5a..a4db0c528b 100644 --- a/state/oracledatabase/oracledatabase_integration_test.go +++ b/state/oracledatabase/oracledatabase_integration_test.go @@ -323,7 +323,7 @@ func deleteWithInvalidEtagFails(t *testing.T, ods state.Store) { }, } err := ods.Delete(context.Background(), deleteReq) - assert.Error(t, err, "Deleting an item with the wrong etag while enforcing FirstWrite policy should fail") + require.Error(t, err, "Deleting an item with the wrong etag while enforcing FirstWrite policy should fail") } func deleteWithNoKeyFails(t *testing.T, ods state.Store) { @@ -331,7 +331,7 @@ func deleteWithNoKeyFails(t *testing.T, ods state.Store) { Key: "", } err := ods.Delete(context.Background(), deleteReq) - assert.Error(t, err) + require.Error(t, err) } // newItemWithEtagFails creates a new item and also supplies a non existent ETag and requests FirstWrite, which is invalid - expect failure. @@ -349,7 +349,7 @@ func newItemWithEtagFails(t *testing.T, ods state.Store) { } err := ods.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func updateWithOldEtagFails(t *testing.T, ods state.Store) { @@ -379,7 +379,7 @@ func updateWithOldEtagFails(t *testing.T, ods state.Store) { }, } err := ods.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func updateAndDeleteWithEtagSucceeds(t *testing.T, ods state.Store) { @@ -440,7 +440,7 @@ func getItemWithNoKey(t *testing.T, ods state.Store) { } response, getErr := ods.Get(context.Background(), getReq) - assert.NotNil(t, getErr) + require.Error(t, getErr) assert.Nil(t, response) } @@ -496,7 +496,8 @@ func setTTLUpdatesExpiry(t *testing.T, ods state.Store) { require.NoError(t, err) assert.Contains(t, resp.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, resp.Metadata["ttlExpireTime"]) - _ = assert.NoError(t, err) && assert.InDelta(t, time.Now().Add(time.Second*1000).Unix(), expireTime.Unix(), 10) + require.NoError(t, err) + assert.InDelta(t, time.Now().Add(time.Second*1000).Unix(), expireTime.Unix(), 10) deleteItem(t, ods, key, nil) } @@ -528,7 +529,7 @@ func setNoTTLUpdatesExpiry(t *testing.T, ods state.Store) { require.NoError(t, err) assert.NotContains(t, resp.Metadata, "ttlExpireTime") - assert.True(t, !expirationTime.Valid, "Expiration Time should not have a value after first being set with TTL value and then being set without TTL value") + assert.False(t, expirationTime.Valid, "Expiration Time should not have a value after first being set with TTL value and then being set without TTL value") deleteItem(t, ods, key, nil) } @@ -552,7 +553,7 @@ func expiredStateCannotBeRead(t *testing.T, ods state.Store) { time.Sleep(time.Second * time.Duration(2)) getResponse, err := ods.Get(context.Background(), &state.GetRequest{Key: key}) assert.Equal(t, &state.GetResponse{}, getResponse, "Response must be empty") - assert.NoError(t, err, "Expired element must not be treated as error") + require.NoError(t, err, "Expired element must not be treated as error") deleteItem(t, ods, key, nil) } @@ -575,7 +576,7 @@ func unexpiredStateCanBeRead(t *testing.T, ods state.Store) { require.NoError(t, err) _, getValue := getItem(t, ods, key) assert.Equal(t, value.Color, getValue.Color, "Response must be as set") - assert.NoError(t, err, "Unexpired element with future expiration time must not be treated as error") + require.NoError(t, err, "Unexpired element with future expiration time must not be treated as error") deleteItem(t, ods, key, nil) } @@ -586,7 +587,7 @@ func setItemWithNoKey(t *testing.T, ods state.Store) { } err := ods.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func testSetItemWithInvalidTTL(t *testing.T, ods state.Store) { @@ -598,7 +599,7 @@ func testSetItemWithInvalidTTL(t *testing.T, ods state.Store) { }), } err := ods.Set(context.Background(), setReq) - assert.Error(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") } func testSetItemWithNegativeTTL(t *testing.T, ods state.Store) { @@ -610,7 +611,7 @@ func testSetItemWithNegativeTTL(t *testing.T, ods state.Store) { }), } err := ods.Set(context.Background(), setReq) - assert.NotNil(t, err, "Setting a value with a proper key and a negative (other than -1) TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a negative (other than -1) TTL value should be produce an error") } // Tests valid bulk sets and deletes. @@ -681,8 +682,8 @@ func testInitConfiguration(t *testing.T) { if tt.expectedErr == "" { require.NoError(t, err) } else { - assert.Error(t, err) - assert.Equal(t, err.Error(), tt.expectedErr) + require.Error(t, err) + assert.Equal(t, tt.expectedErr, err.Error()) } }) } diff --git a/state/oracledatabase/oracledatabase_test.go b/state/oracledatabase/oracledatabase_test.go index 5eab824e63..3e91a03861 100644 --- a/state/oracledatabase/oracledatabase_test.go +++ b/state/oracledatabase/oracledatabase_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -90,7 +91,7 @@ func TestMultiWithNoRequestsReturnsNil(t *testing.T) { err := ods.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) } func TestValidSetRequest(t *testing.T) { @@ -102,7 +103,7 @@ func TestValidSetRequest(t *testing.T) { createSetRequest(), }, }) - assert.NoError(t, err) + require.NoError(t, err) } func TestValidMultiDeleteRequest(t *testing.T) { @@ -114,7 +115,7 @@ func TestValidMultiDeleteRequest(t *testing.T) { createDeleteRequest(), }, }) - assert.NoError(t, err) + require.NoError(t, err) } func createSetRequest() state.SetRequest { @@ -160,7 +161,7 @@ func createOracleDatabase(t *testing.T) *OracleDatabase { err := odb.Init(context.Background(), *metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, odb.dbaccess) return odb diff --git a/state/postgresql/postgresql_integration_test.go b/state/postgresql/postgresql_integration_test.go index cb77fe4642..6b0e886bb3 100644 --- a/state/postgresql/postgresql_integration_test.go +++ b/state/postgresql/postgresql_integration_test.go @@ -166,7 +166,7 @@ func deleteItemThatDoesNotExist(t *testing.T, pgs *postgresql.PostgreSQL) { Key: randomKey(), } err := pgs.Delete(context.Background(), deleteReq) - assert.NoError(t, err) + require.NoError(t, err) } func multiWithSetOnly(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -184,7 +184,7 @@ func multiWithSetOnly(t *testing.T, pgs *postgresql.PostgreSQL) { err := pgs.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, set := range setRequests { assert.True(t, storeItemExists(t, set.Key)) @@ -211,7 +211,7 @@ func multiWithDeleteOnly(t *testing.T, pgs *postgresql.PostgreSQL) { err := pgs.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -248,7 +248,7 @@ func multiWithDeleteAndSet(t *testing.T, pgs *postgresql.PostgreSQL) { err := pgs.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, delete.Key)) @@ -273,7 +273,7 @@ func deleteWithInvalidEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { ETag: &etag, } err := pgs.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) } func deleteWithNoKeyFails(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -281,7 +281,7 @@ func deleteWithNoKeyFails(t *testing.T, pgs *postgresql.PostgreSQL) { Key: "", } err := pgs.Delete(context.Background(), deleteReq) - assert.NotNil(t, err) + require.Error(t, err) } // newItemWithEtagFails creates a new item and also supplies an ETag, which is invalid - expect failure. @@ -296,7 +296,7 @@ func newItemWithEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } func updateWithOldEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -322,7 +322,7 @@ func updateWithOldEtagFails(t *testing.T, pgs *postgresql.PostgreSQL) { Value: newValue, } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } func updateAndDeleteWithEtagSucceeds(t *testing.T, pgs *postgresql.PostgreSQL) { @@ -364,7 +364,7 @@ func getItemWithNoKey(t *testing.T, pgs *postgresql.PostgreSQL) { } response, getErr := pgs.Get(context.Background(), getReq) - assert.NotNil(t, getErr) + require.Error(t, getErr) assert.Nil(t, response) } @@ -396,7 +396,7 @@ func setItemWithNoKey(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.Set(context.Background(), setReq) - assert.NotNil(t, err) + require.Error(t, err) } // Tests valid bulk sets and deletes. @@ -413,7 +413,7 @@ func testBulkSetAndBulkDelete(t *testing.T, pgs *postgresql.PostgreSQL) { } err := pgs.BulkSet(context.Background(), setReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, storeItemExists(t, setReq[0].Key)) assert.True(t, storeItemExists(t, setReq[1].Key)) @@ -427,7 +427,7 @@ func testBulkSetAndBulkDelete(t *testing.T, pgs *postgresql.PostgreSQL) { } err = pgs.BulkDelete(context.Background(), deleteReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, storeItemExists(t, setReq[0].Key)) assert.False(t, storeItemExists(t, setReq[1].Key)) } @@ -463,10 +463,10 @@ func testInitConfiguration(t *testing.T) { err := p.Init(context.Background(), metadata) if tt.expectedErr == nil { - assert.NoError(t, err) + require.NoError(t, err) } else { - assert.Error(t, err) - assert.Equal(t, err, tt.expectedErr) + require.Error(t, err) + assert.Equal(t, tt.expectedErr, err) } }) } @@ -484,7 +484,7 @@ func setItem(t *testing.T, pgs *postgresql.PostgreSQL, key string, value interfa } err := pgs.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) itemExists := storeItemExists(t, key) assert.True(t, itemExists) } @@ -496,7 +496,7 @@ func getItem(t *testing.T, pgs *postgresql.PostgreSQL, key string) (*state.GetRe } response, getErr := pgs.Get(context.Background(), getReq) - assert.Nil(t, getErr) + require.NoError(t, getErr) assert.NotNil(t, response) outputObject := &fakeItem{} _ = json.Unmarshal(response.Data, outputObject) @@ -512,7 +512,7 @@ func deleteItem(t *testing.T, pgs *postgresql.PostgreSQL, key string, etag *stri } deleteErr := pgs.Delete(context.Background(), deleteReq) - assert.Nil(t, deleteErr) + require.NoError(t, deleteErr) assert.False(t, storeItemExists(t, key)) } @@ -525,7 +525,7 @@ func storeItemExists(t *testing.T, key string) bool { exists := false statement := `SELECT EXISTS (SELECT FROM state WHERE key = $1)` err = db.QueryRow(ctx, statement, key).Scan(&exists) - assert.NoError(t, err) + require.NoError(t, err) return exists } @@ -538,7 +538,7 @@ func getRowData(t *testing.T, key string) (returnValue string, insertdate *time. err = db.QueryRow(ctx, "SELECT value, insertdate, updatedate FROM state WHERE key = $1", key). Scan(&returnValue, &insertdate, &updatedate) - assert.NoError(t, err) + require.NoError(t, err) return returnValue, insertdate, updatedate } diff --git a/state/query/query_test.go b/state/query/query_test.go index 15422708f6..da5ae8bde5 100644 --- a/state/query/query_test.go +++ b/state/query/query_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestQuery(t *testing.T) { @@ -133,10 +134,10 @@ func TestQuery(t *testing.T) { } for _, test := range tests { data, err := os.ReadFile(test.input) - assert.NoError(t, err) + require.NoError(t, err) var q Query err = json.Unmarshal(data, &q) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, test.query, q) } } diff --git a/state/redis/redis_query.go b/state/redis/redis_query.go index 251d5c5f1b..a61f77afa6 100644 --- a/state/redis/redis_query.go +++ b/state/redis/redis_query.go @@ -179,10 +179,10 @@ func (q *Query) Finalize(filters string, qq *query.Query) error { if err != nil { return err } - q.query = append(q.query, "LIMIT", qq.Page.Token, fmt.Sprintf("%d", q.limit)) + q.query = append(q.query, "LIMIT", qq.Page.Token, strconv.Itoa(q.limit)) } else { q.offset = 0 - q.query = append(q.query, "LIMIT", "0", fmt.Sprintf("%d", q.limit)) + q.query = append(q.query, "LIMIT", "0", strconv.Itoa(q.limit)) } } diff --git a/state/redis/redis_query_schema_test.go b/state/redis/redis_query_schema_test.go index 36a46358c8..97f553a95d 100644 --- a/state/redis/redis_query_schema_test.go +++ b/state/redis/redis_query_schema_test.go @@ -4,12 +4,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestParsingEmptySchema(t *testing.T) { schemas, err := parseQuerySchemas("") - assert.NoError(t, err) - assert.Equal(t, 0, len(schemas)) + require.NoError(t, err) + assert.Empty(t, schemas) } func TestParsingSingleSchema(t *testing.T) { @@ -38,20 +39,19 @@ func TestParsingSingleSchema(t *testing.T) { } ]` schemas, err := parseQuerySchemas(content) - assert.NoError(t, err) - assert.Equal(t, 1, len(schemas)) + require.NoError(t, err) + assert.Len(t, schemas, 1) assert.Equal(t, - schemas["schema1"].keys, - map[string]string{"person.org": "var0", "person.id": "var1", "city": "var2", "state": "var3"}) + map[string]string{"person.org": "var0", "person.id": "var1", "city": "var2", "state": "var3"}, + schemas["schema1"].keys) assert.Equal(t, - schemas["schema1"].schema, []interface{}{ "FT.CREATE", "schema1", "ON", "JSON", "SCHEMA", "$.data.person.org", "AS", "var0", "TEXT", "SORTABLE", "$.data.person.id", "AS", "var1", "NUMERIC", "SORTABLE", "$.data.city", "AS", "var2", "TEXT", "SORTABLE", "$.data.state", "AS", "var3", "TEXT", "SORTABLE", - }) + }, schemas["schema1"].schema) } func TestParsingMultiSchema(t *testing.T) { @@ -85,28 +85,26 @@ func TestParsingMultiSchema(t *testing.T) { } ]` schemas, err := parseQuerySchemas(content) - assert.NoError(t, err) - assert.Equal(t, 2, len(schemas)) + require.NoError(t, err) + assert.Len(t, schemas, 2) assert.Equal(t, - schemas["schema1"].keys, - map[string]string{"person.org": "var0", "city": "var1"}) + map[string]string{"person.org": "var0", "city": "var1"}, + schemas["schema1"].keys) assert.Equal(t, - schemas["schema1"].schema, []interface{}{ "FT.CREATE", "schema1", "ON", "JSON", "SCHEMA", "$.data.person.org", "AS", "var0", "TEXT", "SORTABLE", "$.data.city", "AS", "var1", "TEXT", "SORTABLE", - }) + }, schemas["schema1"].schema) assert.Equal(t, - schemas["schema2"].keys, - map[string]string{"person.id": "var0", "state": "var1"}) + map[string]string{"person.id": "var0", "state": "var1"}, + schemas["schema2"].keys) assert.Equal(t, - schemas["schema2"].schema, []interface{}{ "FT.CREATE", "schema2", "ON", "JSON", "SCHEMA", "$.data.person.id", "AS", "var0", "NUMERIC", "SORTABLE", "$.data.state", "AS", "var1", "TEXT", "SORTABLE", - }) + }, schemas["schema2"].schema) } func TestParsingSchemaErrors(t *testing.T) { @@ -143,6 +141,6 @@ func TestParsingSchemaErrors(t *testing.T) { for _, test := range tests { _, err := parseQuerySchemas(test.content) - assert.EqualError(t, err, test.err) + require.EqualError(t, err, test.err) } } diff --git a/state/redis/redis_query_test.go b/state/redis/redis_query_test.go index 431d09d942..cc503e62d7 100644 --- a/state/redis/redis_query_test.go +++ b/state/redis/redis_query_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state/query" ) @@ -48,17 +49,17 @@ func TestMongoQuery(t *testing.T) { } for _, test := range tests { data, err := os.ReadFile(test.input) - assert.NoError(t, err) + require.NoError(t, err) var qq query.Query err = json.Unmarshal(data, &qq) - assert.NoError(t, err) + require.NoError(t, err) q := &Query{ aliases: map[string]string{"person.org": "org", "person.id": "id", "state": "state"}, } qbuilder := query.NewQueryBuilder(q) if err = qbuilder.BuildQuery(&qq); err != nil { - assert.EqualError(t, err, test.err.Error()) + require.EqualError(t, err, test.err.Error()) } else { assert.Equal(t, test.query, q.query) } diff --git a/state/redis/redis_test.go b/state/redis/redis_test.go index 3f41329fdc..fc9e0df952 100644 --- a/state/redis/redis_test.go +++ b/state/redis/redis_test.go @@ -23,6 +23,7 @@ import ( redis "github.com/go-redis/redis/v8" jsoniter "github.com/json-iterator/go" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" rediscomponent "github.com/dapr/components-contrib/common/component/redis" "github.com/dapr/components-contrib/state" @@ -34,31 +35,31 @@ func TestGetKeyVersion(t *testing.T) { store := newStateStore(logger.NewLogger("test")) t.Run("With all required fields", func(t *testing.T) { key, ver, err := store.getKeyVersion([]interface{}{"data", "TEST_KEY", "version", "TEST_VER"}) - assert.NoError(t, err, "failed to read all fields") + require.NoError(t, err, "failed to read all fields") assert.Equal(t, "TEST_KEY", key, "failed to read key") assert.Equal(t, ptr.Of("TEST_VER"), ver, "failed to read version") }) t.Run("With missing data", func(t *testing.T) { _, _, err := store.getKeyVersion([]interface{}{"version", "TEST_VER"}) - assert.NotNil(t, err, "failed to respond to missing data field") + require.Error(t, err, "failed to respond to missing data field") }) t.Run("With missing version", func(t *testing.T) { _, _, err := store.getKeyVersion([]interface{}{"data", "TEST_KEY"}) - assert.NotNil(t, err, "failed to respond to missing version field") + require.Error(t, err, "failed to respond to missing version field") }) t.Run("With all required fields - out of order", func(t *testing.T) { key, ver, err := store.getKeyVersion([]interface{}{"version", "TEST_VER", "dragon", "TEST_DRAGON", "data", "TEST_KEY"}) - assert.NoError(t, err, "failed to read all fields") + require.NoError(t, err, "failed to read all fields") assert.Equal(t, "TEST_KEY", key, "failed to read key") assert.Equal(t, ptr.Of("TEST_VER"), ver, "failed to read version") }) t.Run("With no fields", func(t *testing.T) { _, _, err := store.getKeyVersion([]interface{}{}) - assert.NotNil(t, err, "failed to respond to missing fields") + require.Error(t, err, "failed to respond to missing fields") }) t.Run("With wrong fields", func(t *testing.T) { _, _, err := store.getKeyVersion([]interface{}{"dragon", "TEST_DRAGON"}) - assert.NotNil(t, err, "failed to respond to missing fields") + require.Error(t, err, "failed to respond to missing fields") }) } @@ -69,7 +70,7 @@ func TestParseEtag(t *testing.T) { ver, err := store.parseETag(&state.SetRequest{ ETag: &etag, }) - assert.NoError(t, err, "failed to parse ETag") + require.NoError(t, err, "failed to parse ETag") assert.Equal(t, 0, ver, "default version should be 0") }) t.Run("Number ETag", func(t *testing.T) { @@ -77,7 +78,7 @@ func TestParseEtag(t *testing.T) { ver, err := store.parseETag(&state.SetRequest{ ETag: &etag, }) - assert.NoError(t, err, "failed to parse ETag") + require.NoError(t, err, "failed to parse ETag") assert.Equal(t, 354, ver, "version should be 254") }) t.Run("String ETag", func(t *testing.T) { @@ -85,7 +86,7 @@ func TestParseEtag(t *testing.T) { _, err := store.parseETag(&state.SetRequest{ ETag: &etag, }) - assert.NotNil(t, err, "shouldn't recognize string ETag") + require.Error(t, err, "shouldn't recognize string ETag") }) t.Run("Concurrency=LastWrite", func(t *testing.T) { etag := "dragon" @@ -95,7 +96,7 @@ func TestParseEtag(t *testing.T) { }, ETag: &etag, }) - assert.NoError(t, err, "failed to parse ETag") + require.NoError(t, err, "failed to parse ETag") assert.Equal(t, 0, ver, "version should be 0") }) t.Run("Concurrency=FirstWrite", func(t *testing.T) { @@ -104,7 +105,7 @@ func TestParseEtag(t *testing.T) { Concurrency: state.FirstWrite, }, }) - assert.NoError(t, err, "failed to parse Concurrency") + require.NoError(t, err, "failed to parse Concurrency") assert.Equal(t, 0, ver, "version should be 0") // ETag is nil @@ -112,7 +113,7 @@ func TestParseEtag(t *testing.T) { Options: state.SetStateOption{}, } ver, err = store.parseETag(req) - assert.NoError(t, err, "failed to parse Concurrency") + require.NoError(t, err, "failed to parse Concurrency") assert.Equal(t, 0, ver, "version should be 0") // ETag is empty @@ -121,7 +122,7 @@ func TestParseEtag(t *testing.T) { ETag: &emptyString, } ver, err = store.parseETag(req) - assert.NoError(t, err, "failed to parse Concurrency") + require.NoError(t, err, "failed to parse Concurrency") assert.Equal(t, 0, ver, "version should be 0") }) } @@ -135,7 +136,7 @@ func TestParseTTL(t *testing.T) { "ttlInSeconds": ttlInSeconds, }, }) - assert.Error(t, err) + require.Error(t, err) assert.Nil(t, ttl) }) t.Run("TTL specified with wrong key", func(t *testing.T) { @@ -145,7 +146,7 @@ func TestParseTTL(t *testing.T) { "expirationTime": strconv.Itoa(ttlInSeconds), }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, ttl) }) t.Run("TTL is a number", func(t *testing.T) { @@ -155,7 +156,7 @@ func TestParseTTL(t *testing.T) { "ttlInSeconds": strconv.Itoa(ttlInSeconds), }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *ttl, ttlInSeconds) }) @@ -166,7 +167,7 @@ func TestParseTTL(t *testing.T) { "ttlInSeconds": strconv.Itoa(ttlInSeconds), }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, *ttl, ttlInSeconds) }) } @@ -228,27 +229,27 @@ func TestTransactionalUpsert(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := c.DoRead(context.Background(), "HGETALL", "weapon") - assert.NoError(t, err) + require.NoError(t, err) vals := res.([]interface{}) data, version, err := ss.getKeyVersion(vals) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, ptr.Of("1"), version) assert.Equal(t, `"deathstar"`, data) res, err = c.DoRead(context.Background(), "TTL", "weapon") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(-1), res) res, err = c.DoRead(context.Background(), "TTL", "weapon2") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(123), res) res, err = c.DoRead(context.Background(), "TTL", "weapon3") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(-1), res) } @@ -278,13 +279,13 @@ func TestTransactionalDelete(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := c.DoRead(context.Background(), "HGETALL", "weapon") - assert.NoError(t, err) + require.NoError(t, err) vals := res.([]interface{}) - assert.Equal(t, 0, len(vals)) + assert.Empty(t, vals) } func TestPing(t *testing.T) { @@ -298,12 +299,12 @@ func TestPing(t *testing.T) { } err := ss.Ping(context.Background()) - assert.NoError(t, err) + require.NoError(t, err) s.Close() err = ss.Ping(context.Background()) - assert.Error(t, err) + require.Error(t, err) } func TestRequestsWithGlobalTTL(t *testing.T) { @@ -366,27 +367,27 @@ func TestRequestsWithGlobalTTL(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := c.DoRead(context.Background(), "HGETALL", "weapon") - assert.NoError(t, err) + require.NoError(t, err) vals := res.([]interface{}) data, version, err := ss.getKeyVersion(vals) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, ptr.Of("1"), version) assert.Equal(t, `"deathstar"`, data) res, err = c.DoRead(context.Background(), "TTL", "weapon") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(globalTTLInSeconds), res) res, err = c.DoRead(context.Background(), "TTL", "weapon2") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(123), res) res, err = c.DoRead(context.Background(), "TTL", "weapon3") - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, int64(-1), res) }) } @@ -485,13 +486,13 @@ func TestTransactionalDeleteNoEtag(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := c.DoRead(context.Background(), "HGETALL", "weapon100") - assert.NoError(t, err) + require.NoError(t, err) vals := res.([]interface{}) - assert.Equal(t, 0, len(vals)) + assert.Empty(t, vals) } func TestGetMetadata(t *testing.T) { diff --git a/state/request_options_test.go b/state/request_options_test.go index 8621cdbb53..383f2fa082 100644 --- a/state/request_options_test.go +++ b/state/request_options_test.go @@ -16,7 +16,7 @@ package state import ( "testing" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // TestCheckRequestOptions is used to validate request options. @@ -24,21 +24,21 @@ func TestCheckRequestOptions(t *testing.T) { t.Run("set state options", func(t *testing.T) { ro := SetStateOption{Concurrency: FirstWrite, Consistency: Eventual} err := CheckRequestOptions(ro) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("delete state options", func(t *testing.T) { ro := DeleteStateOption{Concurrency: FirstWrite, Consistency: Eventual} err := CheckRequestOptions(ro) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("get state options", func(t *testing.T) { ro := GetStateOption{Consistency: Eventual} err := CheckRequestOptions(ro) - assert.NoError(t, err) + require.NoError(t, err) }) t.Run("invalid state options", func(t *testing.T) { ro := SetStateOption{Concurrency: "invalid", Consistency: Eventual} err := CheckRequestOptions(ro) - assert.Error(t, err) + require.Error(t, err) }) } diff --git a/state/rethinkdb/rethinkdb_test.go b/state/rethinkdb/rethinkdb_test.go index aae385dd8d..57cea3b4f9 100644 --- a/state/rethinkdb/rethinkdb_test.go +++ b/state/rethinkdb/rethinkdb_test.go @@ -19,10 +19,12 @@ import ( "fmt" "io" "os" + "strconv" "testing" "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/state" @@ -36,7 +38,7 @@ func TestGetRethinkDBMetadata(t *testing.T) { t.Run("With required connect configuration", func(t *testing.T) { p := getTestMetadata() m, err := metadataToConfig(p, testLogger) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, p["address"], m.Address) assert.Equal(t, p["database"], m.Database) assert.True(t, m.Archive) @@ -49,13 +51,13 @@ func TestGetRethinkDBMetadata(t *testing.T) { p["timeout"] = fmt.Sprintf("%v", timeout) maxOpen := 30 - p["maxOpen"] = fmt.Sprintf("%v", maxOpen) + p["maxOpen"] = strconv.Itoa(maxOpen) discoverHosts := true - p["discoverHosts"] = fmt.Sprintf("%v", discoverHosts) + p["discoverHosts"] = strconv.FormatBool(discoverHosts) m, err := metadataToConfig(p, testLogger) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, maxOpen, m.MaxOpen) assert.Equal(t, discoverHosts, m.DiscoverHosts) }) @@ -97,7 +99,7 @@ func TestRethinkDBStateStore(t *testing.T) { // get set data and compare resp, err := db.Get(context.Background(), &state.GetRequest{Key: k}) - assert.Nil(t, err) + require.NoError(t, err) d2 := testGetTestObj(t, resp) assert.NotNil(t, d2) assert.Equal(t, d.F1, d2.F1) @@ -114,7 +116,7 @@ func TestRethinkDBStateStore(t *testing.T) { // get updated data and compare resp2, err := db.Get(context.Background(), &state.GetRequest{Key: k}) - assert.Nil(t, err) + require.NoError(t, err) d3 := testGetTestObj(t, resp2) assert.NotNil(t, d3) assert.Equal(t, d2.F1, d3.F1) @@ -138,7 +140,7 @@ func TestRethinkDBStateStore(t *testing.T) { // get set data and compare resp, err := db.Get(context.Background(), &state.GetRequest{Key: k}) - assert.Nil(t, err) + require.NoError(t, err) assert.NotNil(t, resp) assert.NotNil(t, resp.Data) assert.Equal(t, string(d), string(resp.Data)) @@ -166,7 +168,7 @@ func TestRethinkDBStateStoreRongRun(t *testing.T) { } closer, ok := db.(io.Closer) assert.True(t, ok) - defer assert.NoError(t, closer.Close()) + defer require.NoError(t, closer.Close()) for i := 0; i < 1000; i++ { testBulk(t, db, i) @@ -192,7 +194,7 @@ func testBulk(t *testing.T, db state.Store, i int) { // check for the data for _, v := range deleteList { resp, err := db.Get(context.Background(), &state.GetRequest{Key: v.Key}) - assert.NoErrorf(t, err, " -- run %d", i) + require.NoErrorf(t, err, " -- run %d", i) assert.NotNil(t, resp) assert.NotNil(t, resp.Data) } @@ -205,7 +207,7 @@ func testBulk(t *testing.T, db state.Store, i int) { // check for the data NOT being there for _, v := range deleteList { resp, err := db.Get(context.Background(), &state.GetRequest{Key: v.Key}) - assert.NoErrorf(t, err, " -- run %d", i) + require.NoErrorf(t, err, " -- run %d", i) assert.NotNil(t, resp) assert.Nil(t, resp.Data) } diff --git a/state/sqlite/sqlite_dbaccess.go b/state/sqlite/sqlite_dbaccess.go index d3cfbfa7c3..f7dbb49bdd 100644 --- a/state/sqlite/sqlite_dbaccess.go +++ b/state/sqlite/sqlite_dbaccess.go @@ -154,6 +154,7 @@ func (a *sqliteDBAccess) Get(parentCtx context.Context, req *state.GetRequest) ( } // Concatenation is required for table name because sql.DB does not substitute parameters for table names + //nolint:gosec stmt := `SELECT key, value, is_binary, etag, expiration_time FROM ` + a.metadata.TableName + ` WHERE key = ? @@ -197,6 +198,7 @@ func (a *sqliteDBAccess) BulkGet(parentCtx context.Context, req []state.GetReque } // Concatenation is required for table name because sql.DB does not substitute parameters for table names + //nolint:gosec stmt := `SELECT key, value, is_binary, etag, expiration_time FROM ` + a.metadata.TableName + ` WHERE key IN (` + inClause + `) diff --git a/state/sqlite/sqlite_integration_test.go b/state/sqlite/sqlite_integration_test.go index c14415a954..bb376e9796 100644 --- a/state/sqlite/sqlite_integration_test.go +++ b/state/sqlite/sqlite_integration_test.go @@ -189,7 +189,7 @@ func deleteItemThatDoesNotExist(t *testing.T, s state.Store) { Key: randomKey(), } err := s.Delete(context.Background(), deleteReq) - assert.NoError(t, err) + require.NoError(t, err) } func multiWithSetOnly(t *testing.T, s state.Store) { @@ -207,7 +207,7 @@ func multiWithSetOnly(t *testing.T, s state.Store) { err := s.(state.TransactionalStore).Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, set := range setRequests { assert.True(t, storeItemExists(t, s, set.Key)) @@ -234,7 +234,7 @@ func multiWithDeleteOnly(t *testing.T, s state.Store) { err := s.(state.TransactionalStore).Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, s, delete.Key)) @@ -271,7 +271,7 @@ func multiWithDeleteAndSet(t *testing.T, s state.Store) { err := s.(state.TransactionalStore).Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) for _, delete := range deleteRequests { assert.False(t, storeItemExists(t, s, delete.Key)) @@ -299,7 +299,7 @@ func deleteWithInvalidEtagFails(t *testing.T, s state.Store) { }, } err := s.Delete(context.Background(), deleteReq) - assert.NotNil(t, err, "Deleting an item with the wrong etag while enforcing FirstWrite policy should fail") + require.Error(t, err, "Deleting an item with the wrong etag while enforcing FirstWrite policy should fail") } func deleteWithNoKeyFails(t *testing.T, s state.Store) { @@ -307,7 +307,7 @@ func deleteWithNoKeyFails(t *testing.T, s state.Store) { Key: "", } err := s.Delete(context.Background(), deleteReq) - assert.Error(t, err) + require.Error(t, err) } // newItemWithEtagFails creates a new item and also supplies a non existent ETag and requests FirstWrite, which is invalid - expect failure. @@ -325,7 +325,7 @@ func newItemWithEtagFails(t *testing.T, s state.Store) { } err := s.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func updateWithOldEtagFails(t *testing.T, s state.Store) { @@ -355,7 +355,7 @@ func updateWithOldEtagFails(t *testing.T, s state.Store) { }, } err := s.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func updateAndDeleteWithEtagSucceeds(t *testing.T, s state.Store) { @@ -377,7 +377,7 @@ func updateAndDeleteWithEtagSucceeds(t *testing.T, s state.Store) { }, } err := s.Set(context.Background(), setReq) - assert.Nil(t, err, "Setting the item should be successful") + require.NoError(t, err, "Setting the item should be successful") updateResponse, updatedItem := getItem(t, s, key) assert.Equal(t, value, updatedItem) @@ -393,7 +393,7 @@ func updateAndDeleteWithEtagSucceeds(t *testing.T, s state.Store) { }, } err = s.Delete(context.Background(), deleteReq) - assert.Nil(t, err, "Deleting an item with the right etag while enforcing FirstWrite policy should succeed") + require.NoError(t, err, "Deleting an item with the right etag while enforcing FirstWrite policy should succeed") // Item is not in the data store. assert.False(t, storeItemExists(t, s, key)) @@ -415,7 +415,7 @@ func getItemWithNoKey(t *testing.T, s state.Store) { } response, getErr := s.Get(context.Background(), getReq) - assert.NotNil(t, getErr) + require.Error(t, getErr) assert.Nil(t, response) } @@ -457,7 +457,7 @@ func setTTLUpdatesExpiry(t *testing.T, s state.Store) { } err := s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // expirationTime should be set (to a date in the future). _, expirationTime := getTimesForRow(t, s, key) @@ -482,21 +482,21 @@ func setNoTTLUpdatesExpiry(t *testing.T, s state.Store) { }, } err := s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) delete(setReq.Metadata, "ttlInSeconds") err = s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) // expirationTime should not be set. _, expirationTime := getTimesForRow(t, s, key) - assert.True(t, !expirationTime.Valid, "Expiration Time should not have a value after first being set with TTL value and then being set without TTL value") + assert.False(t, expirationTime.Valid, "Expiration Time should not have a value after first being set with TTL value and then being set without TTL value") deleteItem(t, s, key, nil) } func getExpireTime(t *testing.T, s state.Store) { key1 := randomKey() - assert.NoError(t, s.Set(context.Background(), &state.SetRequest{ + require.NoError(t, s.Set(context.Background(), &state.SetRequest{ Key: key1, Value: "123", Metadata: map[string]string{ @@ -505,7 +505,7 @@ func getExpireTime(t *testing.T, s state.Store) { })) resp, err := s.Get(context.Background(), &state.GetRequest{Key: key1}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, `"123"`, string(resp.Data)) require.Len(t, resp.Metadata, 1) expireTime, err := time.Parse(time.RFC3339, resp.Metadata["ttlExpireTime"]) @@ -517,14 +517,14 @@ func getBulkExpireTime(t *testing.T, s state.Store) { key1 := randomKey() key2 := randomKey() - assert.NoError(t, s.Set(context.Background(), &state.SetRequest{ + require.NoError(t, s.Set(context.Background(), &state.SetRequest{ Key: key1, Value: "123", Metadata: map[string]string{ "ttlInSeconds": "1000", }, })) - assert.NoError(t, s.Set(context.Background(), &state.SetRequest{ + require.NoError(t, s.Set(context.Background(), &state.SetRequest{ Key: key2, Value: "456", Metadata: map[string]string{ @@ -568,12 +568,12 @@ func expiredStateCannotBeRead(t *testing.T, s state.Store) { }, } err := s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) time.Sleep(time.Second * time.Duration(2)) getResponse, err := s.Get(context.Background(), &state.GetRequest{Key: key}) assert.Equal(t, &state.GetResponse{}, getResponse, "Response must be empty") - assert.NoError(t, err, "Expired element must not be treated as error") + require.NoError(t, err, "Expired element must not be treated as error") deleteItem(t, s, key, nil) } @@ -593,10 +593,10 @@ func unexpiredStateCanBeRead(t *testing.T, s state.Store) { }, } err := s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) _, getValue := getItem(t, s, key) assert.Equal(t, value.Color, getValue.Color, "Response must be as set") - assert.NoError(t, err, "Unexpired element with future expiration time must not be treated as error") + require.NoError(t, err, "Unexpired element with future expiration time must not be treated as error") deleteItem(t, s, key, nil) } @@ -607,7 +607,7 @@ func setItemWithNoKey(t *testing.T, s state.Store) { } err := s.Set(context.Background(), setReq) - assert.Error(t, err) + require.Error(t, err) } func testSetItemWithInvalidTTL(t *testing.T, s state.Store) { @@ -619,7 +619,7 @@ func testSetItemWithInvalidTTL(t *testing.T, s state.Store) { }), } err := s.Set(context.Background(), setReq) - assert.NotNil(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a incorrect TTL value should be produce an error") } func testSetItemWithNegativeTTL(t *testing.T, s state.Store) { @@ -631,7 +631,7 @@ func testSetItemWithNegativeTTL(t *testing.T, s state.Store) { }), } err := s.Set(context.Background(), setReq) - assert.NotNil(t, err, "Setting a value with a proper key and a negative (other than -1) TTL value should be produce an error") + require.Error(t, err, "Setting a value with a proper key and a negative (other than -1) TTL value should be produce an error") } // Tests valid bulk sets and deletes. @@ -648,7 +648,7 @@ func testBulkSetAndBulkDelete(t *testing.T, s state.Store) { } err := s.BulkSet(context.Background(), setReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, storeItemExists(t, s, setReq[0].Key)) assert.True(t, storeItemExists(t, s, setReq[1].Key)) @@ -662,7 +662,7 @@ func testBulkSetAndBulkDelete(t *testing.T, s state.Store) { } err = s.BulkDelete(context.Background(), deleteReq, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) assert.False(t, storeItemExists(t, s, setReq[0].Key)) assert.False(t, storeItemExists(t, s, setReq[1].Key)) } @@ -706,7 +706,7 @@ func testInitConfiguration(t *testing.T) { require.NoError(t, err) } else { require.Error(t, err) - assert.ErrorContains(t, err, tt.expectedErr) + require.ErrorContains(t, err, tt.expectedErr) } }) } @@ -735,7 +735,7 @@ func setItem(t *testing.T, s state.Store, key string, value interface{}, etag *s } err := s.Set(context.Background(), setReq) - assert.NoError(t, err) + require.NoError(t, err) itemExists := storeItemExists(t, s, key) assert.True(t, itemExists, "Item should exist after set has been executed") } @@ -747,7 +747,7 @@ func getItem(t *testing.T, s state.Store, key string) (*state.GetResponse, *fake } response, getErr := s.Get(context.Background(), getReq) - assert.Nil(t, getErr) + require.NoError(t, getErr) assert.NotNil(t, response) outputObject := &fakeItem{} _ = json.Unmarshal(response.Data, outputObject) @@ -763,7 +763,7 @@ func deleteItem(t *testing.T, s state.Store, key string, etag *string) { } deleteErr := s.Delete(context.Background(), deleteReq) - assert.Nil(t, deleteErr) + require.NoError(t, deleteErr) assert.False(t, storeItemExists(t, s, key), "item should no longer exist after delete has been performed") } @@ -775,7 +775,7 @@ func storeItemExists(t *testing.T, s state.Store, key string) bool { stmttpl := "SELECT count(key) FROM %s WHERE key = ?" statement := fmt.Sprintf(stmttpl, tableName) err := db.QueryRow(statement, key).Scan(&rowCount) - assert.NoError(t, err) + require.NoError(t, err) exists := rowCount > 0 return exists } @@ -786,7 +786,7 @@ func getRowData(t *testing.T, s state.Store, key string) (returnValue string, up db := dba.db err := db.QueryRow(fmt.Sprintf("SELECT value, update_time FROM %s WHERE key = ?", tableName), key). Scan(&returnValue, &updatedate) - assert.NoError(t, err) + require.NoError(t, err) return returnValue, updatedate } @@ -797,7 +797,7 @@ func getTimesForRow(t *testing.T, s state.Store, key string) (updatedate sql.Nul db := dba.db err := db.QueryRow(fmt.Sprintf("SELECT update_time, expiration_time FROM %s WHERE key = ?", tableName), key). Scan(&updatedate, &expirationtime) - assert.NoError(t, err) + require.NoError(t, err) return updatedate, expirationtime } diff --git a/state/sqlite/sqlite_metadata_test.go b/state/sqlite/sqlite_metadata_test.go index b87f8dc688..2cc1ddb967 100644 --- a/state/sqlite/sqlite_metadata_test.go +++ b/state/sqlite/sqlite_metadata_test.go @@ -51,7 +51,7 @@ func TestSqliteMetadata(t *testing.T) { err := md.InitWithMetadata(stateMetadata(map[string]string{})) require.Error(t, err) - assert.ErrorContains(t, err, "missing connection string") + require.ErrorContains(t, err, "missing connection string") }) t.Run("invalid state table name", func(t *testing.T) { @@ -62,7 +62,7 @@ func TestSqliteMetadata(t *testing.T) { })) require.Error(t, err) - assert.ErrorContains(t, err, "invalid identifier") + require.ErrorContains(t, err, "invalid identifier") }) t.Run("invalid metadata table name", func(t *testing.T) { @@ -73,7 +73,7 @@ func TestSqliteMetadata(t *testing.T) { })) require.Error(t, err) - assert.ErrorContains(t, err, "invalid identifier") + require.ErrorContains(t, err, "invalid identifier") }) t.Run("invalid timeout", func(t *testing.T) { @@ -84,7 +84,7 @@ func TestSqliteMetadata(t *testing.T) { })) require.Error(t, err) - assert.ErrorContains(t, err, "timeout") + require.ErrorContains(t, err, "timeout") }) t.Run("aliases", func(t *testing.T) { diff --git a/state/sqlite/sqlite_test.go b/state/sqlite/sqlite_test.go index 13b048e1a7..d288d47a57 100644 --- a/state/sqlite/sqlite_test.go +++ b/state/sqlite/sqlite_test.go @@ -143,7 +143,7 @@ func TestGetConnectionString(t *testing.T) { _, err := db.metadata.GetConnectionString(log) require.Error(t, err) - assert.ErrorContains(t, err, "found forbidden option '_pragma=busy_timeout' in the connection string") + require.ErrorContains(t, err, "found forbidden option '_pragma=busy_timeout' in the connection string") }) t.Run("journal_mode", func(t *testing.T) { logDest.Reset() @@ -152,7 +152,7 @@ func TestGetConnectionString(t *testing.T) { _, err := db.metadata.GetConnectionString(log) require.Error(t, err) - assert.ErrorContains(t, err, "found forbidden option '_pragma=journal_mode' in the connection string") + require.ErrorContains(t, err, "found forbidden option '_pragma=journal_mode' in the connection string") }) }) @@ -270,7 +270,7 @@ func TestMultiWithNoRequestsReturnsNil(t *testing.T) { err := ods.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: operations, }) - assert.NoError(t, err) + require.NoError(t, err) } func TestValidSetRequest(t *testing.T) { @@ -280,7 +280,7 @@ func TestValidSetRequest(t *testing.T) { err := ods.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: []state.TransactionalStateOperation{createSetRequest()}, }) - assert.NoError(t, err) + require.NoError(t, err) } func TestValidMultiDeleteRequest(t *testing.T) { @@ -290,7 +290,7 @@ func TestValidMultiDeleteRequest(t *testing.T) { err := ods.Multi(context.Background(), &state.TransactionalStateRequest{ Operations: []state.TransactionalStateOperation{createDeleteRequest()}, }) - assert.NoError(t, err) + require.NoError(t, err) } // Proves that the Ping method runs the ping method. @@ -369,7 +369,7 @@ func createSqlite(t *testing.T) *SQLiteStore { err := odb.Init(context.Background(), *metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, odb.dbaccess) return odb diff --git a/state/sqlserver/sqlserver_integration_test.go b/state/sqlserver/sqlserver_integration_test.go index ca7170db44..0d6ebe4de3 100644 --- a/state/sqlserver/sqlserver_integration_test.go +++ b/state/sqlserver/sqlserver_integration_test.go @@ -246,12 +246,12 @@ func testSingleOperations(t *testing.T) { failedJohn := johnV3 failedJohn.FavoriteBeverage = "Will not work" err = store.Set(context.Background(), &state.SetRequest{Key: failedJohn.ID, Value: failedJohn, ETag: &etagFromInsert}) - assert.NotNil(t, err) + require.Error(t, err) _, etag := assertLoadedUserIsEqual(t, store, johnV3.ID, johnV3) // 9. Delete with invalid ETAG should fail err = store.Delete(context.Background(), &state.DeleteRequest{Key: johnV3.ID, ETag: &invEtag}) - assert.NotNil(t, err) + require.Error(t, err) assertLoadedUserIsEqual(t, store, johnV3.ID, johnV3) // 10. Delete with valid ETAG @@ -270,7 +270,7 @@ func testSetNewRecordWithInvalidEtagShouldFail(t *testing.T) { invEtag := invalidEtag err := store.Set(context.Background(), &state.SetRequest{Key: u.ID, Value: u, ETag: &invEtag}) - assert.NotNil(t, err) + require.Error(t, err) } /* #nosec. */ @@ -365,7 +365,7 @@ func testMultiOperations(t *testing.T) { state.SetRequest{Key: modified.ID, Value: modified}, }, }) - assert.Nil(t, localErr) + require.NoError(t, localErr) assertLoadedUserIsEqual(t, store, modified.ID, modified) assertUserDoesNotExist(t, store, toDelete.ID) @@ -434,7 +434,7 @@ func testMultiOperations(t *testing.T) { }, }) - assert.NotNil(t, err) + require.Error(t, err) assertUserDoesNotExist(t, store, toInsert.ID) assertLoadedUserIsEqual(t, store, toDelete.ID, toDelete.user) @@ -454,7 +454,7 @@ func testMultiOperations(t *testing.T) { state.SetRequest{Key: modified.ID, Value: modified}, }, }) - assert.NotNil(t, err) + require.Error(t, err) assertLoadedUserIsEqual(t, store, toDelete.ID, toDelete.user) assertLoadedUserIsEqual(t, store, toModify.ID, toModify.user) @@ -475,7 +475,7 @@ func testMultiOperations(t *testing.T) { }, }) - assert.NotNil(t, err) + require.Error(t, err) assertLoadedUserIsEqual(t, store, toDelete.ID, toDelete.user) assertLoadedUserIsEqual(t, store, toModify.ID, toModify.user) @@ -501,7 +501,7 @@ func testInsertAndUpdateSetRecordDates(t *testing.T) { var insertDate, updateDate sql.NullTime localErr := rows.Scan(&insertDate, &updateDate) - assert.Nil(t, localErr) + require.NoError(t, localErr) assert.True(t, insertDate.Valid) insertDiff := float64(time.Now().UTC().Sub(insertDate.Time).Milliseconds()) @@ -592,7 +592,7 @@ func testMultipleInitializations(t *testing.T) { } store2.BulkStore = state.NewDefaultBulkStore(store2) err := store2.Init(context.Background(), createMetadata(store.metadata.Schema, test.kt, test.indexedProperties)) - assert.NoError(t, err) + require.NoError(t, err) }) } } diff --git a/state/sqlserver/sqlserver_test.go b/state/sqlserver/sqlserver_test.go index 3a7b785a1b..8dd494e5f3 100644 --- a/state/sqlserver/sqlserver_test.go +++ b/state/sqlserver/sqlserver_test.go @@ -230,7 +230,7 @@ func TestValidConfiguration(t *testing.T) { } err := sqlStore.Init(context.Background(), metadata) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, tt.expected.metadata.ConnectionString, sqlStore.metadata.ConnectionString) assert.Equal(t, tt.expected.metadata.TableName, sqlStore.metadata.TableName) assert.Equal(t, tt.expected.metadata.Schema, sqlStore.metadata.Schema) @@ -380,7 +380,7 @@ func TestExecuteMigrationFails(t *testing.T) { } err := sqlStore.Init(context.Background(), metadata) - assert.Error(t, err) + require.Error(t, err) } func TestSupportedFeatures(t *testing.T) { diff --git a/state/zookeeper/zk_test.go b/state/zookeeper/zk_test.go index 4fa6bfb1e0..ee74668929 100644 --- a/state/zookeeper/zk_test.go +++ b/state/zookeeper/zk_test.go @@ -22,6 +22,7 @@ import ( "github.com/go-zookeeper/zk" gomock "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" "github.com/dapr/kit/ptr" @@ -37,7 +38,7 @@ func TestNewConfig(t *testing.T) { "sessionTimeout": "5s", } cp, err := newConfig(properties) - assert.Equal(t, err, nil, fmt.Sprintf("Unexpected error: %v", err)) + require.NoError(t, err, fmt.Sprintf("Unexpected error: %v", err)) assert.NotNil(t, cp, "failed to respond to missing data field") assert.Equal(t, []string{ "127.0.0.1:3000", "127.0.0.1:3001", "127.0.0.1:3002", @@ -51,21 +52,21 @@ func TestNewConfig(t *testing.T) { SessionTimeout: "5s", } _, err := props.parse() - assert.Equal(t, nil, err, "failed to read all fields") + require.NoError(t, err, "failed to read all fields") }) t.Run("With missing servers", func(t *testing.T) { props := &properties{ SessionTimeout: "5s", } _, err := props.parse() - assert.NotNil(t, err, "failed to get missing endpoints error") + require.Error(t, err, "failed to get missing endpoints error") }) t.Run("With missing sessionTimeout", func(t *testing.T) { props := &properties{ Servers: "localhost:3000", } _, err := props.parse() - assert.NotNil(t, err, "failed to get invalid sessionTimeout error") + require.Error(t, err, "failed to get invalid sessionTimeout error") }) } @@ -84,7 +85,7 @@ func TestGet(t *testing.T) { assert.NotNil(t, res, "Key must be exists") assert.Equal(t, "bar", string(res.Data), "Value must be equals") assert.Equal(t, ptr.Of("123"), res.ETag, "ETag must be equals") - assert.NoError(t, err, "Key must be exists") + require.NoError(t, err, "Key must be exists") }) t.Run("With key non-exists", func(t *testing.T) { @@ -92,7 +93,7 @@ func TestGet(t *testing.T) { res, err := s.Get(context.Background(), &state.GetRequest{Key: "foo"}) assert.Equal(t, &state.GetResponse{}, res, "Response must be empty") - assert.NoError(t, err, "Non-existent key must not be treated as error") + require.NoError(t, err, "Non-existent key must not be treated as error") }) } @@ -109,14 +110,14 @@ func TestDelete(t *testing.T) { conn.EXPECT().Delete("foo", int32(anyVersion)).Return(nil).Times(1) err := s.Delete(context.Background(), &state.DeleteRequest{Key: "foo"}) - assert.NoError(t, err, "Key must be exists") + require.NoError(t, err, "Key must be exists") }) t.Run("With key and version", func(t *testing.T) { conn.EXPECT().Delete("foo", int32(123)).Return(nil).Times(1) err := s.Delete(context.Background(), &state.DeleteRequest{Key: "foo", ETag: &etag}) - assert.NoError(t, err, "Key must be exists") + require.NoError(t, err, "Key must be exists") }) t.Run("With key and concurrency", func(t *testing.T) { @@ -127,21 +128,21 @@ func TestDelete(t *testing.T) { ETag: &etag, Options: state.DeleteStateOption{Concurrency: state.LastWrite}, }) - assert.NoError(t, err, "Key must be exists") + require.NoError(t, err, "Key must be exists") }) t.Run("With delete error", func(t *testing.T) { conn.EXPECT().Delete("foo", int32(anyVersion)).Return(zk.ErrUnknown).Times(1) err := s.Delete(context.Background(), &state.DeleteRequest{Key: "foo"}) - assert.EqualError(t, err, "zk: unknown error") + require.EqualError(t, err, "zk: unknown error") }) t.Run("With delete and ignore NoNode error", func(t *testing.T) { conn.EXPECT().Delete("foo", int32(anyVersion)).Return(zk.ErrNoNode).Times(1) err := s.Delete(context.Background(), &state.DeleteRequest{Key: "foo"}) - assert.NoError(t, err, "Delete must be successful") + require.NoError(t, err, "Delete must be successful") }) } @@ -160,13 +161,13 @@ func TestSet(t *testing.T) { conn.EXPECT().Set("foo", []byte("\"bar\""), int32(anyVersion)).Return(stat, nil).Times(1) err := s.Set(context.Background(), &state.SetRequest{Key: "foo", Value: "bar"}) - assert.NoError(t, err, "Key must be set") + require.NoError(t, err, "Key must be set") }) t.Run("With key and version", func(t *testing.T) { conn.EXPECT().Set("foo", []byte("\"bar\""), int32(123)).Return(stat, nil).Times(1) err := s.Set(context.Background(), &state.SetRequest{Key: "foo", Value: "bar", ETag: &etag}) - assert.NoError(t, err, "Key must be set") + require.NoError(t, err, "Key must be set") }) t.Run("With key and concurrency", func(t *testing.T) { conn.EXPECT().Set("foo", []byte("\"bar\""), int32(anyVersion)).Return(stat, nil).Times(1) @@ -177,20 +178,20 @@ func TestSet(t *testing.T) { ETag: &etag, Options: state.SetStateOption{Concurrency: state.LastWrite}, }) - assert.NoError(t, err, "Key must be set") + require.NoError(t, err, "Key must be set") }) t.Run("With error", func(t *testing.T) { conn.EXPECT().Set("foo", []byte("\"bar\""), int32(anyVersion)).Return(nil, zk.ErrUnknown).Times(1) err := s.Set(context.Background(), &state.SetRequest{Key: "foo", Value: "bar"}) - assert.EqualError(t, err, "zk: unknown error") + require.EqualError(t, err, "zk: unknown error") }) t.Run("With NoNode error and retry", func(t *testing.T) { conn.EXPECT().Set("foo", []byte("\"bar\""), int32(anyVersion)).Return(nil, zk.ErrNoNode).Times(1) conn.EXPECT().Create("foo", []byte("\"bar\""), int32(0), nil).Return("/foo", nil).Times(1) err := s.Set(context.Background(), &state.SetRequest{Key: "foo", Value: "bar"}) - assert.NoError(t, err, "Key must be create") + require.NoError(t, err, "Key must be create") }) } diff --git a/tests/certification/bindings/aws/s3/s3_test.go b/tests/certification/bindings/aws/s3/s3_test.go index 77460f8e7e..16e41abc49 100644 --- a/tests/certification/bindings/aws/s3/s3_test.go +++ b/tests/certification/bindings/aws/s3/s3_test.go @@ -19,10 +19,10 @@ import ( "fmt" "os" "strconv" + "testing" "github.com/stretchr/testify/assert" - - "testing" + "github.com/stretchr/testify/require" bindings_s3 "github.com/dapr/components-contrib/bindings/aws/s3" secretstore_env "github.com/dapr/components-contrib/secretstores/local/env" @@ -106,7 +106,6 @@ func getObjectRequest(ctx flow.Context, client daprsdk.Client, name string, isBa } return getObjectRequestWithMetadata(ctx, client, invokeGetMetadata) - } // getObjectRequest is used to make a common binding request for the get operation passing metadata. @@ -148,7 +147,7 @@ func deleteObjectRequest(ctx flow.Context, client daprsdk.Client, name string) ( // Verify S3 Basic Binding Support (Create, Get, List, Delete) func S3SBasic(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort := ports[0] currentHTTPPort := ports[1] @@ -169,7 +168,7 @@ func S3SBasic(t *testing.T) { } _, invokeCreateErr := createObjectRequest(ctx, client, dataBytes, invokeCreateMetadata) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) invokeGetMetadata := map[string]string{ "key": objectName, @@ -183,14 +182,14 @@ func S3SBasic(t *testing.T) { } out, invokeGetErr := client.InvokeBinding(ctx, invokeGetRequest) - assert.NoError(t, invokeGetErr) + require.NoError(t, invokeGetErr) assert.Equal(t, input, string(out.Data)) out, invokeErr := listObjectRequest(ctx, client) - assert.NoError(t, invokeErr) + require.NoError(t, invokeErr) var output s3.ListObjectsOutput unmarshalErr := json.Unmarshal(out.Data, &output) - assert.NoError(t, unmarshalErr) + require.NoError(t, unmarshalErr) found := false for _, item := range output.Contents { @@ -202,7 +201,7 @@ func S3SBasic(t *testing.T) { assert.True(t, found) out, invokeDeleteErr := deleteObjectRequest(ctx, client, objectName) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -224,13 +223,12 @@ func S3SBasic(t *testing.T) { )). Step("Create/Get/List/Delete S3 Object", testCreateGetListDelete). Run() - } // Verify forcePathStyle func S3SForcePathStyle(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort := ports[0] currentHTTPPort := ports[1] @@ -254,18 +252,18 @@ func S3SForcePathStyle(t *testing.T) { } cout, invokeCreateErr := createObjectRequest(ctx, client, dataBytes, invokeCreateMetadata) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) var createResponse struct { Location string `json:"location"` VersionID *string `json:"versionID"` PresignURL string `json:"presignURL,omitempty"` } unmarshalErr := json.Unmarshal(cout.Data, &createResponse) - assert.NoError(t, unmarshalErr) + require.NoError(t, unmarshalErr) assert.Equal(t, createResponse.Location, forcePathStyle) out, invokeDeleteErr := deleteObjectRequest(ctx, client, objectName) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -305,7 +303,7 @@ func S3SForcePathStyle(t *testing.T) { // Verify Base64 (Encode/Decode) func S3SBase64(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort := ports[0] currentHTTPPort := ports[1] @@ -324,17 +322,17 @@ func S3SBase64(t *testing.T) { } out, invokeCreateErr := createObjectRequest(ctx, client, dataBytes, invokeCreateMetadata) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) genKey := out.Metadata["key"] isBase64 := true out, invokeGetErr := getObjectRequest(ctx, client, genKey, isBase64) - assert.NoError(t, invokeGetErr) + require.NoError(t, invokeGetErr) assert.Equal(t, out.Data, dataBytes) assert.Empty(t, out.Metadata) out, invokeDeleteErr := deleteObjectRequest(ctx, client, genKey) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -358,19 +356,19 @@ func S3SBase64(t *testing.T) { invokeCreateMetadata := map[string]string{} out, invokeCreateErr := createObjectRequest(ctx, client, dataBytes, invokeCreateMetadata) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) genKey := out.Metadata["key"] invokeGetMetadata := map[string]string{ "key": genKey, } out, invokeGetErr := getObjectRequestWithMetadata(ctx, client, invokeGetMetadata) - assert.NoError(t, invokeGetErr) + require.NoError(t, invokeGetErr) assert.Equal(t, out.Data, b64EncodedDataBytes) assert.Empty(t, out.Metadata) out, invokeDeleteErr := deleteObjectRequest(ctx, client, genKey) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -404,7 +402,6 @@ func S3SBase64(t *testing.T) { )). Step("Create blob from file get encode base64", testCreateFromFileGetEncodeBase64()). Run() - } func componentRuntimeOptions() []embedded.Option { @@ -426,8 +423,8 @@ func componentRuntimeOptions() []embedded.Option { func teardown(t *testing.T) { t.Logf("AWS S3 Binding CertificationTests teardown...") - //Dapr runtime automatically creates the following queues, topics - //so here they get deleted. + // Dapr runtime automatically creates the following queues, topics + // so here they get deleted. t.Logf("AWS S3 Binding CertificationTests teardown...done!") } diff --git a/tests/certification/bindings/azure/blobstorage/blobstorage_test.go b/tests/certification/bindings/azure/blobstorage/blobstorage_test.go index 520bea99ad..e0db33a148 100644 --- a/tests/certification/bindings/azure/blobstorage/blobstorage_test.go +++ b/tests/certification/bindings/azure/blobstorage/blobstorage_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings/azure/blobstorage" secretstore_env "github.com/dapr/components-contrib/secretstores/local/env" @@ -133,7 +134,7 @@ func deleteBlobRequest(ctx flow.Context, client daprsdk.Client, name string, del func TestBlobStorage(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort := ports[0] currentHTTPPort := ports[1] @@ -161,7 +162,7 @@ func TestBlobStorage(t *testing.T) { } out, invokeCreateErr := client.InvokeBinding(ctx, invokeCreateRequest) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) blobName := out.Metadata["blobName"] res, _ := getBlobRequest(ctx, client, blobName, false) @@ -183,7 +184,7 @@ func TestBlobStorage(t *testing.T) { } _, invokeCreateErr2 := client.InvokeBinding(ctx, invokeCreateRequest2) - assert.NoError(t, invokeCreateErr2) + require.NoError(t, invokeCreateErr2) res2, _ := getBlobRequest(ctx, client, blobName, false) newString := string(res2.Data) @@ -193,7 +194,7 @@ func TestBlobStorage(t *testing.T) { // cleanup. out, invokeDeleteErr := deleteBlobRequest(ctx, client, blobName, nil) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -264,12 +265,12 @@ func TestBlobStorage(t *testing.T) { } out, invokeCreateErr := client.InvokeBinding(ctx, invokeCreateRequest) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) blobName := out.Metadata["blobName"] out, invokeGetErr := getBlobRequest(ctx, client, blobName, false) - assert.NoError(t, invokeGetErr) + require.NoError(t, invokeGetErr) responseData := out.Data if isBase64 { // input was automatically base64 decoded. @@ -280,7 +281,7 @@ func TestBlobStorage(t *testing.T) { assert.Empty(t, out.Metadata) out, invokeDeleteErr := deleteBlobRequest(ctx, client, blobName, nil) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -311,7 +312,7 @@ func TestBlobStorage(t *testing.T) { } out, invokeCreateErr := client.InvokeBinding(ctx, invokeCreateRequest) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) blobName := out.Metadata["blobName"] storageAccountName := os.Getenv("AzureBlobStorageAccount") @@ -322,7 +323,7 @@ func TestBlobStorage(t *testing.T) { // verify the blob is public via http request. url := fmt.Sprintf("https://%s.blob.core.windows.net/%s/%s", storageAccountName, containerName, blobName) resp, httpErr := http.Get(url) //nolint:gosec - assert.NoError(t, httpErr) + require.NoError(t, httpErr) body, _ := io.ReadAll(resp.Body) resp.Body.Close() @@ -335,7 +336,7 @@ func TestBlobStorage(t *testing.T) { // cleanup. _, invokeDeleteErr := deleteBlobRequest(ctx, client, blobName, nil) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) return nil } @@ -375,7 +376,7 @@ func TestBlobStorage(t *testing.T) { _, invokeCreateErr := client.InvokeBinding(ctx, invokeCreateRequest) - assert.NoError(t, invokeCreateErr) + require.NoError(t, invokeCreateErr) invokeGetMetadata := map[string]string{ "blobName": "filename.txt", @@ -390,16 +391,16 @@ func TestBlobStorage(t *testing.T) { } out, invokeGetErr := client.InvokeBinding(ctx, invokeGetRequest) - assert.NoError(t, invokeGetErr) + require.NoError(t, invokeGetErr) assert.Equal(t, input, string(out.Data)) assert.Contains(t, out.Metadata, "Custom") assert.Equal(t, "hello-world", out.Metadata["Custom"]) out, invokeErr := listBlobRequest(ctx, client, "", "", -1, true, false, false, false, false) - assert.NoError(t, invokeErr) + require.NoError(t, invokeErr) var output []map[string]interface{} unmarshalErr := json.Unmarshal(out.Data, &output) - assert.NoError(t, unmarshalErr) + require.NoError(t, unmarshalErr) found := false for _, item := range output { @@ -420,7 +421,7 @@ func TestBlobStorage(t *testing.T) { assert.True(t, found) out, invokeDeleteErr := deleteBlobRequest(ctx, client, "filename.txt", nil) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) assert.Empty(t, out.Data) // confirm the deletion. @@ -440,7 +441,7 @@ func TestBlobStorage(t *testing.T) { defer client.Close() _, invokeErr := listBlobRequest(ctx, client, "", "", -1, false, false, false, false, false) - assert.NoError(t, invokeErr) + require.NoError(t, invokeErr) return invokeErr } @@ -472,7 +473,7 @@ func TestBlobStorage(t *testing.T) { } _, invokeCreateErr1 := client.InvokeBinding(ctx, invokeCreateRequest1) - assert.NoError(t, invokeCreateErr1) + require.NoError(t, invokeCreateErr1) // create another blob with a prefix of "prefixA". invokeCreateMetadata2 := map[string]string{ @@ -487,7 +488,7 @@ func TestBlobStorage(t *testing.T) { } _, invokeCreateErr2 := client.InvokeBinding(ctx, invokeCreateRequest2) - assert.NoError(t, invokeCreateErr2) + require.NoError(t, invokeCreateErr2) // create a blob with a prefix of "prefixB". invokeCreateMetadata3 := map[string]string{ @@ -502,15 +503,15 @@ func TestBlobStorage(t *testing.T) { } _, invokeCreateErr3 := client.InvokeBinding(ctx, invokeCreateRequest3) - assert.NoError(t, invokeCreateErr3) + require.NoError(t, invokeCreateErr3) // list the contents of the container. out, listErr := listBlobRequest(ctx, client, "prefixA", "", 1, false, false, false, false, false) - assert.NoError(t, listErr) + require.NoError(t, listErr) var output []map[string]interface{} unmarshalErr := json.Unmarshal(out.Data, &output) - assert.NoError(t, unmarshalErr) + require.NoError(t, unmarshalErr) assert.Equal(t, 1, len(output)) assert.Contains(t, output[0]["Name"], "prefixA") @@ -525,11 +526,11 @@ func TestBlobStorage(t *testing.T) { // // list the contents of the container with a marker. // out2, listErr2 := listBlobRequest(ctx, client, "prefix", nextMarker, 1, false, false, false, false, false) - // assert.NoError(t, listErr2) + // require.NoError(t, listErr2) // var output2 []map[string]interface{} // err2 := json.Unmarshal(out2.Data, &output2) - // assert.NoError(t, err2) + // require.NoError(t, err2) // assert.Equal(t, 1, len(output2)) // assert.Contains(t, output2[0]["Name"], "prefixA") @@ -541,21 +542,21 @@ func TestBlobStorage(t *testing.T) { // cleanup. _, invokeDeleteErr1 := deleteBlobRequest(ctx, client, "prefixA/filename.txt", nil) - assert.NoError(t, invokeDeleteErr1) + require.NoError(t, invokeDeleteErr1) _, invokeDeleteErr2 := deleteBlobRequest(ctx, client, "prefixAfilename.txt", nil) - assert.NoError(t, invokeDeleteErr2) + require.NoError(t, invokeDeleteErr2) _, invokeDeleteErr3 := deleteBlobRequest(ctx, client, "prefixB/filename.txt", nil) - assert.NoError(t, invokeDeleteErr3) + require.NoError(t, invokeDeleteErr3) // list deleted items with prefix. out3, listErr3 := listBlobRequest(ctx, client, "prefixA/", "", -1, false, false, false, false, true) - assert.NoError(t, listErr3) + require.NoError(t, listErr3) // this will only return the deleted items if soft delete policy is enabled for the blob service. assert.Equal(t, "1", out3.Metadata["number"]) var output3 []map[string]interface{} err3 := json.Unmarshal(out3.Data, &output3) - assert.NoError(t, err3) + require.NoError(t, err3) assert.Equal(t, len(output3), 1) return nil @@ -577,37 +578,37 @@ func TestBlobStorage(t *testing.T) { _, uploadErr := blobClient.UploadBuffer( ctx, []byte("some example content"), &azblob.UploadBufferOptions{}) //nolint:exhaustivestruct - assert.NoError(t, uploadErr) + require.NoError(t, uploadErr) _, createSnapshotErr := blobClient.CreateSnapshot( ctx, &blob.CreateSnapshotOptions{}) //nolint:exhaustivestruct - assert.NoError(t, createSnapshotErr) + require.NoError(t, createSnapshotErr) // list the contents of the container including snapshots for the specific blob only. out, listErr := listBlobRequest(ctx, client, "snapshotthis.txt", "", -1, false, true, false, false, false) - assert.NoError(t, listErr) + require.NoError(t, listErr) assert.Equal(t, out.Metadata["number"], "2") // delete snapshots. _, invokeDeleteErr := deleteBlobRequest(ctx, client, "snapshotthis.txt", ptr.Of(string(blob.DeleteSnapshotsOptionTypeOnly))) - assert.NoError(t, invokeDeleteErr) + require.NoError(t, invokeDeleteErr) // verify snapshot is deleted. out2, listErr2 := listBlobRequest(ctx, client, "snapshotthis.txt", "", -1, false, true, false, false, false) - assert.NoError(t, listErr2) + require.NoError(t, listErr2) assert.Equal(t, "1", out2.Metadata["number"]) // create another snapshot. _, createSnapshotErr2 := blobClient.CreateSnapshot( ctx, &blob.CreateSnapshotOptions{}) //nolint:exhaustivestruct - assert.NoError(t, createSnapshotErr2) + require.NoError(t, createSnapshotErr2) // delete base blob and snapshots all at once. _, invokeDeleteErr2 := deleteBlobRequest(ctx, client, "snapshotthis.txt", ptr.Of(string(blob.DeleteSnapshotsOptionTypeInclude))) - assert.NoError(t, invokeDeleteErr2) + require.NoError(t, invokeDeleteErr2) // verify base blob and snapshots are deleted. out3, listErr3 := listBlobRequest(ctx, client, "snapshotthis.txt", "", -1, false, true, false, false, false) - assert.NoError(t, listErr3) + require.NoError(t, listErr3) assert.Equal(t, "0", out3.Metadata["number"]) return nil @@ -626,7 +627,7 @@ func TestBlobStorage(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] @@ -651,7 +652,7 @@ func TestBlobStorage(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] @@ -669,7 +670,7 @@ func TestBlobStorage(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] @@ -687,7 +688,7 @@ func TestBlobStorage(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] diff --git a/tests/certification/bindings/azure/cosmosdb/cosmosdb_test.go b/tests/certification/bindings/azure/cosmosdb/cosmosdb_test.go index ff4ce862c9..5675b72f26 100644 --- a/tests/certification/bindings/azure/cosmosdb/cosmosdb_test.go +++ b/tests/certification/bindings/azure/cosmosdb/cosmosdb_test.go @@ -23,6 +23,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" cosmosdbbinding "github.com/dapr/components-contrib/bindings/azure/cosmosdb" secretstore_env "github.com/dapr/components-contrib/secretstores/local/env" @@ -64,7 +65,7 @@ func createDocument(generateID bool, includePK bool) map[string]interface{} { func TestCosmosDBBinding(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort := ports[0] currentHTTPPort := ports[1] @@ -95,7 +96,7 @@ func TestCosmosDBBinding(t *testing.T) { testInvokeCreateAndVerify := func(ctx flow.Context) error { document := createDocument(true, true) invokeErr := invokeCreateWithDocument(ctx, document) - assert.NoError(t, invokeErr) + require.NoError(t, invokeErr) // sleep to avoid metdata request rate limit before initializing new client flow.Sleep(3 * time.Second) @@ -115,7 +116,7 @@ func TestCosmosDBBinding(t *testing.T) { {Name: "@id", Value: os.Getenv("AzureCosmosDB")}, }, }) - assert.NoError(t, queryDBErr) + require.NoError(t, queryDBErr) db := &dbs[0] colls, queryCollErr := dbclient.QueryCollections(db.Self, &documentdb.Query{ Query: "SELECT * FROM ROOT r WHERE r.id=@id", @@ -123,7 +124,7 @@ func TestCosmosDBBinding(t *testing.T) { {Name: "@id", Value: os.Getenv("AzureCosmosDBCollection")}, }, }) - assert.NoError(t, queryCollErr) + require.NoError(t, queryCollErr) collection := &colls[0] var items []map[string]interface{} @@ -134,7 +135,7 @@ func TestCosmosDBBinding(t *testing.T) { documentdb.CrossPartition(), ) - assert.NoError(t, queryErr) + require.NoError(t, queryErr) result := items[0] // verify the item retrieved from the database matches the item we inserted @@ -146,7 +147,7 @@ func TestCosmosDBBinding(t *testing.T) { // cleanup _, err = dbclient.DeleteDocument(result["_self"].(string), documentdb.PartitionKey(result["partitionKey"].(string))) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -194,7 +195,7 @@ func TestCosmosDBBinding(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] @@ -214,7 +215,7 @@ func TestCosmosDBBinding(t *testing.T) { Run() ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGRPCPort = ports[0] currentHTTPPort = ports[1] diff --git a/tests/certification/bindings/dubbo/dubbo_test.go b/tests/certification/bindings/dubbo/dubbo_test.go index 386135c926..935441e83b 100644 --- a/tests/certification/bindings/dubbo/dubbo_test.go +++ b/tests/certification/bindings/dubbo/dubbo_test.go @@ -25,6 +25,7 @@ import ( dubboImpl "dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl" hessian "github.com/apache/dubbo-go-hessian2" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/bindings/dubbo" @@ -67,9 +68,9 @@ func TestDubboBinding(t *testing.T) { hessian.RegisterPOJO(reqUser) argTypeList, _ := dubboImpl.GetArgsTypeList([]interface{}{reqUser}) err := enc.Encode(argTypeList) - assert.Nil(t, err) + require.NoError(t, err) err = enc.Encode(reqUser) - assert.Nil(t, err) + require.NoError(t, err) reqData := enc.Buffer() metadata := map[string]string{ @@ -87,16 +88,16 @@ func TestDubboBinding(t *testing.T) { } rsp, err := client.InvokeBinding(ctx, invokeRequest) - assert.Nil(t, err) + require.NoError(t, err) // 4. get rsp value decoder := hessian.NewDecoder(rsp.Data) _, err = decoder.Decode() // decode type - assert.Nil(t, err) + require.NoError(t, err) rspDecodedValue, err := decoder.Decode() // decode value - assert.Nil(t, err) + require.NoError(t, err) err = hessian.ReflectResponse(rspDecodedValue, rspUser) - assert.Nil(t, err) + require.NoError(t, err) assert.Equal(t, helloPrefix+reqUser.Name, rspUser.Name) return nil } diff --git a/tests/certification/bindings/localstorage/localstorage_test.go b/tests/certification/bindings/localstorage/localstorage_test.go index 3b536cea82..f9da8a69e2 100644 --- a/tests/certification/bindings/localstorage/localstorage_test.go +++ b/tests/certification/bindings/localstorage/localstorage_test.go @@ -120,10 +120,10 @@ func TestLocalStorage(t *testing.T) { flow.Sleep(3 * time.Second) err := invokeCreateWithConfig(ctx, map[string]string{"fileName": fileName}) - assert.NoError(t, err) + require.NoError(t, err) raw, err := invokeGetWithConfig(ctx, map[string]string{"fileName": fileName}) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, fileData, string(raw)) return clear() @@ -135,8 +135,8 @@ func TestLocalStorage(t *testing.T) { _, err := invokeGetWithConfig(ctx, map[string]string{"fileName": "not-exists.txt"}) require.Error(t, err) - assert.ErrorContains(t, err, "file not found:") - assert.ErrorContains(t, err, "not-exists.txt") + require.ErrorContains(t, err, "file not found:") + require.ErrorContains(t, err, "not-exists.txt") return clear() } @@ -146,10 +146,10 @@ func TestLocalStorage(t *testing.T) { flow.Sleep(3 * time.Second) err := invokeCreateWithConfig(ctx, map[string]string{"fileName": fileName}) - assert.NoError(t, err) + require.NoError(t, err) err = invokeDeleteWithConfig(ctx, map[string]string{"fileName": fileName}) - assert.NoError(t, err) + require.NoError(t, err) return clear() } @@ -161,11 +161,11 @@ func TestLocalStorage(t *testing.T) { fileNames := []string{fileName + "1", fileName + "2", fileName + "3"} for _, fileName := range fileNames { err := invokeCreateWithConfig(ctx, map[string]string{"fileName": fileName}) - assert.NoError(t, err) + require.NoError(t, err) } raw, err := invokeListWithConfig(ctx, nil) - assert.NoError(t, err) + require.NoError(t, err) for _, fileName := range fileNames { assert.Contains(t, string(raw), fileName) } diff --git a/tests/certification/bindings/postgres/postgres_test.go b/tests/certification/bindings/postgres/postgres_test.go index 792151374d..d8ee52d068 100644 --- a/tests/certification/bindings/postgres/postgres_test.go +++ b/tests/certification/bindings/postgres/postgres_test.go @@ -133,7 +133,7 @@ func TestPostgres(t *testing.T) { createTable := func(ctx flow.Context) error { db, err := sql.Open("pgx", dockerConnectionString) - assert.NoError(t, err) + require.NoError(t, err) _, err = db.Exec("CREATE TABLE " + tableName + " (id INT, c1 TEXT, ts TIMESTAMP);") require.NoError(t, err) db.Close() @@ -202,9 +202,9 @@ func TestPostgresNetworkError(t *testing.T) { createTable := func(ctx flow.Context) error { db, err := sql.Open("pgx", dockerConnectionString) - assert.NoError(t, err) + require.NoError(t, err) _, err = db.Exec("CREATE TABLE " + tableName + " (id INT, c1 TEXT, ts TIMESTAMP);") - assert.NoError(t, err) + require.NoError(t, err) db.Close() return nil } diff --git a/tests/certification/bindings/redis/redis_test.go b/tests/certification/bindings/redis/redis_test.go index 8302ad304d..b5fac57f64 100644 --- a/tests/certification/bindings/redis/redis_test.go +++ b/tests/certification/bindings/redis/redis_test.go @@ -20,6 +20,7 @@ import ( "github.com/dapr/kit/logger" "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -51,7 +52,7 @@ func TestRedisBinding(t *testing.T) { } err := client.InvokeOutputBinding(ctx, invokeRequest) - assert.NoError(t, err) + require.NoError(t, err) rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6399", // host:port of the redis server @@ -60,7 +61,7 @@ func TestRedisBinding(t *testing.T) { }) val, err := rdb.Get(ctx, keyName).Result() - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, dataInserted, val) err = rdb.Close() @@ -85,7 +86,7 @@ func TestRedisBinding(t *testing.T) { } err := client.InvokeOutputBinding(ctx, invokeRequest) - assert.NoError(t, err) + require.NoError(t, err) invokeRequest = &daprClient.InvokeBindingRequest{ Name: bindingName, @@ -95,7 +96,7 @@ func TestRedisBinding(t *testing.T) { } err = client.InvokeOutputBinding(ctx, invokeRequest) - assert.NoError(t, err) + require.NoError(t, err) invokeRequest = &daprClient.InvokeBindingRequest{ Name: bindingName, @@ -104,7 +105,7 @@ func TestRedisBinding(t *testing.T) { } err = client.InvokeOutputBinding(ctx, invokeRequest) - assert.NoError(t, err) + require.NoError(t, err) invokeRequest = &daprClient.InvokeBindingRequest{ Name: bindingName, @@ -113,7 +114,7 @@ func TestRedisBinding(t *testing.T) { } out, err2 := client.InvokeBinding(ctx, invokeRequest) - assert.NoError(t, err2) + require.NoError(t, err2) assert.Equal(t, "42", string(out.Data)) time.Sleep(3 * time.Second) @@ -127,7 +128,7 @@ func TestRedisBinding(t *testing.T) { } out, err2 = client.InvokeBinding(ctx, invokeRequest) - assert.NoError(t, err2) + require.NoError(t, err2) assert.Equal(t, []byte(nil), out.Data) invokeRequest = &daprClient.InvokeBindingRequest{ @@ -137,7 +138,7 @@ func TestRedisBinding(t *testing.T) { } out, err2 = client.InvokeBinding(ctx, invokeRequest) - assert.NoError(t, err2) + require.NoError(t, err2) assert.Equal(t, []byte(nil), out.Data) invokeRequest = &daprClient.InvokeBindingRequest{ @@ -148,7 +149,7 @@ func TestRedisBinding(t *testing.T) { } err = client.InvokeOutputBinding(ctx, invokeRequest) - assert.NoError(t, err) + require.NoError(t, err) invokeRequest = &daprClient.InvokeBindingRequest{ Name: bindingName, @@ -156,7 +157,7 @@ func TestRedisBinding(t *testing.T) { Metadata: map[string]string{"key": "getDelKey", "delete": "true"}, } out, err2 = client.InvokeBinding(ctx, invokeRequest) - assert.NoError(t, err2) + require.NoError(t, err2) assert.Equal(t, "43", string(out.Data)) invokeRequest = &daprClient.InvokeBindingRequest{ @@ -166,7 +167,7 @@ func TestRedisBinding(t *testing.T) { } out, err2 = client.InvokeBinding(ctx, invokeRequest) - assert.NoError(t, err2) + require.NoError(t, err2) assert.Equal(t, []byte(nil), out.Data) return nil @@ -200,7 +201,7 @@ func TestRedisBinding(t *testing.T) { }) val, err := rdb.Get(ctx, keyName).Result() - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, dataInserted, val) err = rdb.Close() diff --git a/tests/certification/bindings/zeebe/command/activate_jobs_test.go b/tests/certification/bindings/zeebe/command/activate_jobs_test.go index 62f66dd0c2..2edad16438 100644 --- a/tests/certification/bindings/zeebe/command/activate_jobs_test.go +++ b/tests/certification/bindings/zeebe/command/activate_jobs_test.go @@ -26,6 +26,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestActivateJobsOperation(t *testing.T) { @@ -47,7 +48,7 @@ func TestActivateJobsOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -65,7 +66,7 @@ func TestActivateJobsOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) jobs, err := zeebe_test.ActicateJob(client, ctx, map[string]interface{}{ "jobType": zeebe_test.JobworkerTestName, @@ -74,7 +75,7 @@ func TestActivateJobsOperation(t *testing.T) { "workerName": workerName, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) @@ -107,7 +108,7 @@ func TestActivateJobsOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) jobs, err := zeebe_test.ActicateJob(client, ctx, map[string]interface{}{ "jobType": zeebe_test.JobworkerTestName, @@ -118,7 +119,7 @@ func TestActivateJobsOperation(t *testing.T) { "requestTimeout": 30 * time.Second, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) diff --git a/tests/certification/bindings/zeebe/command/cancel_instance_test.go b/tests/certification/bindings/zeebe/command/cancel_instance_test.go index 0a37f914e4..0a80b5fccc 100644 --- a/tests/certification/bindings/zeebe/command/cancel_instance_test.go +++ b/tests/certification/bindings/zeebe/command/cancel_instance_test.go @@ -28,6 +28,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestCancelInstanceOperation(t *testing.T) { @@ -50,7 +51,7 @@ func TestCancelInstanceOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -63,7 +64,7 @@ func TestCancelInstanceOperation(t *testing.T) { processInstance, err := zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, processInstance.ProcessInstanceKey) processInstanceKey = processInstance.ProcessInstanceKey @@ -78,10 +79,10 @@ func TestCancelInstanceOperation(t *testing.T) { data, err := json.Marshal(map[string]interface{}{ "processInstanceKey": processInstanceKey, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.CancelInstanceOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) @@ -96,10 +97,10 @@ func TestCancelInstanceOperation(t *testing.T) { "processInstanceKey": 0, }) assert.NotNil(t, data) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.CancelInstanceOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } diff --git a/tests/certification/bindings/zeebe/command/complete_job_test.go b/tests/certification/bindings/zeebe/command/complete_job_test.go index 2fc7774faf..a65eab4e34 100644 --- a/tests/certification/bindings/zeebe/command/complete_job_test.go +++ b/tests/certification/bindings/zeebe/command/complete_job_test.go @@ -28,6 +28,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestCompleteJobOperation(t *testing.T) { @@ -50,7 +51,7 @@ func TestCompleteJobOperation(t *testing.T) { zeebe_test.TestProcessFile, 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -68,7 +69,7 @@ func TestCompleteJobOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -84,7 +85,7 @@ func TestCompleteJobOperation(t *testing.T) { "workerName": workerName, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) @@ -106,10 +107,10 @@ func TestCompleteJobOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.CompleteJobOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) @@ -127,10 +128,10 @@ func TestCompleteJobOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.CompleteJobOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } diff --git a/tests/certification/bindings/zeebe/command/create_instance_test.go b/tests/certification/bindings/zeebe/command/create_instance_test.go index 423157e0bd..1dada16fae 100644 --- a/tests/certification/bindings/zeebe/command/create_instance_test.go +++ b/tests/certification/bindings/zeebe/command/create_instance_test.go @@ -31,6 +31,7 @@ import ( dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/go-sdk/service/common" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.uber.org/multierr" ) @@ -73,7 +74,7 @@ func TestCreateInstanceOperation(t *testing.T) { zeebe_test.TestProcessFile, 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, firstDeployment.Deployments[0].Metadata.Process.BpmnProcessId) assert.Equal(t, int32(1), firstDeployment.Deployments[0].Metadata.Process.Version) @@ -94,7 +95,7 @@ func TestCreateInstanceOperation(t *testing.T) { zeebe_test.IDModifier(id), // changing the name results in a new version zeebe_test.NameModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, secondDeployment.Deployments[0].Metadata.Process.BpmnProcessId) assert.Equal(t, int32(2), secondDeployment.Deployments[0].Metadata.Process.Version) @@ -116,7 +117,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, version1ProcessDefinitionKey, processInstance.ProcessDefinitionKey) assert.NotNil(t, processInstance.ProcessInstanceKey) assert.Equal(t, id, processInstance.BpmnProcessId) @@ -142,7 +143,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, version2ProcessDefinitionKey, processInstance.ProcessDefinitionKey) assert.NotNil(t, processInstance.ProcessInstanceKey) assert.Equal(t, id, processInstance.BpmnProcessId) @@ -168,7 +169,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -186,7 +187,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, version1ProcessDefinitionKey, processInstance.ProcessDefinitionKey) assert.NotNil(t, processInstance.ProcessInstanceKey) assert.Equal(t, id, processInstance.BpmnProcessId) @@ -212,7 +213,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, version2ProcessDefinitionKey, processInstance.ProcessDefinitionKey) assert.NotNil(t, processInstance.ProcessInstanceKey) assert.Equal(t, id, processInstance.BpmnProcessId) @@ -238,7 +239,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -256,7 +257,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{"foo"}, "requestTimeout": requestTimeout, }) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -274,7 +275,7 @@ func TestCreateInstanceOperation(t *testing.T) { "fetchVariables": []string{}, "requestTimeout": requestTimeout, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, version2ProcessDefinitionKey, processInstance.ProcessDefinitionKey) assert.NotNil(t, processInstance.ProcessInstanceKey) assert.Equal(t, id, processInstance.BpmnProcessId) diff --git a/tests/certification/bindings/zeebe/command/deploy_resource_test.go b/tests/certification/bindings/zeebe/command/deploy_resource_test.go index f66e2c1ede..20078294da 100644 --- a/tests/certification/bindings/zeebe/command/deploy_resource_test.go +++ b/tests/certification/bindings/zeebe/command/deploy_resource_test.go @@ -26,6 +26,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestDeployResourceOperation(t *testing.T) { @@ -46,7 +47,7 @@ func TestDeployResourceOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) assert.Equal(t, int32(1), deployment.Deployments[0].Metadata.Process.Version) assert.NotNil(t, deployment.Deployments[0].Metadata.Process.ProcessDefinitionKey) @@ -66,7 +67,7 @@ func TestDeployResourceOperation(t *testing.T) { 2, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Decision.DmnDecisionId) assert.Equal(t, "Test", deployment.Deployments[0].Metadata.Decision.DmnDecisionName) assert.Equal(t, int32(1), deployment.Deployments[0].Metadata.Decision.Version) @@ -96,7 +97,7 @@ func TestDeployResourceOperation(t *testing.T) { // changing the name results in a new version zeebe_test.NameModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) assert.Equal(t, int32(2), deployment.Deployments[0].Metadata.Process.Version) assert.NotNil(t, deployment.Deployments[0].Metadata.Process.ProcessDefinitionKey) diff --git a/tests/certification/bindings/zeebe/command/fail_job_test.go b/tests/certification/bindings/zeebe/command/fail_job_test.go index 7341ed2d4f..73800c2847 100644 --- a/tests/certification/bindings/zeebe/command/fail_job_test.go +++ b/tests/certification/bindings/zeebe/command/fail_job_test.go @@ -35,6 +35,7 @@ import ( dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/go-sdk/service/common" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.uber.org/multierr" ) @@ -51,7 +52,7 @@ func deployProcess(t *testing.T, id string, grpcPort int) func(ctx flow.Context) zeebe_test.IDModifier(id), zeebe_test.RetryModifier("zeebe-jobworker-test", 3)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -71,7 +72,7 @@ func createProcessInstance(t *testing.T, id string, grpcPort int) func(ctx flow. "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -98,7 +99,7 @@ func TestFailJobOperation(t *testing.T) { "workerName": workerName, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) @@ -118,10 +119,10 @@ func TestFailJobOperation(t *testing.T) { "retries": 3, "errorMessage": "test error", }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.FailJobOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) @@ -137,10 +138,10 @@ func TestFailJobOperation(t *testing.T) { "retries": 3, "errorMessage": "test error", }) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.FailJobOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -181,10 +182,10 @@ func TestFailJobOperationWithRetryBackOff(t *testing.T) { atomic.AddInt32(&count, 1) retries, err := strconv.Atoi(in.Metadata["X-Zeebe-Retries"]) - assert.NoError(t, err) + require.NoError(t, err) jobKey, err := strconv.ParseInt(in.Metadata["X-Zeebe-Job-Key"], 10, 64) - assert.NoError(t, err) + require.NoError(t, err) if retries == 1 { ch <- true @@ -201,10 +202,10 @@ func TestFailJobOperationWithRetryBackOff(t *testing.T) { "errorMessage": "test error", "retryBackOff": 15 * time.Second, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.FailJobOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) diff --git a/tests/certification/bindings/zeebe/command/publish_message_test.go b/tests/certification/bindings/zeebe/command/publish_message_test.go index 92821ea1cb..5ea11b58d6 100644 --- a/tests/certification/bindings/zeebe/command/publish_message_test.go +++ b/tests/certification/bindings/zeebe/command/publish_message_test.go @@ -29,6 +29,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestPublishMessage(t *testing.T) { @@ -43,14 +44,14 @@ func TestPublishMessage(t *testing.T) { data, err := json.Marshal(map[string]interface{}{ "messageName": "some-message", }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.PublishMessageResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) @@ -65,14 +66,14 @@ func TestPublishMessage(t *testing.T) { "messageName": "some-message", "correlationKey": "some-correlation-key", }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.PublishMessageResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) @@ -87,14 +88,14 @@ func TestPublishMessage(t *testing.T) { "messageName": "some-message", "timeToLive": "5m", }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.PublishMessageResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) @@ -111,14 +112,14 @@ func TestPublishMessage(t *testing.T) { "foo": "bar", }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.PublishMessageResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) @@ -137,14 +138,14 @@ func TestPublishMessage(t *testing.T) { "foo": "bar", }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.PublishMessageResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) diff --git a/tests/certification/bindings/zeebe/command/set_variables_test.go b/tests/certification/bindings/zeebe/command/set_variables_test.go index 0898d8e45f..f24eafd643 100644 --- a/tests/certification/bindings/zeebe/command/set_variables_test.go +++ b/tests/certification/bindings/zeebe/command/set_variables_test.go @@ -29,6 +29,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestSetVariablesOperation(t *testing.T) { @@ -51,7 +52,7 @@ func TestSetVariablesOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -68,7 +69,7 @@ func TestSetVariablesOperation(t *testing.T) { "foo": "bar", }, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, processInstance.ProcessInstanceKey) processInstanceKey = processInstance.ProcessInstanceKey @@ -86,14 +87,14 @@ func TestSetVariablesOperation(t *testing.T) { "foo": "bar", }, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.SetVariablesOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) variableResponse := &pb.SetVariablesResponse{} err = json.Unmarshal(res.Data, variableResponse) - assert.NoError(t, err) + require.NoError(t, err) assert.NotEqual(t, 0, variableResponse.Key) assert.Nil(t, res.Metadata) @@ -110,10 +111,10 @@ func TestSetVariablesOperation(t *testing.T) { "foo": "bar", }, }) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.SetVariablesOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } diff --git a/tests/certification/bindings/zeebe/command/throw_error_test.go b/tests/certification/bindings/zeebe/command/throw_error_test.go index ac74c3107d..18b9967b9d 100644 --- a/tests/certification/bindings/zeebe/command/throw_error_test.go +++ b/tests/certification/bindings/zeebe/command/throw_error_test.go @@ -28,6 +28,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestThrowErrorOperation(t *testing.T) { @@ -51,7 +52,7 @@ func TestThrowErrorOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -69,7 +70,7 @@ func TestThrowErrorOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -85,7 +86,7 @@ func TestThrowErrorOperation(t *testing.T) { "workerName": workerName, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) @@ -105,10 +106,10 @@ func TestThrowErrorOperation(t *testing.T) { "errorCode": "test-error", "errorMessage": "test error", }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.ThrowErrorOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) @@ -124,10 +125,10 @@ func TestThrowErrorOperation(t *testing.T) { "errorCode": "test-error", "errorMessage": "test error", }) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.ThrowErrorOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } diff --git a/tests/certification/bindings/zeebe/command/topology_test.go b/tests/certification/bindings/zeebe/command/topology_test.go index 212eda2bcf..40b496969d 100644 --- a/tests/certification/bindings/zeebe/command/topology_test.go +++ b/tests/certification/bindings/zeebe/command/topology_test.go @@ -29,6 +29,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestTopologyOperation(t *testing.T) { @@ -50,23 +51,23 @@ func TestTopologyOperation(t *testing.T) { envVars := zeebe_test.GetEnvVars("../.env") topology := &pb.TopologyResponse{} err := json.Unmarshal(res.Data, topology) - assert.NoError(t, err) + require.NoError(t, err) expectedClusterSize, err := strconv.ParseInt(envVars.ZeebeBrokerClusterSize, 10, 32) - assert.NoError(t, err) + require.NoError(t, err) expectedPartitionsCount, err := strconv.ParseInt(envVars.ZeebeBrokerPartitionsCount, 10, 32) - assert.NoError(t, err) + require.NoError(t, err) expectedReplicationFactor, err := strconv.ParseInt(envVars.ZeebeBrokerReplicationFactor, 10, 32) - assert.NoError(t, err) + require.NoError(t, err) brokerGatewayPort, err := strconv.ParseInt(envVars.ZeebeBrokerGatewayPort, 10, 32) - assert.NoError(t, err) + require.NoError(t, err) expectedBrokerPort := brokerGatewayPort + 1 - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Metadata) assert.Equal(t, 1, len(topology.Brokers)) assert.Equal(t, int32(0), topology.Brokers[0].NodeId) diff --git a/tests/certification/bindings/zeebe/command/update_job_retries_test.go b/tests/certification/bindings/zeebe/command/update_job_retries_test.go index 9714277273..3e050170f1 100644 --- a/tests/certification/bindings/zeebe/command/update_job_retries_test.go +++ b/tests/certification/bindings/zeebe/command/update_job_retries_test.go @@ -28,6 +28,7 @@ import ( "github.com/dapr/components-contrib/tests/certification/flow/sidecar" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestUpdateJobRetriesOperation(t *testing.T) { @@ -51,7 +52,7 @@ func TestUpdateJobRetriesOperation(t *testing.T) { 1, zeebe_test.IDModifier(id)) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, id, deployment.Deployments[0].Metadata.Process.BpmnProcessId) return nil @@ -69,7 +70,7 @@ func TestUpdateJobRetriesOperation(t *testing.T) { "bar": "foo", }, }) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -85,7 +86,7 @@ func TestUpdateJobRetriesOperation(t *testing.T) { "workerName": workerName, }) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, jobs) assert.Equal(t, 1, len(*jobs)) @@ -104,10 +105,10 @@ func TestUpdateJobRetriesOperation(t *testing.T) { "jobKey": activatedJobKey, "retries": 3, }) - assert.NoError(t, err) + require.NoError(t, err) res, err := zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.UpdateJobRetriesOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) assert.Nil(t, res.Metadata) @@ -122,10 +123,10 @@ func TestUpdateJobRetriesOperation(t *testing.T) { "jobKey": 1, "retries": 3, }) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.ExecCommandOperation(ctx, client, bindings_zeebe_command.UpdateJobRetriesOperation, data, nil) - assert.Error(t, err) + require.Error(t, err) return nil } diff --git a/tests/certification/bindings/zeebe/jobworker/jobworker_test.go b/tests/certification/bindings/zeebe/jobworker/jobworker_test.go index 33d5343e1b..0b1ef4ba0d 100644 --- a/tests/certification/bindings/zeebe/jobworker/jobworker_test.go +++ b/tests/certification/bindings/zeebe/jobworker/jobworker_test.go @@ -42,6 +42,7 @@ import ( "github.com/dapr/go-sdk/service/common" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.uber.org/multierr" ) @@ -66,7 +67,6 @@ func deployCalcProcess( zeebe_test.CalcProcessFile, 1, zeebe_test.IDModifier(id)) - if err != nil { return err } @@ -87,7 +87,6 @@ func deployTestProcess( 1, zeebe_test.IDModifier(id), zeebe_test.RetryModifier("zeebe-jobworker-test", retries)) - if err != nil { return err } @@ -193,7 +192,7 @@ func calcResultWorker( return func(context context.Context, in *common.BindingEvent) ([]byte, error) { result := &calcResult{} err := json.Unmarshal(in.Data, result) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expectedResult, result.Result) atomic.AddInt32(count, 1) @@ -219,7 +218,7 @@ func calcVariablesWorker( return func(context context.Context, in *common.BindingEvent) ([]byte, error) { vars := &calcVariables{} err := json.Unmarshal(in.Data, vars) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expectedOperator, vars.Operator) assert.Equal(t, expectedFirstOperand, vars.FirstOperand) assert.Equal(t, expectedSecondOperand, vars.SecondOperand) @@ -253,7 +252,7 @@ func TestCalcJobworkerByInstanceCreationWithAutocompleteTrue(t *testing.T) { defer client.Close() err := deployCalcProcess(client, id) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, @@ -263,7 +262,7 @@ func TestCalcJobworkerByInstanceCreationWithAutocompleteTrue(t *testing.T) { "secondOperand": 4, }, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -317,7 +316,7 @@ func TestCalcJobworkerBySendingMessageWithAutocompleteFalse(t *testing.T) { defer client.Close() err := deployCalcProcess(client, id) - assert.NoError(t, err) + require.NoError(t, err) data, _ := json.Marshal(map[string]interface{}{ "messageName": "start-calc", @@ -331,7 +330,7 @@ func TestCalcJobworkerBySendingMessageWithAutocompleteFalse(t *testing.T) { assert.NotNil(t, data) _, err = zeebe_test.ExecCommandOperation(context.Background(), client, bindings_zeebe_command.PublishMessageOperation, data, nil) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -394,12 +393,12 @@ func TestWorkerRetriesThreeTimes(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 3) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -483,12 +482,12 @@ func TestWorkerReceivesAllHeaders(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 3) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -541,7 +540,7 @@ func TestWorkerFetchesAllVariables(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 1) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, @@ -551,7 +550,7 @@ func TestWorkerFetchesAllVariables(t *testing.T) { "secondOperand": 3, }, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -604,7 +603,7 @@ func TestWorkerFetchesSelectedVariables(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 1) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, @@ -614,7 +613,7 @@ func TestWorkerFetchesSelectedVariables(t *testing.T) { "secondOperand": 3, }, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -677,12 +676,12 @@ func TestJobWorkerHandlesOutage(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 100) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -755,13 +754,13 @@ func TestWorkerHandlesConcurrency(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 1) - assert.NoError(t, err) + require.NoError(t, err) for i := 0; i < 50; i++ { _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) } return nil @@ -831,12 +830,12 @@ func TestJobWorkerHandlesTls(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 100) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) select { case <-ch: @@ -900,12 +899,12 @@ func TestJobWorkerHandlesRetryBackOff(t *testing.T) { defer client.Close() err := deployTestProcess(client, id, 3) - assert.NoError(t, err) + require.NoError(t, err) _, err = zeebe_test.CreateProcessInstance(client, ctx, map[string]interface{}{ "bpmnProcessId": id, }) - assert.NoError(t, err) + require.NoError(t, err) start := time.Now() diff --git a/tests/certification/configuration/redis/redis_test.go b/tests/certification/configuration/redis/redis_test.go index 17c4ab4e3f..db29b665e9 100644 --- a/tests/certification/configuration/redis/redis_test.go +++ b/tests/certification/configuration/redis/redis_test.go @@ -34,6 +34,7 @@ import ( "github.com/dapr/kit/logger" redis "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/tests/certification/flow/watcher" ) @@ -266,7 +267,7 @@ func TestRedis(t *testing.T) { }) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -296,7 +297,7 @@ func TestRedis(t *testing.T) { Items: castConfigurationItems(items), } updateEventInJson, err := json.Marshal(updateEvent) - assert.NoError(t, err) + require.NoError(t, err) message.Observe(string(updateEventInJson)) }) return errSubscribe @@ -381,7 +382,7 @@ func TestRedis(t *testing.T) { // Start subscriber subscribing to keys {key1,key2} Step("start subscriber", subscribefn([]string{key1, key2}, messageWatcher)). Step("wait for subscriber to be ready", flow.Sleep(5*time.Second)). - //Run redis commands and test updates are received by the subscriber + // Run redis commands and test updates are received by the subscriber Step("testSubscribe", testSubscribe(messageWatcher)). Step("reset", flow.Reset(messageWatcher)). // @@ -419,5 +420,4 @@ func TestRedis(t *testing.T) { // // Stop the subscriber Step("stop subscriber", stopSubscriber). Run() - } diff --git a/tests/certification/go.mod b/tests/certification/go.mod index 18f1b8c3e6..ddb96a9b6d 100644 --- a/tests/certification/go.mod +++ b/tests/certification/go.mod @@ -1,12 +1,14 @@ module github.com/dapr/components-contrib/tests/certification -go 1.20 +go 1.21 + +toolchain go1.21.4 require ( cloud.google.com/go/pubsub v1.33.0 dubbo.apache.org/dubbo-go/v3 v3.0.3-0.20230118042253-4f159a2b38f3 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 - github.com/IBM/sarama v1.41.1 + github.com/IBM/sarama v1.42.1 github.com/a8m/documentdb v1.3.0 github.com/apache/dubbo-go-hessian2 v1.11.5 github.com/apache/pulsar-client-go v0.11.0 @@ -23,7 +25,6 @@ require ( github.com/eclipse/paho.mqtt.golang v1.4.3 github.com/go-chi/chi/v5 v5.0.10 github.com/go-redis/redis/v8 v8.11.5 - github.com/golang/protobuf v1.5.3 github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.4.0 github.com/jackc/pgx/v5 v5.4.3 @@ -137,6 +138,7 @@ require ( github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/cel-go v0.13.0 // indirect github.com/google/gnostic v0.6.9 // indirect diff --git a/tests/certification/go.sum b/tests/certification/go.sum index 7e1d5053ee..433056093c 100644 --- a/tests/certification/go.sum +++ b/tests/certification/go.sum @@ -33,6 +33,7 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= cloud.google.com/go/kms v1.15.3 h1:RYsbxTRmk91ydKCzekI2YjryO4c5Y2M80Zwcs9/D/cI= +cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -77,9 +78,13 @@ github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.5.0/go.mod h1:4B github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.1.1 h1:gZ1ZZvrVUhDNsGNpbo2N87Y0CJB8p3IS5UH9Z4Ui97g= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub v1.1.1/go.mod h1:7fQVOnRA11ScLE8dOCWanXHQa2NMFOM2i0u/1VRICXA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1 h1:8TkzQBrN9PWIwo7ekdd696KpC6IfTltV2/F8qKKBWik= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.0.1/go.mod h1:aprFpXPQiTyG5Rkz6Ot5pvU6y6YKg/AKYOcLCoxN0bk= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= @@ -96,14 +101,16 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/IBM/sarama v1.41.1 h1:B4/TdHce/8Ipza+qrLIeNJ9D1AOxZVp/3uDv6H/dp2M= -github.com/IBM/sarama v1.41.1/go.mod h1:JFCPURVskaipJdKRFkiE/OZqQHw7jqliaJmRwXCmSSw= +github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= +github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.2.0 h1:/Jdm5QfyM8zdlqT6WVZU4cfP23sot6CEHA4CS49Ezig= github.com/PuerkitoBio/purell v1.2.0/go.mod h1:OhLRTaaIzhvIyofkJfB24gokC7tM42Px5UhoT32THBk= @@ -134,7 +141,9 @@ github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8V github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8= github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis/v2 v2.30.5 h1:3r6kTHdKnuP4fkS8k2IrvSfxpxUTcW1SOL0wN7b7Dt0= +github.com/alicebob/miniredis/v2 v2.30.5/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= @@ -206,7 +215,9 @@ github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8b github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c= github.com/brianvoe/gofakeit/v6 v6.16.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= @@ -352,6 +363,7 @@ github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hg github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= @@ -400,6 +412,7 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= @@ -416,10 +429,12 @@ github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= @@ -443,6 +458,7 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= +github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -467,6 +483,7 @@ github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -531,6 +548,7 @@ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGw github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -581,6 +599,7 @@ github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4g github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.13.0 h1:z+8OBOcmh7IeKyqwT/6IlnMvy621fYUqnTVPEdegGlU= github.com/google/cel-go v0.13.0/go.mod h1:K2hpQgEjDp18J76a2DKFRlPBPpgRZgi6EbnpDgIhJ8s= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -674,6 +693,7 @@ github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUU github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -693,6 +713,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -723,6 +744,7 @@ github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -850,6 +872,7 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= @@ -915,6 +938,7 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -986,6 +1010,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -995,9 +1020,12 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -1018,6 +1046,7 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pashagolub/pgxmock/v2 v2.12.0 h1:IVRmQtVFNCoq7NOZ+PdfvB6fwnLJmEuWDhnc3yrDxBs= +github.com/pashagolub/pgxmock/v2 v2.12.0/go.mod h1:D3YslkN/nJ4+umVqWmbwfSXugJIjPMChkGBG47OJpNw= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -1127,6 +1156,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= @@ -1270,6 +1300,7 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= +github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= @@ -1881,6 +1912,7 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu 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/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= +google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= 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= @@ -1918,6 +1950,7 @@ gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1975,7 +2008,9 @@ modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs= modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= @@ -1989,10 +2024,13 @@ modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0 modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= +modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/tests/certification/middleware/http/bearer/bearer_test.go b/tests/certification/middleware/http/bearer/bearer_test.go index 9d3389d4a2..3b20628e15 100644 --- a/tests/certification/middleware/http/bearer/bearer_test.go +++ b/tests/certification/middleware/http/bearer/bearer_test.go @@ -437,7 +437,7 @@ func TestHTTPMiddlewareBearer(t *testing.T) { "audience": tokenAudience, }) require.Error(t, err) - assert.ErrorContains(t, err, "invalid response status code: 404") + require.ErrorContains(t, err, "invalid response status code: 404") // No endpoint should be requested assert.Equal(t, curRequestsOpenIDConfiguration, requestsOpenIDConfiguration.Load()) @@ -453,7 +453,7 @@ func TestHTTPMiddlewareBearer(t *testing.T) { "audience": tokenAudience, }) require.Error(t, err) - assert.ErrorContains(t, err, "the issuer found in the OpenID Configuration document") + require.ErrorContains(t, err, "the issuer found in the OpenID Configuration document") // Only the OpenID Configuration endpoint should be requested assert.Equal(t, curRequestsOpenIDConfiguration+1, requestsOpenIDConfiguration.Load()) @@ -470,7 +470,7 @@ func TestHTTPMiddlewareBearer(t *testing.T) { "jwksURL": tokenIssuer + "/not-found/jwks.json", }) require.Error(t, err) - assert.ErrorContains(t, err, "failed to fetch JWKS") + require.ErrorContains(t, err, "failed to fetch JWKS") // No endpoint should be requested assert.Equal(t, curRequestsOpenIDConfiguration, requestsOpenIDConfiguration.Load()) diff --git a/tests/certification/pubsub/azure/eventhubs/eventhubs_test.go b/tests/certification/pubsub/azure/eventhubs/eventhubs_test.go index 790e9b58df..5caff439e5 100644 --- a/tests/certification/pubsub/azure/eventhubs/eventhubs_test.go +++ b/tests/certification/pubsub/azure/eventhubs/eventhubs_test.go @@ -23,7 +23,6 @@ import ( "time" "github.com/google/uuid" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/multierr" @@ -182,7 +181,7 @@ func TestEventhubs(t *testing.T) { deleteEventhub := func() error { output, err := exec.Command("/bin/sh", "delete-eventhub.sh", topicToBeCreated).Output() - assert.NoErrorf(t, err, "Error in delete-eventhub.sh.:\n%s", string(output)) + require.NoErrorf(t, err, "Error in delete-eventhub.sh.:\n%s", string(output)) return nil } @@ -195,7 +194,7 @@ func TestEventhubs(t *testing.T) { messageWatchers.ExpectStrings(messages...) output, err := exec.Command("/bin/sh", "send-iot-device-events.sh", topicToBeCreated).Output() - assert.NoErrorf(t, err, "Error in send-iot-device-events.sh.:\n%s", string(output)) + require.NoErrorf(t, err, "Error in send-iot-device-events.sh.:\n%s", string(output)) return nil } } diff --git a/tests/certification/secretstores/azure/keyvault/keyvault_test.go b/tests/certification/secretstores/azure/keyvault/keyvault_test.go index f4b3165b27..3b81dc90ab 100644 --- a/tests/certification/secretstores/azure/keyvault/keyvault_test.go +++ b/tests/certification/secretstores/azure/keyvault/keyvault_test.go @@ -24,6 +24,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" // SecretStores @@ -45,7 +46,7 @@ const ( func TestKeyVault(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHttpPort := ports[1] @@ -65,7 +66,7 @@ func TestKeyVault(t *testing.T) { // .github/infrastructure/conformance/azure/setup-azure-conf-test.sh, // so it reuses the tests/conformance/secretstores/secretstores.go test secrets. res, err := client.GetSecret(ctx, "azurekeyvault", "secondsecret", opt) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "efgh", res["secondsecret"]) return nil } @@ -84,7 +85,7 @@ func TestKeyVault(t *testing.T) { // Currently port reuse is still not quite working in the Dapr runtime. ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort = ports[0] currentHttpPort = ports[1] diff --git a/tests/certification/secretstores/hashicorp/vault/flow_helpers.go b/tests/certification/secretstores/hashicorp/vault/flow_helpers.go index 64c18f4d62..5642ba66b7 100644 --- a/tests/certification/secretstores/hashicorp/vault/flow_helpers.go +++ b/tests/certification/secretstores/hashicorp/vault/flow_helpers.go @@ -29,7 +29,7 @@ import ( "github.com/dapr/dapr/pkg/runtime/registry" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/kit/logger" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -61,7 +61,7 @@ func componentRuntimeOptions() embedded.Option { func GetCurrentGRPCAndHTTPPort(t *testing.T) (int, int) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHttpPort := ports[1] diff --git a/tests/certification/secretstores/hashicorp/vault/metadata_helpers.go b/tests/certification/secretstores/hashicorp/vault/metadata_helpers.go index 6157dd474c..5334fd91db 100644 --- a/tests/certification/secretstores/hashicorp/vault/metadata_helpers.go +++ b/tests/certification/secretstores/hashicorp/vault/metadata_helpers.go @@ -19,8 +19,8 @@ import ( "github.com/dapr/components-contrib/secretstores" "github.com/dapr/components-contrib/tests/certification/flow" + "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/go-sdk/client" - "github.com/golang/protobuf/ptypes/empty" "github.com/stretchr/testify/assert" ) @@ -74,7 +74,7 @@ func getComponentCapabilities(ctx flow.Context, currentGrpcPort int, targetCompo clientCtx := context.Background() - resp, err := daprClient.GrpcClient().GetMetadata(clientCtx, &empty.Empty{}) + resp, err := daprClient.GrpcClient().GetMetadata(clientCtx, &runtime.GetMetadataRequest{}) assert.NoError(ctx.T, err) assert.NotNil(ctx.T, resp) assert.NotNil(ctx.T, resp.GetRegisteredComponents()) diff --git a/tests/certification/secretstores/local/env/envstore_test.go b/tests/certification/secretstores/local/env/envstore_test.go index ee4e72ba64..ab27272095 100644 --- a/tests/certification/secretstores/local/env/envstore_test.go +++ b/tests/certification/secretstores/local/env/envstore_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" // SecretStores @@ -39,7 +40,7 @@ const ( func TestEnv(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHttpPort := ports[1] @@ -54,7 +55,7 @@ func TestEnv(t *testing.T) { defer client.Close() res, err := client.GetSecret(ctx, "envvar-secret-store", "certtestsecret", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "abcd", res["certtestsecret"]) return nil } diff --git a/tests/certification/secretstores/local/file/filestore_test.go b/tests/certification/secretstores/local/file/filestore_test.go index 1e2eec2e63..b879166c87 100644 --- a/tests/certification/secretstores/local/file/filestore_test.go +++ b/tests/certification/secretstores/local/file/filestore_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" // SecretStores @@ -39,7 +40,7 @@ const ( func TestEnv(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHttpPort := ports[1] @@ -52,11 +53,11 @@ func TestEnv(t *testing.T) { defer client.Close() res, err := client.GetSecret(ctx, "file-secret-store", "certtestsecret", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "abcd", res["certtestsecret"]) res, err = client.GetSecret(ctx, "file-secret-store", "nestedsecret:secret", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "efgh", res["nestedsecret:secret"]) return nil } @@ -69,11 +70,11 @@ func TestEnv(t *testing.T) { defer client.Close() res, err := client.GetSecret(ctx, "file-secret-store", "certtestsecret", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "abcd", res["certtestsecret"]) res, err = client.GetSecret(ctx, "file-secret-store", "nestedsecret::secret", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "efgh", res["nestedsecret::secret"]) return nil } diff --git a/tests/certification/state/aws/dynamodb/dynamodb_test.go b/tests/certification/state/aws/dynamodb/dynamodb_test.go index c3461871b0..49a6c2c38f 100644 --- a/tests/certification/state/aws/dynamodb/dynamodb_test.go +++ b/tests/certification/state/aws/dynamodb/dynamodb_test.go @@ -31,6 +31,7 @@ import ( dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -40,7 +41,7 @@ const ( func TestAWSDynamoDBStorage(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -58,18 +59,18 @@ func TestAWSDynamoDBStorage(t *testing.T) { // save state, default options: strong, last-write err = client.SaveState(ctx, statestore, stateKey, []byte(stateValue), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, item) assert.Equal(t, stateValue, string(item.Value)) assert.NotContains(t, item.Metadata, "ttlExpireTime") // delete state err = client.DeleteState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -96,20 +97,21 @@ func TestAWSDynamoDBStorage(t *testing.T) { test := func(metaTTL map[string]string, expectedValue string) { err = client.SaveState(ctx, statestore, stateKey, []byte(stateValue), metaTTL) - assert.NoError(t, err) + require.NoError(t, err) item, err := client.GetState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expectedValue, string(item.Value)) if len(expectedValue) > 0 { assert.Contains(t, item.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, item.Metadata["ttlExpireTime"]) - _ = assert.NoError(t, err) && assert.InDelta(t, time.Now().Add(5*time.Minute).Unix(), expireTime.Unix(), 10) + require.NoError(t, err) + assert.InDelta(t, time.Now().Add(5*time.Minute).Unix(), expireTime.Unix(), 10) } err = client.DeleteState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) } // Test with TTL long enough for value to exist @@ -135,7 +137,7 @@ func TestAWSDynamoDBStorage(t *testing.T) { kdel := "reqKey2" err = cl.SaveState(ctx, statestore, kdel, []byte(kdel), nil) - assert.NoError(t, err) + require.NoError(t, err) err = cl.ExecuteStateTransaction(ctx, statestore, nil, []*client.StateOperation{ { @@ -168,13 +170,13 @@ func TestAWSDynamoDBStorage(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) err = cl.DeleteState(ctx, statestore, ktx1, nil) - assert.NoError(t, err) + require.NoError(t, err) err = cl.DeleteState(ctx, statestore, ktx2, nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } diff --git a/tests/certification/state/azure/blobstorage/blobstorage_test.go b/tests/certification/state/azure/blobstorage/blobstorage_test.go index 2b3cc72b96..7ac8cd27a2 100644 --- a/tests/certification/state/azure/blobstorage/blobstorage_test.go +++ b/tests/certification/state/azure/blobstorage/blobstorage_test.go @@ -35,6 +35,7 @@ import ( state_loader "github.com/dapr/dapr/pkg/components/state" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -44,7 +45,7 @@ const ( func TestAzureBlobStorage(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -59,16 +60,16 @@ func TestAzureBlobStorage(t *testing.T) { // save state, default options: strong, last-write err = client.SaveState(ctx, statestore, certificationTestPrefix+"key1", []byte("certificationdata"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, statestore, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "certificationdata", string(item.Value)) // delete state err = client.DeleteState(ctx, statestore, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } diff --git a/tests/certification/state/azure/cosmosdb/cosmosdb_test.go b/tests/certification/state/azure/cosmosdb/cosmosdb_test.go index 45e7a5be9e..95afb6bdc8 100644 --- a/tests/certification/state/azure/cosmosdb/cosmosdb_test.go +++ b/tests/certification/state/azure/cosmosdb/cosmosdb_test.go @@ -49,7 +49,7 @@ func TestAzureCosmosDBStorage(t *testing.T) { sidecarName := sidecarNamePrefix + uuid.NewString() ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -67,16 +67,16 @@ func TestAzureCosmosDBStorage(t *testing.T) { // save state, default options: strong, last-write err = client.SaveState(ctx, statestore, stateKey, []byte(stateValue), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, stateValue, string(item.Value)) // delete state err = client.DeleteState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -106,7 +106,7 @@ func TestAzureCosmosDBStorage(t *testing.T) { }, }, }) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -136,16 +136,16 @@ func TestAzureCosmosDBStorage(t *testing.T) { test := func(setMeta, getMeta map[string]string, expectedValue string) { // save state, default options: strong, last-write err = client.SaveState(ctx, statestore, stateKey, []byte(stateValue), setMeta) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, statestore, stateKey, getMeta) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, expectedValue, string(item.Value)) // delete state err = client.DeleteState(ctx, statestore, stateKey, setMeta) - assert.NoError(t, err) + require.NoError(t, err) } // Test with no partition key diff --git a/tests/certification/state/azure/tablestorage/tablestorage_test.go b/tests/certification/state/azure/tablestorage/tablestorage_test.go index ea8ca0564e..4335a528c2 100644 --- a/tests/certification/state/azure/tablestorage/tablestorage_test.go +++ b/tests/certification/state/azure/tablestorage/tablestorage_test.go @@ -33,6 +33,7 @@ import ( state_loader "github.com/dapr/dapr/pkg/components/state" dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -42,7 +43,7 @@ const ( func TestAzureTableStorage(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -57,16 +58,16 @@ func TestAzureTableStorage(t *testing.T) { // save state, default options: strong, last-write err = client.SaveState(ctx, savestore, certificationTestPrefix+"key1", []byte("certificationdata"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, getstore, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "certificationdata", string(item.Value)) // delete state err = client.DeleteState(ctx, savestore, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } diff --git a/tests/certification/state/cassandra/cassandra_test.go b/tests/certification/state/cassandra/cassandra_test.go index 861c3a3cf3..fedff5e0c4 100644 --- a/tests/certification/state/cassandra/cassandra_test.go +++ b/tests/certification/state/cassandra/cassandra_test.go @@ -55,7 +55,7 @@ func TestCassandra(t *testing.T) { log := logger.NewLogger("dapr.components") stateStore := state_cassandra.NewCassandraStateStore(log).(*state_cassandra.Cassandra) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) stateRegistry := state_loader.NewRegistry() stateRegistry.Logger = log @@ -74,24 +74,24 @@ func TestCassandra(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("cassandraCert"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "cassandraCert", string(item.Value)) assert.NotContains(t, item.Metadata, "ttlExpireTime") errUpdate := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("cassandraCertUpdate"), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, "cassandraCertUpdate", string(item.Value)) assert.NotContains(t, item.Metadata, "ttlExpireTime") // delete state err = client.DeleteState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -105,42 +105,39 @@ func TestCassandra(t *testing.T) { defer client.Close() ttlInSecondsWrongValue := "mock value" - mapOptionsWrongValue := - map[string]string{ - "ttlInSeconds": ttlInSecondsWrongValue, - } + mapOptionsWrongValue := map[string]string{ + "ttlInSeconds": ttlInSecondsWrongValue, + } ttlInSecondsNonExpiring := 0 - mapOptionsNonExpiring := - map[string]string{ - "ttlInSeconds": strconv.Itoa(ttlInSecondsNonExpiring), - } + mapOptionsNonExpiring := map[string]string{ + "ttlInSeconds": strconv.Itoa(ttlInSecondsNonExpiring), + } ttlInSeconds := 5 - mapOptions := - map[string]string{ - "ttlInSeconds": strconv.Itoa(ttlInSeconds), - } + mapOptions := map[string]string{ + "ttlInSeconds": strconv.Itoa(ttlInSeconds), + } err1 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl1", []byte("cassandraCert"), mapOptionsWrongValue) assert.Error(t, err1) err2 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl2", []byte("cassandraCert2"), mapOptionsNonExpiring) - assert.NoError(t, err2) + require.NoError(t, err2) err3 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl3", []byte("cassandraCert3"), mapOptions) - assert.NoError(t, err3) + require.NoError(t, err3) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "cassandraCert3", string(item.Value)) require.Contains(t, item.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, item.Metadata["ttlExpireTime"]) require.NoError(t, err) assert.InDelta(t, time.Now().Add(time.Second*5).Unix(), expireTime.Unix(), 3) time.Sleep(5 * time.Second) - //entry should be expired now + // entry should be expired now itemAgain, errAgain := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) - assert.NoError(t, errAgain) + require.NoError(t, errAgain) assert.Nil(t, nil, itemAgain) return nil @@ -155,7 +152,7 @@ func TestCassandra(t *testing.T) { // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl2", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "cassandraCert2", string(item.Value)) return nil @@ -168,9 +165,9 @@ func TestCassandra(t *testing.T) { } defer client.Close() - //should fail due to lack of replicas + // should fail due to lack of replicas err = client.SaveState(ctx, stateStoreFactorFail, certificationTestPrefix+"key1", []byte("cassandraCert"), nil) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -183,7 +180,7 @@ func TestCassandra(t *testing.T) { defer client.Close() // should fail due to unsupported version err = client.SaveState(ctx, stateStoreVersionFail, certificationTestPrefix+"key1", []byte("cassandraCert"), nil) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -202,7 +199,7 @@ func TestCassandra(t *testing.T) { Step("Run TTL related test", timeToLiveTest). Step("interrupt network", network.InterruptNetwork(10*time.Second, nil, nil, "9044:9042")). - //Component should recover at this point. + // Component should recover at this point. Step("wait", flow.Sleep(30*time.Second)). Step("Run basic test again to verify reconnection occurred", basicTest). Step("stop cassandra server", dockercompose.Stop("cassandra", dockerComposeYAML, "cassandra")). @@ -231,14 +228,13 @@ func TestCassandra(t *testing.T) { Step("wait", flow.Sleep(30*time.Second)). Step("Run replication factor fail test", failVerTest). Run() - } func TestCluster(t *testing.T) { log := logger.NewLogger("dapr.components") stateStore := state_cassandra.NewCassandraStateStore(log).(*state_cassandra.Cassandra) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -257,22 +253,22 @@ func TestCluster(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreCluster, certificationTestPrefix+"key1", []byte("cassandraCert"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreCluster, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "cassandraCert", string(item.Value)) errUpdate := client.SaveState(ctx, stateStoreCluster, certificationTestPrefix+"key1", []byte("cassandraCertUpdate"), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreCluster, certificationTestPrefix+"key1", nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, "cassandraCertUpdate", string(item.Value)) // delete state err = client.DeleteState(ctx, stateStoreCluster, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -285,11 +281,11 @@ func TestCluster(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreClusterFail, certificationTestPrefix+"key1", []byte("cassandraCert"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state _, err = client.GetStateWithConsistency(ctx, stateStoreClusterFail, certificationTestPrefix+"key1", nil, goclient.StateConsistencyUndefined) - assert.Error(t, err) + require.Error(t, err) return nil } @@ -317,5 +313,4 @@ func TestCluster(t *testing.T) { Step("wait", flow.Sleep(30*time.Second)). Step("Run consistency fail test", failTest). Run() - } diff --git a/tests/certification/state/cockroachdb/cockroachdb_test.go b/tests/certification/state/cockroachdb/cockroachdb_test.go index 173c76a813..7ace691948 100644 --- a/tests/certification/state/cockroachdb/cockroachdb_test.go +++ b/tests/certification/state/cockroachdb/cockroachdb_test.go @@ -57,7 +57,7 @@ func TestCockroach(t *testing.T) { stateStore := state_cockroach.New(log).(*postgresql.PostgreSQL) ports, err := dapr_testing.GetFreePorts(3) - assert.NoError(t, err) + require.NoError(t, err) stateRegistry := state_loader.NewRegistry() stateRegistry.Logger = log @@ -96,26 +96,26 @@ func TestCockroach(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("certificationdata"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "certificationdata", string(item.Value)) errUpdate := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("cockroachCertUpdate"), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, "cockroachCertUpdate", string(item.Value)) // delete state err = client.DeleteState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, errUpdatedGet = client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, []byte(nil), item.Value) return nil } @@ -131,7 +131,7 @@ func TestCockroach(t *testing.T) { resp, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: keyOneString, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "2", *resp.ETag) // 2 is returned since the previous etag value of "1" was incremented by 1 when the update occurred assert.Equal(t, "\"Overwrite Success\"", string(resp.Data)) @@ -148,7 +148,7 @@ func TestCockroach(t *testing.T) { Key: keyOneString, Value: "v1", }) - assert.NoError(t, err) + require.NoError(t, err) // Setting with an etag wil do an update, not an insert so an error is expected since the etag of 100 is not present err = stateStore.Set(context.Background(), &state.SetRequest{ @@ -161,7 +161,7 @@ func TestCockroach(t *testing.T) { resp, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: keyOneString, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, etag1, *resp.ETag) // 1 is returned since the default when the new data is written is a value of 1 assert.Equal(t, "\"v1\"", string(resp.Data)) // v1 is returned since it was the only item successfully inserted with the key of keyOneString @@ -172,12 +172,12 @@ func TestCockroach(t *testing.T) { Value: "Overwrite Success", ETag: &etag1, }) - assert.NoError(t, err) + require.NoError(t, err) resp, err = stateStore.Get(context.Background(), &state.GetRequest{ Key: keyOneString, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "2", *resp.ETag) // 2 is returned since the previous etag value of "1" was incremented by 1 when the update occurred assert.Equal(t, "\"Overwrite Success\"", string(resp.Data)) @@ -188,11 +188,11 @@ func TestCockroach(t *testing.T) { transactionsTest := func(ctx flow.Context) error { // Set state to allow for a delete operation inside the multi list err = stateStore.Set(context.Background(), &state.SetRequest{Key: certificationTestPrefix + "key1", Value: []byte("certificationdata")}) - assert.NoError(t, err) + require.NoError(t, err) // get state item, errUpdatedGet := stateStore.Get(context.Background(), &state.GetRequest{Key: certificationTestPrefix + "key1"}) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, []byte("certificationdata"), item.Data) err = stateStore.Multi(context.Background(), &state.TransactionalStateRequest{ @@ -235,24 +235,24 @@ func TestCockroach(t *testing.T) { }, }, }) - assert.Equal(t, nil, err) + require.NoError(t, err) // get state item, errUpdatedGet = stateStore.Get(context.Background(), &state.GetRequest{Key: certificationTestPrefix + "key1"}) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, []byte(nil), item.Data) resp1, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: "reqKey1", }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "2", *resp1.ETag) assert.Equal(t, "\"reqVal101\"", string(resp1.Data)) resp3, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: "reqKey3", }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "2", *resp3.ETag) assert.Equal(t, "\"reqVal103\"", string(resp3.Data)) require.Contains(t, resp3.Metadata, "ttlExpireTime") diff --git a/tests/certification/state/gcp/firestore/gcp_firestore_test.go b/tests/certification/state/gcp/firestore/gcp_firestore_test.go index 0e78c5bdf5..daccd981c6 100644 --- a/tests/certification/state/gcp/firestore/gcp_firestore_test.go +++ b/tests/certification/state/gcp/firestore/gcp_firestore_test.go @@ -30,6 +30,7 @@ import ( dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -39,7 +40,7 @@ const ( func TestGCPFirestoreStorage(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -57,17 +58,17 @@ func TestGCPFirestoreStorage(t *testing.T) { // save state, default options: strong, last-write err = client.SaveState(ctx, statestore, stateKey, []byte(stateValue), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, item) assert.Equal(t, stateValue, string(item.Value)) // delete state err = client.DeleteState(ctx, statestore, stateKey, nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } diff --git a/tests/certification/state/memcached/memcached_test.go b/tests/certification/state/memcached/memcached_test.go index bfe795ae09..955c090eea 100644 --- a/tests/certification/state/memcached/memcached_test.go +++ b/tests/certification/state/memcached/memcached_test.go @@ -32,6 +32,7 @@ import ( dapr_testing "github.com/dapr/dapr/pkg/testing" "github.com/dapr/kit/logger" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( @@ -53,7 +54,7 @@ func TestMemcached(t *testing.T) { stateStore := state_memcached.NewMemCacheStateStore(log) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) // var rdb redis.Client currentGrpcPort := ports[0] @@ -68,32 +69,32 @@ func TestMemcached(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreName, testKey1, []byte(testKey1Value), nil) - assert.NoError(t, err) + require.NoError(t, err) err = client.SaveState(ctx, stateStoreName, testKey2, []byte(testKey2Value), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreName, testKey1, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, testKey1Value, string(item.Value)) errUpdate := client.SaveState(ctx, stateStoreName, testKey1, []byte(testUpdateValue), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreName, testKey1, nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, testUpdateValue, string(item.Value)) // delete state err = client.DeleteState(ctx, stateStoreName, testKey1, nil) - assert.NoError(t, err) + require.NoError(t, err) item, err = client.GetState(ctx, stateStoreName, testKey1, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, nil, item) // nonexistent key item, err = client.GetState(ctx, stateStoreName, testNonexistentKey, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, nil, item) return nil @@ -148,10 +149,10 @@ func TestMemcached(t *testing.T) { // We can successfully save... errSave := client.SaveState(ctx, stateStoreName, key, []byte(value), mapOptionsNonExpiring) - assert.NoError(t, errSave) + require.NoError(t, errSave) // and retrieve this key. item, errGet := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, errGet) + require.NoError(t, errGet) assert.Equal(t, value, string(item.Value)) return nil @@ -174,16 +175,16 @@ func TestMemcached(t *testing.T) { } errSave := client.SaveState(ctx, stateStoreName, key, []byte(value), mapOptionsExpiringKey) - assert.NoError(t, errSave) + require.NoError(t, errSave) // get state item, errGetBeforeTTLExpiration := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, errGetBeforeTTLExpiration) + require.NoError(t, errGetBeforeTTLExpiration) assert.Equal(t, value, string(item.Value)) // Let the key expire time.Sleep(2 * ttlExpirationTime) // It should be safe to check in double TTL itemAfterTTL, errGetAfterTTL := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, errGetAfterTTL) + require.NoError(t, errGetAfterTTL) assert.Nil(t, nil, itemAfterTTL) return nil @@ -206,11 +207,11 @@ func TestMemcached(t *testing.T) { } errSave := client.SaveState(ctx, stateStoreName, key, []byte(value), mapOptionsExpiringKey) - assert.NoError(t, errSave) + require.NoError(t, errSave) // get state item, errGetBeforeTTLExpiration := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, errGetBeforeTTLExpiration) + require.NoError(t, errGetBeforeTTLExpiration) assert.Equal(t, value, string(item.Value)) return nil @@ -258,7 +259,7 @@ func TestMemcachedNetworkInstability(t *testing.T) { stateStore := state_memcached.NewMemCacheStateStore(log) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) // var rdb redis.Client currentGrpcPort := ports[0] @@ -283,7 +284,7 @@ func TestMemcachedNetworkInstability(t *testing.T) { defer client.Close() item, err := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, value, string(item.Value)) return nil @@ -304,10 +305,10 @@ func TestMemcachedNetworkInstability(t *testing.T) { } errSave := client.SaveState(ctx, stateStoreName, key, []byte(value), mapOptionsExpiringKey) - assert.NoError(t, errSave) + require.NoError(t, errSave) // assert the key is there item, errGetBeforeTTLExpiration := client.GetState(ctx, stateStoreName, key, nil) - assert.NoError(t, errGetBeforeTTLExpiration) + require.NoError(t, errGetBeforeTTLExpiration) assert.Equal(t, value, string(item.Value)) return nil diff --git a/tests/certification/state/mongodb/mongodb_test.go b/tests/certification/state/mongodb/mongodb_test.go index 505223491f..b18e635272 100644 --- a/tests/certification/state/mongodb/mongodb_test.go +++ b/tests/certification/state/mongodb/mongodb_test.go @@ -38,7 +38,7 @@ func TestMongoDB(t *testing.T) { log := logger.NewLogger("dapr.components") stateStore := stateMongoDB.NewMongoDB(log).(*stateMongoDB.MongoDB) ports, err := daprTesting.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) stateRegistry := stateLoader.NewRegistry() stateRegistry.Logger = log @@ -57,26 +57,26 @@ func TestMongoDB(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("mongodbCert"), nil) - assert.NoError(t, err) + require.NoError(t, err) err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key2", []byte("mongodbCert2"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "mongodbCert", string(item.Value)) assert.NotContains(t, item.Metadata, "ttlExpireTime") errUpdate := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("mongodbCertUpdate"), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) require.NoError(t, errUpdatedGet) assert.Equal(t, "mongodbCertUpdate", string(item.Value)) // delete state err = client.DeleteState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -90,7 +90,7 @@ func TestMongoDB(t *testing.T) { // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key2", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "mongodbCert2", string(item.Value)) return nil @@ -106,10 +106,10 @@ func TestMongoDB(t *testing.T) { assert.Error(t, client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl1", []byte("mongodbCert"), map[string]string{ "ttlInSeconds": "mock value", })) - assert.NoError(t, client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl2", []byte("mongodbCert2"), map[string]string{ + require.NoError(t, client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl2", []byte("mongodbCert2"), map[string]string{ "ttlInSeconds": "-1", })) - assert.NoError(t, client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl3", []byte("mongodbCert3"), map[string]string{ + require.NoError(t, client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl3", []byte("mongodbCert3"), map[string]string{ "ttlInSeconds": "3", })) @@ -123,11 +123,12 @@ func TestMongoDB(t *testing.T) { // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "mongodbCert3", string(item.Value)) assert.Contains(t, item.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, item.Metadata["ttlExpireTime"]) - _ = assert.NoError(t, err) && assert.InDelta(t, time.Now().Add(time.Second*3).Unix(), expireTime.Unix(), 2) + require.NoError(t, err) + assert.InDelta(t, time.Now().Add(time.Second*3).Unix(), expireTime.Unix(), 2) assert.Eventually(t, func() bool { item, err = client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) diff --git a/tests/certification/state/mysql/mysql_test.go b/tests/certification/state/mysql/mysql_test.go index 7cc81e0fad..a80ebcd2ec 100644 --- a/tests/certification/state/mysql/mysql_test.go +++ b/tests/certification/state/mysql/mysql_test.go @@ -225,7 +225,7 @@ func TestMySQL(t *testing.T) { // save state _, err = client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -249,16 +249,16 @@ func TestMySQL(t *testing.T) { for _, sqlInjectionAttempt := range sqlInjectionAttempts { // save state with sqlInjectionAttempt's value as key, default options: strong, last-write err = client.SaveState(ctx, stateStoreName, sqlInjectionAttempt, []byte(sqlInjectionAttempt), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state for key sqlInjectionAttempt's value item, err := client.GetState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, sqlInjectionAttempt, string(item.Value)) // delete state for key sqlInjectionAttempt's value err = client.DeleteState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) } return nil @@ -296,7 +296,7 @@ func TestMySQL(t *testing.T) { start := time.Now() // Should fail err = component.Ping(context.Background()) - assert.Error(t, err) + require.Error(t, err) assert.Truef(t, errors.Is(err, context.DeadlineExceeded), "expected context.DeadlineExceeded but got %v", err) assert.GreaterOrEqual(t, time.Since(start), timeout) } diff --git a/tests/certification/state/postgresql/postgresql_test.go b/tests/certification/state/postgresql/postgresql_test.go index ba4f188a7f..bdfb62422e 100644 --- a/tests/certification/state/postgresql/postgresql_test.go +++ b/tests/certification/state/postgresql/postgresql_test.go @@ -65,7 +65,7 @@ func TestPostgreSQL(t *testing.T) { stateStore := postgresql.NewPostgreSQLStateStore(log).(*state_postgres.PostgreSQL) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) stateRegistry := state_loader.NewRegistry() stateRegistry.Logger = log @@ -116,13 +116,13 @@ func TestPostgreSQL(t *testing.T) { // We should have the tables correctly created err = tableExists(dbClient, "public", "clean_state") - assert.NoError(t, err, "state table does not exist") + require.NoError(t, err, "state table does not exist") err = tableExists(dbClient, "public", "clean_metadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) err = storeObj.Close() @@ -140,13 +140,13 @@ func TestPostgreSQL(t *testing.T) { // We should have the tables correctly created err = tableExists(dbClient, "public", "clean2_state") - assert.NoError(t, err, "state table does not exist") + require.NoError(t, err, "state table does not exist") err = tableExists(dbClient, "public", "clean2_metadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "clean2_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) err = storeObj.Close() @@ -161,7 +161,7 @@ func TestPostgreSQL(t *testing.T) { // Should already have migration level 2 level, err := getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) // Init and perform the migrations @@ -170,7 +170,7 @@ func TestPostgreSQL(t *testing.T) { // Ensure migration level is correct level, err = getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) err = storeObj.Close() @@ -204,11 +204,11 @@ func TestPostgreSQL(t *testing.T) { // We should have the metadata table created err = tableExists(dbClient, "public", "pre_metadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "pre_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) // Ensure the expiredate column has been added @@ -270,16 +270,16 @@ func TestPostgreSQL(t *testing.T) { }(i) } - failed := false for i := 0; i < 3; i++ { select { case err := <-errs: - failed = failed || !assert.NoError(t, err) + //nolint:testify + assert.NoError(t, err) case <-time.After(time.Minute): t.Fatal("timed out waiting for components to initialize") } } - if failed { + if t.Failed() { // Short-circuit t.FailNow() } @@ -289,13 +289,13 @@ func TestPostgreSQL(t *testing.T) { // We should have the tables correctly created err = tableExists(dbClient, "public", "mystate") - assert.NoError(t, err, "state table does not exist") + require.NoError(t, err, "state table does not exist") err = tableExists(dbClient, "public", "mymetadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "mymetadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) }) @@ -460,16 +460,16 @@ func TestPostgreSQL(t *testing.T) { for _, sqlInjectionAttempt := range sqlInjectionAttempts { // save state with sqlInjectionAttempt's value as key, default options: strong, last-write err = client.SaveState(ctx, stateStoreName, sqlInjectionAttempt, []byte(sqlInjectionAttempt), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state for key sqlInjectionAttempt's value item, err := client.GetState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, sqlInjectionAttempt, string(item.Value)) // delete state for key sqlInjectionAttempt's value err = client.DeleteState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) } return nil @@ -529,7 +529,6 @@ func TestPostgreSQL(t *testing.T) { cleanupInterval := storeObj.GetCleanupInterval() _ = assert.Nil(t, cleanupInterval) }) - }) t.Run("cleanup", func(t *testing.T) { @@ -633,7 +632,7 @@ func TestPostgreSQL(t *testing.T) { flow.New(t, "Run tests"). Step(dockercompose.Run("db", dockerComposeYAML)). // No waiting here, as connectStep retries until it's ready (or there's a timeout) - //Step("wait for component to start", flow.Sleep(10*time.Second)). + // Step("wait for component to start", flow.Sleep(10*time.Second)). Step("connect to the database", connectStep). Step("run Init test", initTest). Step(sidecar.Run(sidecarNamePrefix+"dockerDefault", diff --git a/tests/certification/state/redis/redis_test.go b/tests/certification/state/redis/redis_test.go index 2b7ba16bd4..3b59c16a0d 100644 --- a/tests/certification/state/redis/redis_test.go +++ b/tests/certification/state/redis/redis_test.go @@ -22,6 +22,7 @@ import ( redis "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/state" state_redis "github.com/dapr/components-contrib/state/redis" @@ -55,7 +56,7 @@ func TestRedis(t *testing.T) { stateStore := state_redis.NewRedisStateStore(log).(*state_redis.StateStore) ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) stateRegistry := state_loader.NewRegistry() stateRegistry.Logger = log @@ -75,22 +76,22 @@ func TestRedis(t *testing.T) { defer client.Close() err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("redisCert"), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "redisCert", string(item.Value)) errUpdate := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("redisCertUpdate"), nil) - assert.NoError(t, errUpdate) + require.NoError(t, errUpdate) item, errUpdatedGet := client.GetState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, errUpdatedGet) + require.NoError(t, errUpdatedGet) assert.Equal(t, "redisCertUpdate", string(item.Value)) // delete state err = client.DeleteState(ctx, stateStoreName, certificationTestPrefix+"key1", nil) - assert.NoError(t, err) + require.NoError(t, err) return nil } @@ -104,22 +105,19 @@ func TestRedis(t *testing.T) { defer client.Close() ttlInSecondsWrongValue := "mock value" - mapOptionsWrongValue := - map[string]string{ - "ttlInSeconds": ttlInSecondsWrongValue, - } + mapOptionsWrongValue := map[string]string{ + "ttlInSeconds": ttlInSecondsWrongValue, + } ttlInSecondsNonExpiring := -1 - mapOptionsNonExpiring := - map[string]string{ - "ttlInSeconds": strconv.Itoa(ttlInSecondsNonExpiring), - } + mapOptionsNonExpiring := map[string]string{ + "ttlInSeconds": strconv.Itoa(ttlInSecondsNonExpiring), + } ttlInSeconds := 1 - mapOptions := - map[string]string{ - "ttlInSeconds": strconv.Itoa(ttlInSeconds), - } + mapOptions := map[string]string{ + "ttlInSeconds": strconv.Itoa(ttlInSeconds), + } rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", // host:port of the redis server @@ -130,21 +128,21 @@ func TestRedis(t *testing.T) { err1 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl1", []byte("redisCert"), mapOptionsWrongValue) assert.Error(t, err1) err2 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl2", []byte("redisCert2"), mapOptionsNonExpiring) - assert.NoError(t, err2) + require.NoError(t, err2) err3 := client.SaveState(ctx, stateStoreName, certificationTestPrefix+"ttl3", []byte("redisCert3"), mapOptions) - assert.NoError(t, err3) + require.NoError(t, err3) res, err := rdb.Do(ctx.Context, "TTL", sidecarNamePrefix+"dockerDefault||"+certificationTestPrefix+"ttl3").Result() - assert.Equal(t, nil, err) + require.NoError(t, err) assert.Equal(t, int64(1), res) // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "redisCert3", string(item.Value)) time.Sleep(2 * time.Second) itemAgain, errAgain := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl3", nil) - assert.NoError(t, errAgain) + require.NoError(t, errAgain) assert.Nil(t, nil, itemAgain) return nil @@ -159,13 +157,13 @@ func TestRedis(t *testing.T) { // get state item, err := client.GetState(ctx, stateStoreName, certificationTestPrefix+"ttl2", nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, "redisCert2", string(item.Value)) return nil } - //ETag test + // ETag test eTagTest := func(ctx flow.Context) error { etag1 := "1" etag100 := "100" @@ -190,7 +188,7 @@ func TestRedis(t *testing.T) { resp, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: "k", }) - assert.Equal(t, nil, err) + require.NoError(t, err) assert.Equal(t, "2", *resp.ETag) assert.Equal(t, "\"v2\"", string(resp.Data)) @@ -235,7 +233,7 @@ func TestRedis(t *testing.T) { }, }, }) - assert.Equal(t, nil, err) + require.NoError(t, err) resp1, err := stateStore.Get(context.Background(), &state.GetRequest{ Key: "reqKey1", }) @@ -252,14 +250,14 @@ func TestRedis(t *testing.T) { testForStateStoreNotConfigured := func(ctx flow.Context) error { client, err := client.NewClientWithPort(fmt.Sprint(currentGrpcPort)) - // assert.Error(t, err) + // require.Error(t, err) if err != nil { panic(err) } defer client.Close() err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key1", []byte("redisCert"), nil) - assert.EqualError(t, err, stateStoreNoConfigError) + require.EqualError(t, err, stateStoreNoConfigError) return nil } diff --git a/tests/certification/state/sqlite/sqlite_test.go b/tests/certification/state/sqlite/sqlite_test.go index e11d19c965..63dd50524b 100644 --- a/tests/certification/state/sqlite/sqlite_test.go +++ b/tests/certification/state/sqlite/sqlite_test.go @@ -131,16 +131,16 @@ func TestSQLite(t *testing.T) { for _, sqlInjectionAttempt := range sqlInjectionAttempts { // save state with sqlInjectionAttempt's value as key, default options: strong, last-write err = client.SaveState(ctx, stateStoreName, sqlInjectionAttempt, []byte(sqlInjectionAttempt), nil) - assert.NoError(t, err) + require.NoError(t, err) // get state for key sqlInjectionAttempt's value item, err := client.GetState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, sqlInjectionAttempt, string(item.Value)) // delete state for key sqlInjectionAttempt's value err = client.DeleteState(ctx, stateStoreName, sqlInjectionAttempt, nil) - assert.NoError(t, err) + require.NoError(t, err) } }) @@ -164,7 +164,7 @@ func TestSQLite(t *testing.T) { // Saving state should fail err = client.SaveState(ctx, stateStoreName, "my_string", []byte("updated!"), nil) require.Error(t, err) - assert.ErrorContains(t, err, "attempt to write a readonly database") + require.ErrorContains(t, err, "attempt to write a readonly database") // Value should not be updated item, err = client.GetState(ctx, stateStoreName, "my_string", nil) @@ -174,7 +174,7 @@ func TestSQLite(t *testing.T) { // Deleting state should fail err = client.DeleteState(ctx, stateStoreName, "my_string", nil) require.Error(t, err) - assert.ErrorContains(t, err, "attempt to write a readonly database") + require.ErrorContains(t, err, "attempt to write a readonly database") }) return nil @@ -252,7 +252,6 @@ func TestSQLite(t *testing.T) { cleanupInterval := dbAccess.GetCleanupInterval() assert.Equal(t, time.Duration(0), cleanupInterval) }) - }) ctx.T.Run("cleanup", func(t *testing.T) { @@ -286,7 +285,7 @@ func TestSQLite(t *testing.T) { // Wait 2 seconds then verify we have only 10 rows left time.Sleep(2 * time.Second) count, err := countRowsInTable(ctx, dbClient, "ttl_state") - assert.NoError(t, err, "failed to run query to count rows") + require.NoError(t, err, "failed to run query to count rows") assert.Equal(t, 10, count) // The "last-cleanup" value should be <= 1 second (+ a bit of buffer) @@ -392,13 +391,13 @@ func TestSQLite(t *testing.T) { // We should have the tables correctly created err = tableExists(dbClient, "clean_state") - assert.NoError(t, err, "state table does not exist") + require.NoError(t, err, "state table does not exist") err = tableExists(dbClient, "clean_metadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) }) @@ -410,7 +409,7 @@ func TestSQLite(t *testing.T) { // Should already have migration level 2 level, err := getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) // Init and perform the migrations @@ -420,7 +419,7 @@ func TestSQLite(t *testing.T) { // Ensure migration level is correct level, err = getMigrationLevel(dbClient, "clean_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) }) @@ -453,11 +452,11 @@ func TestSQLite(t *testing.T) { // We should have the metadata table created err = tableExists(dbClient, "pre_metadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "pre_metadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) }) @@ -498,16 +497,16 @@ func TestSQLite(t *testing.T) { }(i) } - failed := false for i := 0; i < 3; i++ { select { case err := <-errs: - failed = failed || !assert.NoError(t, err) + //nolint:testify + assert.NoError(t, err) case <-time.After(time.Minute): t.Fatal("timed out waiting for components to initialize") } } - if failed { + if t.Failed() { // Short-circuit t.FailNow() } @@ -517,13 +516,13 @@ func TestSQLite(t *testing.T) { // We should have the tables correctly created err = tableExists(dbClient, "mystate") - assert.NoError(t, err, "state table does not exist") + require.NoError(t, err, "state table does not exist") err = tableExists(dbClient, "mymetadata") - assert.NoError(t, err, "metadata table does not exist") + require.NoError(t, err, "metadata table does not exist") // Ensure migration level is correct level, err := getMigrationLevel(dbClient, "mymetadata") - assert.NoError(t, err, "failed to get migration level") + require.NoError(t, err, "failed to get migration level") assert.Equal(t, migrationLevel, level, "migration level mismatch: found '%s' but expected '%s'", level, migrationLevel) }) }) @@ -592,13 +591,13 @@ func TestSQLite(t *testing.T) { Key: key, Value: j, }) - assert.NoError(t, err) + require.NoError(t, err) // Retrieve state res, err = storeObj.Get(ctx, &state.GetRequest{ Key: key, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, strconv.Itoa(j), string(res.Data)) } }(i) @@ -636,7 +635,7 @@ func TestSQLite(t *testing.T) { Key: key, Value: int(save), }) - assert.NoError(t, err) + require.NoError(t, err) } }(i) } @@ -647,7 +646,7 @@ func TestSQLite(t *testing.T) { res, err := storeObjs[0].Get(ctx, &state.GetRequest{ Key: key, }) - assert.NoError(t, err) + require.NoError(t, err) expect := [parallel]string{} for i := 0; i < parallel; i++ { diff --git a/tests/certification/state/sqlserver/sqlserver_test.go b/tests/certification/state/sqlserver/sqlserver_test.go index 6d9799a82f..365737d2b5 100644 --- a/tests/certification/state/sqlserver/sqlserver_test.go +++ b/tests/certification/state/sqlserver/sqlserver_test.go @@ -61,7 +61,7 @@ const ( func TestSqlServer(t *testing.T) { ports, err := dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort := ports[0] currentHTTPPort := ports[1] @@ -109,8 +109,8 @@ func TestSqlServer(t *testing.T) { assert.Equal(t, "certificationdata", string(item.Value)) assert.Contains(t, item.Metadata, "ttlExpireTime") expireTime, err := time.Parse(time.RFC3339, item.Metadata["ttlExpireTime"]) - _ = assert.NoError(t, err) && - assert.InDelta(t, time.Now().Add(24*time.Hour).Unix(), expireTime.Unix(), 10) + require.NoError(t, err) + assert.InDelta(t, time.Now().Add(24*time.Hour).Unix(), expireTime.Unix(), 10) err = client.SaveState(ctx, stateStoreName, certificationTestPrefix+"key2", []byte("certificationdata"), map[string]string{ "ttlInSeconds": "1", @@ -457,7 +457,7 @@ func TestSqlServer(t *testing.T) { }) ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort = ports[0] currentHTTPPort = ports[1] @@ -485,7 +485,7 @@ func TestSqlServer(t *testing.T) { }) ports, err = dapr_testing.GetFreePorts(2) - assert.NoError(t, err) + require.NoError(t, err) currentGrpcPort = ports[0] currentHTTPPort = ports[1] diff --git a/tests/config/workflows/temporal/workflows.yaml b/tests/config/workflows/temporal/workflows.yaml deleted file mode 100644 index 6badabbadf..0000000000 --- a/tests/config/workflows/temporal/workflows.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: dapr.io/v1alpha1 -kind: Component -metadata: - name: temporal -spec: - type: workflows.temporal - version: v1 - metadata: - - name: Identity - value: TemporalTestClient - - name: HostPort - value: localhost:7233 diff --git a/tests/config/workflows/tests.yml b/tests/config/workflows/tests.yml index 73fdbbc599..71b22a61ac 100644 --- a/tests/config/workflows/tests.yml +++ b/tests/config/workflows/tests.yml @@ -1,5 +1,3 @@ # Supported additional operations: (none) componentType: workflows components: - - component: temporal - operations: [] \ No newline at end of file diff --git a/tests/conformance/bindings/bindings.go b/tests/conformance/bindings/bindings.go index a587740dbf..8cc83d541e 100644 --- a/tests/conformance/bindings/bindings.go +++ b/tests/conformance/bindings/bindings.go @@ -24,6 +24,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/bindings" "github.com/dapr/components-contrib/metadata" @@ -129,7 +130,7 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin err := outputBinding.Init(context.Background(), bindings.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err, "expected no error setting up output binding") + require.NoError(t, err, "expected no error setting up output binding") } // Check for an input binding specific operation before init if config.HasOperation("read") { @@ -137,7 +138,7 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin err := inputBinding.Init(context.Background(), bindings.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err, "expected no error setting up input binding") + require.NoError(t, err, "expected no error setting up input binding") } testLogger.Info("Init test done.") }) @@ -146,23 +147,23 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin if config.HasOperation("read") { errInp := bindings.PingInpBinding(context.Background(), inputBinding) // TODO: Ideally, all stable components should implenment ping function, - // so will only assert assert.NoError(t, err) finally, i.e. when current implementation + // so will only assert require.NoError(t, err) finally, i.e. when current implementation // implements ping in existing stable components if errInp != nil { - assert.EqualError(t, errInp, "ping is not implemented by this input binding") + require.EqualError(t, errInp, "ping is not implemented by this input binding") } else { - assert.NoError(t, errInp) + require.NoError(t, errInp) } } if config.HasOperation("operations") { errOut := bindings.PingOutBinding(context.Background(), outputBinding) // TODO: Ideally, all stable components should implenment ping function, - // so will only assert assert.NoError(t, err) finally, i.e. when current implementation + // so will only assert require.NoError(t, err) finally, i.e. when current implementation // implements ping in existing stable components if errOut != nil { - assert.EqualError(t, errOut, "ping is not implemented by this output binding") + require.EqualError(t, errOut, "ping is not implemented by this output binding") } else { - assert.NoError(t, errOut) + require.NoError(t, errOut) } } }) @@ -222,7 +223,7 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin req := config.createInvokeRequest() req.Operation = bindings.CreateOperation _, err := outputBinding.Invoke(context.Background(), &req) - assert.NoError(t, err, "expected no error invoking output binding") + require.NoError(t, err, "expected no error invoking output binding") createPerformed = true testLogger.Info("Create test done.") }) @@ -235,7 +236,7 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin req := config.createInvokeRequest() req.Operation = bindings.GetOperation resp, err := outputBinding.Invoke(context.Background(), &req) - assert.NoError(t, err, "expected no error invoking output binding") + require.NoError(t, err, "expected no error invoking output binding") if createPerformed { assert.Equal(t, req.Data, resp.Data) } @@ -250,7 +251,7 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin req := config.createInvokeRequest() req.Operation = bindings.ListOperation _, err := outputBinding.Invoke(context.Background(), &req) - assert.NoError(t, err, "expected no error invoking output binding") + require.NoError(t, err, "expected no error invoking output binding") testLogger.Info("List test done.") }) } @@ -278,12 +279,12 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin req := config.createInvokeRequest() req.Operation = bindings.DeleteOperation _, err := outputBinding.Invoke(context.Background(), &req) - assert.NoError(t, err, "expected no error invoking output binding") + require.NoError(t, err, "expected no error invoking output binding") if createPerformed && config.HasOperation(string(bindings.GetOperation)) { req.Operation = bindings.GetOperation resp, err := outputBinding.Invoke(context.Background(), &req) - assert.NoError(t, err, "expected no error invoking output binding") + require.NoError(t, err, "expected no error invoking output binding") assert.NotNil(t, resp) assert.Nil(t, resp.Data) } @@ -297,14 +298,14 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin if config.HasOperation("read") { testLogger.Info("Closing read connection ...") err := inputBinding.Close() - assert.NoError(t, err, "expected no error closing input binding") + require.NoError(t, err, "expected no error closing input binding") } // Check for an output-binding specific operation before close if config.HasOperation("operations") { testLogger.Info("Closing output connection ...") if closer, ok := outputBinding.(io.Closer); ok { err := closer.Close() - assert.NoError(t, err, "expected no error closing output binding") + require.NoError(t, err, "expected no error closing output binding") } } testLogger.Info("Close test done.") diff --git a/tests/conformance/common_test.go b/tests/conformance/common_test.go index 686e2bc886..0d4e55c4d0 100644 --- a/tests/conformance/common_test.go +++ b/tests/conformance/common_test.go @@ -20,6 +20,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) @@ -37,12 +38,12 @@ components: maxGetDurationInMs: 10 numBulkRequests: 10` config, err := decodeYaml([]byte(yam)) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, config) - assert.Equal(t, 1, len(config.Components)) + assert.Len(t, config.Components, 1) assert.Equal(t, "state", config.ComponentType) assert.Equal(t, []string{"foo", "bar"}, config.Components[0].Operations) - assert.Equal(t, 5, len(config.Components[0].Config)) + assert.Len(t, config.Components[0].Config, 5) }) t.Run("invalid yaml", func(t *testing.T) { @@ -51,7 +52,7 @@ components: components: - : redis` config, err := decodeYaml([]byte(yam)) - assert.Error(t, err) + require.Error(t, err) assert.Equal(t, TestConfiguration{}, config) }) } @@ -94,18 +95,18 @@ func TestConvertMetadataToProperties(t *testing.T) { os.Setenv("CONF_TEST_KEY", "testval") defer os.Unsetenv("CONF_TEST_KEY") resp, err := ConvertMetadataToProperties(items) - assert.NoError(t, err) + require.NoError(t, err) assert.NotNil(t, resp) - assert.Equal(t, 2, len(resp)) + assert.Len(t, resp, 2) assert.Equal(t, "test", resp["test_key"]) assert.Equal(t, "testval", resp["env_var_sub"]) }) t.Run("env var not set", func(t *testing.T) { resp, err := ConvertMetadataToProperties(items) - assert.NotNil(t, err) + require.Error(t, err) assert.NotNil(t, resp) - assert.Equal(t, 0, len(resp)) + assert.Empty(t, resp) }) } @@ -120,17 +121,17 @@ func TestParseConfigurationMap(t *testing.T) { } ParseConfigurationMap(t, testMap) - assert.Equal(t, 4, len(testMap)) + assert.Len(t, testMap, 4) assert.Equal(t, "testblob", testMap["blob"]) _, err := uuid.ParseBytes([]byte(testMap["key"].(string))) - assert.NoError(t, err) + require.NoError(t, err) var nestedMap map[string]interface{} json.Unmarshal([]byte(testMap["mapString"].(string)), &nestedMap) _, err = uuid.ParseBytes([]byte(nestedMap["nestedkey"].(string))) - assert.NoError(t, err) + require.NoError(t, err) _, err = uuid.ParseBytes([]byte(testMap["map"].(map[string]interface{})["nestedkey"].(string))) - assert.NoError(t, err) + require.NoError(t, err) } func TestConvertComponentNameToPath(t *testing.T) { diff --git a/tests/conformance/configuration/configuration.go b/tests/conformance/configuration/configuration.go index 988e6192c5..0b8e096bb8 100644 --- a/tests/conformance/configuration/configuration.go +++ b/tests/conformance/configuration/configuration.go @@ -237,7 +237,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration processedC1 <- e return nil }) - assert.NoError(t, err, "expected no error on subscribe") + require.NoError(t, err, "expected no error on subscribe") subscribeIDs = append(subscribeIDs, ID) }) @@ -252,7 +252,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration processedC2 <- e return nil }) - assert.NoError(t, err, "expected no error on subscribe") + require.NoError(t, err, "expected no error on subscribe") subscribeIDs = append(subscribeIDs, ID) }) @@ -267,7 +267,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration processedC3 <- e return nil }) - assert.NoError(t, err, "expected no error on subscribe") + require.NoError(t, err, "expected no error on subscribe") subscribeIDs = append(subscribeIDs, ID) }) @@ -278,7 +278,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration t.Run("update key values and verify messages received", func(t *testing.T) { initValues1, counter = updateKeyValues(initValues1, runID, counter, v1) errUpdate1 := updater.UpdateKey(initValues1) - assert.NoError(t, errUpdate1, "expected no error on updating keys") + require.NoError(t, errUpdate1, "expected no error on updating keys") updateAwaitingMessages(awaitingMessages1, initValues1) updateAwaitingMessages(awaitingMessages2, initValues1) @@ -287,14 +287,14 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration // Update initValues2 initValues2, counter = updateKeyValues(initValues2, runID, counter, v1) errUpdate2 := updater.UpdateKey(initValues2) - assert.NoError(t, errUpdate2, "expected no error on updating keys") + require.NoError(t, errUpdate2, "expected no error on updating keys") updateAwaitingMessages(awaitingMessages2, initValues2) updateAwaitingMessages(awaitingMessages3, initValues2) newValues, counter = generateKeyValues(runID, counter, keyCount, v1) errAdd := updater.AddKey(newValues) - assert.NoError(t, errAdd, "expected no error on adding new keys") + require.NoError(t, errAdd, "expected no error on adding new keys") updateAwaitingMessages(awaitingMessages3, newValues) @@ -306,7 +306,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration t.Run("delete keys and verify messages received", func(t *testing.T) { // Delete initValues2 errDelete := updater.DeleteKey(getKeys(initValues2)) - assert.NoError(t, errDelete, "expected no error on updating keys") + require.NoError(t, errDelete, "expected no error on updating keys") if !strings.HasPrefix(component, postgresComponent) { for k := range initValues2 { initValues2[k] = &configuration.Item{} @@ -328,13 +328,13 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration ID: subscribeIDs[0], }, ) - assert.NoError(t, err, "expected no error in unsubscribe") + require.NoError(t, err, "expected no error in unsubscribe") }) t.Run("update key values and verify subscriber 1 receives no messages", func(t *testing.T) { initValues1, counter = updateKeyValues(initValues1, runID, counter, v1) errUpdate := updater.UpdateKey(initValues1) - assert.NoError(t, errUpdate, "expected no error on updating keys") + require.NoError(t, errUpdate, "expected no error on updating keys") updateAwaitingMessages(awaitingMessages2, initValues1) updateAwaitingMessages(awaitingMessages3, initValues1) @@ -350,13 +350,13 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration ID: subscribeIDs[1], }, ) - assert.NoError(t, err, "expected no error in unsubscribe") + require.NoError(t, err, "expected no error in unsubscribe") }) t.Run("update key values and verify subscriber 2 receives no messages", func(t *testing.T) { initValues1, counter = updateKeyValues(initValues1, runID, counter, v1) errUpdate := updater.UpdateKey(initValues1) - assert.NoError(t, errUpdate, "expected no error on updating keys") + require.NoError(t, errUpdate, "expected no error on updating keys") updateAwaitingMessages(awaitingMessages3, initValues1) @@ -370,13 +370,13 @@ func ConformanceTests(t *testing.T, props map[string]string, store configuration ID: subscribeIDs[2], }, ) - assert.NoError(t, err, "expected no error in unsubscribe") + require.NoError(t, err, "expected no error in unsubscribe") }) t.Run("update key values and verify subscriber 3 receives no messages", func(t *testing.T) { initValues1, counter = updateKeyValues(initValues1, runID, counter, v1) errUpdate := updater.UpdateKey(initValues1) - assert.NoError(t, errUpdate, "expected no error on updating keys") + require.NoError(t, errUpdate, "expected no error on updating keys") verifyNoMessagesReceived(t, processedC3) }) diff --git a/tests/conformance/crypto/crypto.go b/tests/conformance/crypto/crypto.go index 743bcbfe56..70cd5d5046 100644 --- a/tests/conformance/crypto/crypto.go +++ b/tests/conformance/crypto/crypto.go @@ -93,11 +93,11 @@ func ConformanceTests(t *testing.T, props map[string]string, component contribCr // Parse all keys and algorithms, then ensure the required ones are present keys := newKeybagFromConfig(config) for _, alg := range strings.Split(algsPrivateRequired, " ") { - require.Greaterf(t, len(keys.private[alg]), 0, "could not find a private key for algorithm '%s' in configuration, which is required", alg) + require.NotEmptyf(t, keys.private[alg], "could not find a private key for algorithm '%s' in configuration, which is required", alg) } if config.HasOperation(opSymmetric) { for _, alg := range strings.Split(algsSymmetricRequired, " ") { - require.Greaterf(t, len(keys.symmetric[alg]), 0, "could not find a symmetric key for algorithm '%s' in configuration, which is required", alg) + require.NotEmptyf(t, keys.symmetric[alg], "could not find a symmetric key for algorithm '%s' in configuration, which is required", alg) } } if config.HasOperation(opPublic) { @@ -219,7 +219,7 @@ func ConformanceTests(t *testing.T, props map[string]string, component contribCr return func(t *testing.T) { // Note: if you change this, make sure it's not a multiple of 16 in length const message = "Quel ramo del lago di Como" - require.False(t, (len(message)%16) == 0, "message must have a length that's not a multiple of 16") + require.NotEqual(t, 0, (len(message) % 16), "message must have a length that's not a multiple of 16") // Encrypt the message ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) @@ -278,7 +278,7 @@ func ConformanceTests(t *testing.T, props map[string]string, component contribCr return func(t *testing.T) { // Note: if you change this, make sure it's not a multiple of 16 in length const message = "Quel ramo del lago di Como" - require.False(t, (len(message)%16) == 0, "message must have a length that's not a multiple of 16") + require.NotEqual(t, 0, (len(message) % 16), "message must have a length that's not a multiple of 16") // Encrypt the message ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) diff --git a/tests/conformance/pubsub/pubsub.go b/tests/conformance/pubsub/pubsub.go index b04629e13c..932b417021 100644 --- a/tests/conformance/pubsub/pubsub.go +++ b/tests/conformance/pubsub/pubsub.go @@ -108,18 +108,18 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c err := ps.Init(context.Background(), pubsub.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err, "expected no error on setting up pubsub") + require.NoError(t, err, "expected no error on setting up pubsub") }) t.Run("ping", func(t *testing.T) { err := pubsub.Ping(context.Background(), ps) // TODO: Ideally, all stable components should implenment ping function, - // so will only assert assert.Nil(t, err) finally, i.e. when current implementation + // so will only assert require.NoError(t, err) finally, i.e. when current implementation // implements ping in existing stable components if err != nil { - assert.EqualError(t, err, "ping is not implemented by this pubsub") + require.EqualError(t, err, "ping is not implemented by this pubsub") } else { - assert.Nil(t, err) + require.NoError(t, err) } }) @@ -211,7 +211,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c return nil }) - assert.NoError(t, err, "expected no error on subscribe") + require.NoError(t, err, "expected no error on subscribe") }) // Bulk Subscribe @@ -308,7 +308,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c } return bulkResponses, nil }) - assert.NoError(t, err, "expected no error on bulk subscribe") + require.NoError(t, err, "expected no error on bulk subscribe") }) } @@ -329,7 +329,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c if err == nil { awaitingMessages[string(data)] = struct{}{} } - assert.NoError(t, err, "expected no error on publishing data %s on topic %s", data, config.TestTopicName) + require.NoError(t, err, "expected no error on publishing data %s on topic %s", data, config.TestTopicName) } if config.HasOperation("bulksubscribe") { _, ok := ps.(pubsub.BulkSubscriber) @@ -347,7 +347,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c if err == nil { awaitingMessagesBulk[string(data)] = struct{}{} } - assert.NoError(t, err, "expected no error on publishing data %s on topic %s", data, config.TestTopicForBulkSub) + require.NoError(t, err, "expected no error on publishing data %s on topic %s", data, config.TestTopicForBulkSub) } } }) @@ -401,7 +401,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c } // here only the success case is tested for bulkPublish similar to publish. // For scenarios on partial failures, those will be tested as part of certification tests if possible. - assert.NoError(t, err, "expected no error on bulk publishing on topic %s", config.TestTopicName) + require.NoError(t, err, "expected no error on bulk publishing on topic %s", config.TestTopicName) }) } @@ -493,7 +493,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c Topic: topic, Metadata: config.PublishMetadata, }) - assert.NoError(t, err, "expected no error on publishing data %s on topic %s", data, topic) + require.NoError(t, err, "expected no error on publishing data %s on topic %s", data, topic) } allSentCh <- true t.Logf("waiting for %v to complete read", config.MaxReadDuration) @@ -546,7 +546,7 @@ func ConformanceTests(t *testing.T, props map[string]string, ps pubsub.PubSub, c Topic: topic, Metadata: config.PublishMetadata, }) - assert.NoError(t, err, "expected no error on publishing data %s on topic %s", string(data), topic) + require.NoError(t, err, "expected no error on publishing data %s on topic %s", string(data), topic) } allSentCh <- true diff --git a/tests/conformance/secretstores/secretstores.go b/tests/conformance/secretstores/secretstores.go index 38c585793d..b086f1aa93 100644 --- a/tests/conformance/secretstores/secretstores.go +++ b/tests/conformance/secretstores/secretstores.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/components-contrib/metadata" "github.com/dapr/components-contrib/secretstores" @@ -52,18 +53,18 @@ func ConformanceTests(t *testing.T, props map[string]string, store secretstores. err := store.Init(context.Background(), secretstores.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err, "expected no error on initializing store") + require.NoError(t, err, "expected no error on initializing store") }) t.Run("ping", func(t *testing.T) { err := secretstores.Ping(context.Background(), store) // TODO: Ideally, all stable components should implenment ping function, - // so will only assert assert.Nil(t, err) finally, i.e. when current implementation + // so will only assert require.NoError(t, err) finally, i.e. when current implementation // implements ping in existing stable components if err != nil { - assert.EqualError(t, err, "ping is not implemented by this secret store") + require.EqualError(t, err, "ping is not implemented by this secret store") } else { - assert.Nil(t, err) + require.NoError(t, err) } }) @@ -80,7 +81,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store secretstores. t.Run("get", func(t *testing.T) { resp, err := store.GetSecret(context.Background(), getSecretRequest) - assert.NoError(t, err, "expected no error on getting secret %v", getSecretRequest) + require.NoError(t, err, "expected no error on getting secret %v", getSecretRequest) assert.NotNil(t, resp, "expected value to be returned") assert.NotNil(t, resp.Data, "expected value to be returned") assert.Equal(t, getSecretResponse.Data, resp.Data, "expected values to be equal") @@ -101,7 +102,7 @@ func ConformanceTests(t *testing.T, props map[string]string, store secretstores. t.Run("bulkget", func(t *testing.T) { resp, err := store.BulkGetSecret(context.Background(), bulkReq) - assert.NoError(t, err, "expected no error on getting secret %v", bulkReq) + require.NoError(t, err, "expected no error on getting secret %v", bulkReq) assert.NotNil(t, resp, "expected value to be returned") assert.NotNil(t, resp.Data, "expected value to be returned") diff --git a/tests/conformance/standalone_loader_test.go b/tests/conformance/standalone_loader_test.go index 18b3df8b66..565915afd9 100644 --- a/tests/conformance/standalone_loader_test.go +++ b/tests/conformance/standalone_loader_test.go @@ -73,14 +73,14 @@ spec: value: value2 ` components := request.decodeYaml("components/messagebus.yaml", []byte(yaml)) - assert.Len(t, components, 0) + assert.Empty(t, components) } func TestStandaloneDecodeUnsuspectingFile(t *testing.T) { request := NewStandaloneComponents("test_component_path") components := request.decodeYaml("components/messagebus.yaml", []byte("hey there")) - assert.Len(t, components, 0) + assert.Empty(t, components) } func TestStandaloneDecodeInvalidYaml(t *testing.T) { @@ -92,7 +92,7 @@ kind: Component metadata: name: statestore` components := request.decodeYaml("components/messagebus.yaml", []byte(yaml)) - assert.Len(t, components, 0) + assert.Empty(t, components) } func TestStandaloneDecodeValidMultiYaml(t *testing.T) { diff --git a/tests/conformance/state/state.go b/tests/conformance/state/state.go index 93c0a25729..8cc279e0ee 100644 --- a/tests/conformance/state/state.go +++ b/tests/conformance/state/state.go @@ -241,7 +241,7 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St err := statestore.Init(context.Background(), state.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err) + require.NoError(t, err) }) // Don't run more tests if init failed @@ -252,12 +252,12 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St t.Run("ping", func(t *testing.T) { err := state.Ping(context.Background(), statestore) // TODO: Ideally, all stable components should implenment ping function, - // so will only assert assert.NoError(t, err) finally, i.e. when current implementation + // so will only assert require.NoError(t, err) finally, i.e. when current implementation // implements ping in existing stable components if err != nil { - assert.EqualError(t, err, "ping is not implemented by this state store") + require.EqualError(t, err, "ping is not implemented by this state store") } else { - assert.NoError(t, err) + require.NoError(t, err) } }) @@ -273,7 +273,7 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St req.Metadata = map[string]string{metadata.ContentType: scenario.contentType} } err := statestore.Set(context.Background(), req) - assert.NoError(t, err) + require.NoError(t, err) } } }) @@ -318,9 +318,9 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St for i := range scenario.results { var expected, actual interface{} err = json.Unmarshal(scenario.results[i].Data, &expected) - assert.NoError(t, err) + require.NoError(t, err) err = json.Unmarshal(resp.Results[i].Data, &actual) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, scenario.results[i].Key, resp.Results[i].Key) assert.Equal(t, expected, actual) } @@ -345,13 +345,13 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St req.Metadata = map[string]string{metadata.ContentType: scenario.contentType} } err := statestore.Delete(context.Background(), req) - assert.NoError(t, err, "no error expected while deleting %s", scenario.key) + require.NoError(t, err, "no error expected while deleting %s", scenario.key) t.Logf("Checking value absence for %s", scenario.key) res, err := statestore.Get(context.Background(), &state.GetRequest{ Key: scenario.key, }) - assert.NoError(t, err, "no error expected while checking for absence for %s", scenario.key) + require.NoError(t, err, "no error expected while checking for absence for %s", scenario.key) assert.Nil(t, res.Data, "no data expected while checking for absence for %s", scenario.key) } } @@ -443,14 +443,14 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St } } err := statestore.BulkDelete(context.Background(), bulk, state.BulkStoreOpts{}) - assert.NoError(t, err) + require.NoError(t, err) for _, req := range bulk { t.Logf("Checking value absence for %s", req.Key) res, err := statestore.Get(context.Background(), &state.GetRequest{ Key: req.Key, }) - assert.NoError(t, err) + require.NoError(t, err) assert.Nil(t, res.Data) } }) @@ -558,21 +558,21 @@ func ConformanceTests(t *testing.T, props map[string]string, statestore state.St Value: firstValue, Metadata: partitionMetadata, }) - assert.NoError(t, err, "set request should be successful") + require.NoError(t, err, "set request should be successful") // prerequisite: key2 should not be present err = statestore.Delete(context.Background(), &state.DeleteRequest{ Key: secondKey, Metadata: partitionMetadata, }) - assert.NoError(t, err, "delete request should be successful") + require.NoError(t, err, "delete request should be successful") // prerequisite: key3 should not be present err = statestore.Delete(context.Background(), &state.DeleteRequest{ Key: thirdKey, Metadata: partitionMetadata, }) - assert.NoError(t, err, "delete request should be successful") + require.NoError(t, err, "delete request should be successful") operations := []state.TransactionalStateOperation{ // delete an item that already exists diff --git a/tests/conformance/workflow_test.go b/tests/conformance/workflow_test.go index 6d0088cd89..5bb64ccc34 100644 --- a/tests/conformance/workflow_test.go +++ b/tests/conformance/workflow_test.go @@ -24,7 +24,6 @@ import ( conf_workflows "github.com/dapr/components-contrib/tests/conformance/workflows" "github.com/dapr/components-contrib/workflows" - wf_temporal "github.com/dapr/components-contrib/workflows/temporal" ) func TestWorkflowsConformance(t *testing.T) { @@ -53,8 +52,6 @@ func TestWorkflowsConformance(t *testing.T) { func loadWorkflow(name string) workflows.Workflow { switch name { - case "temporal": - return wf_temporal.NewTemporalWorkflow(testLogger) default: return nil } diff --git a/tests/conformance/workflows/workflows.go b/tests/conformance/workflows/workflows.go index 9e96b9ae2f..7e8e3310af 100644 --- a/tests/conformance/workflows/workflows.go +++ b/tests/conformance/workflows/workflows.go @@ -54,7 +54,7 @@ func ConformanceTests(t *testing.T, props map[string]string, workflowItem workfl err := workflowItem.Init(workflows.Metadata{Base: metadata.Base{ Properties: props, }}) - assert.NoError(t, err) + require.NoError(t, err) }) // Everything is within the same task since the workflow needs to persist between operations @@ -97,7 +97,7 @@ func ConformanceTests(t *testing.T, props map[string]string, workflowItem workfl t.Run("terminate", func(t *testing.T) { err := workflowItem.Terminate(context.Background(), &workflows.TerminateRequest{InstanceID: testInstanceID}) - assert.NoError(t, err) + require.NoError(t, err) }) // Give the workflow time to process the terminate request diff --git a/tests/e2e/pubsub/jetstream/go.mod b/tests/e2e/pubsub/jetstream/go.mod index b1e7f2b1d8..034155c2a9 100644 --- a/tests/e2e/pubsub/jetstream/go.mod +++ b/tests/e2e/pubsub/jetstream/go.mod @@ -1,6 +1,8 @@ module github.com/dapr/components-contrib/tests/e2e/pubsub/jetstream -go 1.20 +go 1.21 + +toolchain go1.21.4 require ( github.com/dapr/components-contrib v1.10.6-0.20230403162214-9ee9d56cb7ea diff --git a/tests/e2e/pubsub/jetstream/go.sum b/tests/e2e/pubsub/jetstream/go.sum index 3dd4b460ab..7891b93283 100644 --- a/tests/e2e/pubsub/jetstream/go.sum +++ b/tests/e2e/pubsub/jetstream/go.sum @@ -9,7 +9,9 @@ github.com/dapr/kit v0.12.2-0.20231031211530-0e1fd37fc4b3/go.mod h1:c3Z78F+h7UYt github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -17,8 +19,10 @@ 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.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -28,8 +32,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -38,7 +45,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/nats-io/jwt/v2 v2.5.0 h1:WQQ40AAlqqfx+f6ku+i0pOVm+ASirD4fUh+oQsiE9Ak= +github.com/nats-io/jwt/v2 v2.5.0/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI= github.com/nats-io/nats-server/v2 v2.9.23 h1:6Wj6H6QpP9FMlpCyWUaNu2yeZ/qGj+mdRkZ1wbikExU= +github.com/nats-io/nats-server/v2 v2.9.23/go.mod h1:wEjrEy9vnqIGE4Pqz4/c75v9Pmaq7My2IgFmnykc4C0= github.com/nats-io/nats.go v1.28.0 h1:Th4G6zdsz2d0OqXdfzKLClo6bOfoI/b1kInhRtFIy5c= github.com/nats-io/nats.go v1.28.0/go.mod h1:XpbWUlOElGwTYbMR7imivs7jJj9GtK7ypv321Wp6pjc= github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY= @@ -47,21 +56,28 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= 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= @@ -87,6 +103,7 @@ golang.org/x/sys v0.13.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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -104,5 +121,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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= k8s.io/apimachinery v0.26.10 h1:aE+J2KIbjctFqPp3Y0q4Wh2PD+l1p2g3Zp4UYjSvtGU= k8s.io/apimachinery v0.26.10/go.mod h1:iT1ZP4JBP34wwM+ZQ8ByPEQ81u043iqAcsJYftX9amM= diff --git a/workflows/README.md b/workflows/README.md index b5552292b0..45d5abd100 100644 --- a/workflows/README.md +++ b/workflows/README.md @@ -6,10 +6,6 @@ A workflow is custom application logic that consists of a set of tasks and or st A compliant workflow needs to implement the `Workflow` interface included in the [`workflow.go`](workflow.go) file. -## Using Temporal - -When using temporal as the workflow, the task queue must be provided as an Option in the start request struct with the key: `task_queue` - ## Associated Information -The following link to the workflow proposal will provide more information on this feature area: https://github.com/dapr/dapr/issues/4576 \ No newline at end of file +The following link to the workflow proposal will provide more information on this feature area: https://github.com/dapr/dapr/issues/4576 diff --git a/workflows/temporal/temporal.go b/workflows/temporal/temporal.go deleted file mode 100644 index 268cea88c7..0000000000 --- a/workflows/temporal/temporal.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -Copyright 2021 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package temporal - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "reflect" - "time" - - "go.temporal.io/api/enums/v1" - "go.temporal.io/sdk/client" - - "github.com/dapr/components-contrib/metadata" - "github.com/dapr/components-contrib/workflows" - "github.com/dapr/kit/logger" - kitmd "github.com/dapr/kit/metadata" -) - -type TemporalWF struct { - client client.Client - logger logger.Logger -} - -type temporalMetadata struct { - Identity string `json:"identity" mapstructure:"identity"` - HostPort string `json:"hostport" mapstructure:"hostport"` - Namespace string `json:"namespace" mapstructure:"namespace"` -} - -// NewTemporalWorkflow returns a new workflow. -func NewTemporalWorkflow(logger logger.Logger) workflows.Workflow { - s := &TemporalWF{ - logger: logger, - } - return s -} - -func (c *TemporalWF) Init(metadata workflows.Metadata) error { - c.logger.Debugf("Temporal init start") - m, err := c.parseMetadata(metadata) - if err != nil { - return err - } - cOpt := client.Options{} - if m.HostPort != "" { - cOpt.HostPort = m.HostPort - } - if m.Identity != "" { - cOpt.Identity = m.Identity - } - if m.Namespace != "" { - cOpt.Namespace = m.Namespace - } - // Create the workflow client - newClient, err := client.Dial(cOpt) - if err != nil { - return err - } - c.client = newClient - - return nil -} - -func (c *TemporalWF) Start(ctx context.Context, req *workflows.StartRequest) (*workflows.StartResponse, error) { - c.logger.Debugf("starting workflow") - - if len(req.Options) == 0 { - c.logger.Debugf("no options provided") - return nil, errors.New("no options provided. At the very least, a task queue is needed") - } - - if _, ok := req.Options["task_queue"]; !ok { - c.logger.Debugf("no task queue provided") - return nil, errors.New("no task queue provided") - } - taskQ := req.Options["task_queue"] - - opt := client.StartWorkflowOptions{ID: req.InstanceID, TaskQueue: taskQ} - - var inputArgs interface{} - if err := decodeInputData(req.WorkflowInput, &inputArgs); err != nil { - return nil, fmt.Errorf("error decoding workflow input data: %w", err) - } - - run, err := c.client.ExecuteWorkflow(ctx, opt, req.WorkflowName, inputArgs) - if err != nil { - return nil, fmt.Errorf("error executing workflow: %w", err) - } - wfStruct := workflows.StartResponse{InstanceID: run.GetID()} - return &wfStruct, nil -} - -func (c *TemporalWF) Terminate(ctx context.Context, req *workflows.TerminateRequest) error { - c.logger.Debugf("terminating workflow") - - err := c.client.TerminateWorkflow(ctx, req.InstanceID, "", "") - if err != nil { - return fmt.Errorf("error terminating workflow: %w", err) - } - return nil -} - -func (c *TemporalWF) Get(ctx context.Context, req *workflows.GetRequest) (*workflows.StateResponse, error) { - c.logger.Debugf("getting workflow data") - resp, err := c.client.DescribeWorkflowExecution(ctx, req.InstanceID, "") - if err != nil { - return nil, err - } - - var createdAtTime time.Time - if resp.WorkflowExecutionInfo.StartTime != nil { - createdAtTime = *resp.WorkflowExecutionInfo.StartTime - } - - // Build the output struct - outputStruct := workflows.StateResponse{ - Workflow: &workflows.WorkflowState{ - InstanceID: req.InstanceID, - CreatedAt: createdAtTime, - LastUpdatedAt: createdAtTime, - RuntimeStatus: lookupStatus(resp.WorkflowExecutionInfo.Status), - Properties: map[string]string{ - "task_queue": resp.WorkflowExecutionInfo.GetTaskQueue(), - }, - }, - } - - return &outputStruct, nil -} - -func (c *TemporalWF) RaiseEvent(ctx context.Context, req *workflows.RaiseEventRequest) error { - var decodedEventData interface{} - if err := decodeInputData(req.EventData, &decodedEventData); err != nil { - return fmt.Errorf("error decoding workflow event data: %w", err) - } - return c.client.SignalWorkflow(ctx, req.InstanceID, "", req.EventName, decodedEventData) -} - -func (c *TemporalWF) Purge(ctx context.Context, req *workflows.PurgeRequest) error { - // Unimplemented - return nil -} - -func (c *TemporalWF) Close() { - c.client.Close() -} - -func (c *TemporalWF) Pause(ctx context.Context, req *workflows.PauseRequest) error { - return workflows.ErrNotImplemented -} - -func (c *TemporalWF) Resume(ctx context.Context, req *workflows.ResumeRequest) error { - return workflows.ErrNotImplemented -} - -func (c *TemporalWF) parseMetadata(meta workflows.Metadata) (*temporalMetadata, error) { - var m temporalMetadata - err := kitmd.DecodeMetadata(meta.Properties, &m) - return &m, err -} - -func (c *TemporalWF) GetComponentMetadata() (metadataInfo metadata.MetadataMap) { - metadataStruct := temporalMetadata{} - metadata.GetMetadataInfoFromStructType(reflect.TypeOf(metadataStruct), &metadataInfo, metadata.WorkflowType) - return -} - -func lookupStatus(status enums.WorkflowExecutionStatus) string { - switch status { - case 0: - return "Unspecified" - case 1: - return "Running" - case 2: - return "Completed" - case 3: - return "Failed" - case 4: - return "Canceled" - case 5: - return "Terminated" - case 6: - return "ContinuedAsNew" - case 7: - return "TimedOut" - default: - return "status unknown" - } -} - -func decodeInputData(data []byte, result interface{}) error { - if len(data) == 0 { - return nil - } - - // NOTE: We assume all inputs are JSON values - return json.Unmarshal(data, result) -}