diff --git a/README.md b/README.md index 167a4f7..1952c8e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This decouples the test from the actual system and allows us to change the imple All tests, be it unit tests, service level tests or end to end integration tests, should follow the same methodology, only the SUT changes in all cases. -![test](https://github.com/Swiggy/grill/blob/media/testing.png?raw=true) +![test](https://github.com/singh-jatin28/grill/blob/media/testing.png?raw=true) ## Motivation With rapid adoption of microservices architecture at Swiggy, we realized the limitation of unit tests. Especially for I/O bound microservice which @@ -71,7 +71,7 @@ It uses testcontainers-go underneath for dockers. | ES | CreateIndex, PutItem | AssertItemsCount | DeleteIndices, DeleteItem | ## Getting Started -Check the [Wiki page](https://github.com/Swiggy/grill/wiki) for getting started with Grill +Check the [Wiki page](https://github.com/singh-jatin28/grill/wiki) for getting started with Grill ## Why write functional tests at all ?? * * * diff --git a/go.mod b/go.mod index a5cbc89..5bbe339 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Swiggy/grill +module github.com/singh-jatin28/grill go 1.21 @@ -22,13 +22,12 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect + github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/Microsoft/hcsshim v0.11.5 // indirect github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/containerd/containerd v1.7.18 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect @@ -37,6 +36,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/fatih/color v1.9.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -75,14 +75,16 @@ require ( github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index 5d18b65..069195c 100644 --- a/go.sum +++ b/go.sum @@ -9,14 +9,8 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg6 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= -github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= -github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= github.com/actgardner/gogen-avro/v10 v10.1.0/go.mod h1:o+ybmVjEa27AAr35FRqU98DJu1fXES56uXniYFv4yDA= github.com/actgardner/gogen-avro/v10 v10.2.1/go.mod h1:QUhjeHPchheYmMDni/Nx7VB0RsT/ee8YIgGY/xpEQgQ= github.com/actgardner/gogen-avro/v9 v9.1.0/go.mod h1:nyTj6wPqDJoxM3qdnjcLv+EnMDSDFqE0qDpva2QRmKc= @@ -46,10 +40,6 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/confluentinc/confluent-kafka-go v1.9.2 h1:gV/GxhMBUb03tFWkN+7kdhg+zf+QUM+wVkI9zwh770Q= github.com/confluentinc/confluent-kafka-go v1.9.2/go.mod h1:ptXNqsuDfYbAE/LBW6pnwWZElUoWxHoV8E43DCrliyo= -github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= -github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= -github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= -github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -64,12 +54,8 @@ 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/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= -github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= -github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -94,8 +80,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= @@ -106,8 +90,6 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -138,8 +120,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -233,8 +213,6 @@ github.com/juju/qthttptest v0.1.1/go.mod h1:aTlAv8TYaflIiTDIQYzxnl1QdPjAg8Q8qJME github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 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/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -346,12 +324,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= -github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8= -github.com/testcontainers/testcontainers-go/modules/kafka v0.29.1 h1:idNT5Pw9NI6cR7ZEtw+w4tPyadi/pqqYvkAWmlfWAG0= -github.com/testcontainers/testcontainers-go/modules/kafka v0.29.1/go.mod h1:5FZ9KvcEPtfF2w9RQhj5N/YEkY6qoQm3vM0gJ0vHzyo= github.com/testcontainers/testcontainers-go/modules/kafka v0.33.0 h1:Zug/9wK9tE9NdJ/sy27XbIvIVjXsD7rXrcV5B3KVrOM= github.com/testcontainers/testcontainers-go/modules/kafka v0.33.0/go.mod h1:J8NhxBCTnivcTANoNpuMnOEkdKf/x9zwZ434Y4dbIH4= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -363,26 +337,18 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -393,21 +359,15 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -426,8 +386,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -439,8 +397,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-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-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -464,25 +420,23 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -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/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -494,10 +448,6 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -509,13 +459,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 h1:vlzZttNJGVqTsRFU9AmdnrcO1Znh8Ew9kCD//yjigk0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -526,8 +471,6 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -543,8 +486,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 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.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/avro.v0 v0.0.0-20171217001914-a730b5802183/go.mod h1:FvqrFXt+jCsyQibeRv4xxEJBL5iG2DDW5aeJwzDiq4A= @@ -568,8 +509,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pkg/grillclusteredredis/assertions.go b/pkg/grillclusteredredis/assertions.go index 17706a3..fa40002 100644 --- a/pkg/grillclusteredredis/assertions.go +++ b/pkg/grillclusteredredis/assertions.go @@ -3,7 +3,7 @@ package grillclusterredis import ( "context" "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gr *ClusteredRedis) AssertValue(key, expected string) grill.Assertion { diff --git a/pkg/grillclusteredredis/cleaners.go b/pkg/grillclusteredredis/cleaners.go index ea64df4..ef9284d 100644 --- a/pkg/grillclusteredredis/cleaners.go +++ b/pkg/grillclusteredredis/cleaners.go @@ -2,7 +2,7 @@ package grillclusterredis import ( "context" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gr *ClusteredRedis) FlushDB() grill.Cleaner { diff --git a/pkg/grillclusteredredis/clustered_redis.go b/pkg/grillclusteredredis/clustered_redis.go index 2468897..a04b081 100644 --- a/pkg/grillclusteredredis/clustered_redis.go +++ b/pkg/grillclusteredredis/clustered_redis.go @@ -2,8 +2,8 @@ package grillclusterredis import ( "context" - "github.com/Swiggy/grill/canned" "github.com/go-redis/redis/v8" + "github.com/singh-jatin28/grill/canned" ) type ClusteredRedis struct { diff --git a/pkg/grillclusteredredis/clustered_redis_test.go b/pkg/grillclusteredredis/clustered_redis_test.go index 7feedaf..52e1390 100644 --- a/pkg/grillclusteredredis/clustered_redis_test.go +++ b/pkg/grillclusteredredis/clustered_redis_test.go @@ -3,7 +3,7 @@ package grillclusterredis import ( "context" "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" "testing" ) diff --git a/pkg/grillclusteredredis/stubs.go b/pkg/grillclusteredredis/stubs.go index b6f6432..55b620f 100644 --- a/pkg/grillclusteredredis/stubs.go +++ b/pkg/grillclusteredredis/stubs.go @@ -2,7 +2,7 @@ package grillclusterredis import ( "context" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" "time" ) diff --git a/pkg/grillconsul/assertions.go b/pkg/grillconsul/assertions.go index 0a6bf0d..0f2de3c 100644 --- a/pkg/grillconsul/assertions.go +++ b/pkg/grillconsul/assertions.go @@ -3,7 +3,7 @@ package grillconsul import ( "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gc *Consul) AssertValue(key, expected string) grill.Assertion { diff --git a/pkg/grillconsul/cleaners.go b/pkg/grillconsul/cleaners.go index b6ba1f7..3b9cdd4 100644 --- a/pkg/grillconsul/cleaners.go +++ b/pkg/grillconsul/cleaners.go @@ -1,6 +1,6 @@ package grillconsul -import "github.com/Swiggy/grill" +import "github.com/singh-jatin28/grill" func (gc *Consul) DeleteAllKeys() grill.Cleaner { return grill.CleanerFunc(func() error { diff --git a/pkg/grillconsul/consul.go b/pkg/grillconsul/consul.go index 5da9670..22ecfc6 100644 --- a/pkg/grillconsul/consul.go +++ b/pkg/grillconsul/consul.go @@ -2,7 +2,7 @@ package grillconsul import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "github.com/hashicorp/consul/api" ) diff --git a/pkg/grillconsul/consul_test.go b/pkg/grillconsul/consul_test.go index 894fc49..7057deb 100644 --- a/pkg/grillconsul/consul_test.go +++ b/pkg/grillconsul/consul_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func Test_GrillRedis(t *testing.T) { diff --git a/pkg/grillconsul/stubs.go b/pkg/grillconsul/stubs.go index f633ad0..0cb3ea8 100644 --- a/pkg/grillconsul/stubs.go +++ b/pkg/grillconsul/stubs.go @@ -7,8 +7,8 @@ import ( "log" "os" - "github.com/Swiggy/grill" "github.com/hashicorp/consul/api" + "github.com/singh-jatin28/grill" ) // Reads a csv file and puts them in Consul. diff --git a/pkg/grilldynamo/assertions.go b/pkg/grilldynamo/assertions.go index 465ae2b..4e75f89 100644 --- a/pkg/grilldynamo/assertions.go +++ b/pkg/grilldynamo/assertions.go @@ -4,9 +4,9 @@ import ( "fmt" "reflect" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" + "github.com/singh-jatin28/grill" ) func (gd *Dynamo) AssertScanCount(input *dynamodb.ScanInput, expectedCount int) grill.Assertion { diff --git a/pkg/grilldynamo/cleaners.go b/pkg/grilldynamo/cleaners.go index 13c9680..a07503b 100644 --- a/pkg/grilldynamo/cleaners.go +++ b/pkg/grilldynamo/cleaners.go @@ -1,9 +1,9 @@ package grilldynamo import ( - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/singh-jatin28/grill" ) func (gd *Dynamo) DeleteItem(tableName string, key map[string]*dynamodb.AttributeValue) grill.Cleaner { diff --git a/pkg/grilldynamo/dynamo.go b/pkg/grilldynamo/dynamo.go index 46e8192..c2ccdd5 100644 --- a/pkg/grilldynamo/dynamo.go +++ b/pkg/grilldynamo/dynamo.go @@ -2,7 +2,7 @@ package grilldynamo import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface" ) diff --git a/pkg/grilldynamo/dynamo_test.go b/pkg/grilldynamo/dynamo_test.go index 7019f52..228e1d4 100644 --- a/pkg/grilldynamo/dynamo_test.go +++ b/pkg/grilldynamo/dynamo_test.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/singh-jatin28/grill" ) type testVal struct { diff --git a/pkg/grilldynamo/stubs.go b/pkg/grilldynamo/stubs.go index dababad..b172efc 100644 --- a/pkg/grilldynamo/stubs.go +++ b/pkg/grilldynamo/stubs.go @@ -5,10 +5,10 @@ import ( "encoding/json" "os" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute" + "github.com/singh-jatin28/grill" ) func (gd *Dynamo) CreateTable(req *dynamodb.CreateTableInput) grill.Stub { @@ -32,9 +32,9 @@ func (gd *Dynamo) PutItem(tableName string, item map[string]*dynamodb.AttributeV // Each Line represents a new item // // Args - -// tableName - table to put data -// filePath - absolute file path. // +// tableName - table to put data +// filePath - absolute file path. func (gd *Dynamo) SeedDataFromFile(tableName string, filePath string) grill.Stub { return grill.StubFunc(func() error { file, err := os.Open(filePath) diff --git a/pkg/grillelasticsearch/assertions.go b/pkg/grillelasticsearch/assertions.go index 905f2d7..8e3b536 100644 --- a/pkg/grillelasticsearch/assertions.go +++ b/pkg/grillelasticsearch/assertions.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" "fmt" - "github.com/Swiggy/grill" "github.com/elastic/go-elasticsearch/v7/esapi" + "github.com/singh-jatin28/grill" "io" "reflect" ) diff --git a/pkg/grillelasticsearch/cleaners.go b/pkg/grillelasticsearch/cleaners.go index 59e4f8c..d53dd5b 100644 --- a/pkg/grillelasticsearch/cleaners.go +++ b/pkg/grillelasticsearch/cleaners.go @@ -2,8 +2,8 @@ package grillelasticsearch import ( "context" - "github.com/Swiggy/grill" "github.com/elastic/go-elasticsearch/v7/esapi" + "github.com/singh-jatin28/grill" ) func (ge *ElasticSearch) DeleteIndices(indices ...string) grill.Cleaner { diff --git a/pkg/grillelasticsearch/es.go b/pkg/grillelasticsearch/es.go index 84f41d1..54bd5b8 100644 --- a/pkg/grillelasticsearch/es.go +++ b/pkg/grillelasticsearch/es.go @@ -2,8 +2,8 @@ package grillelasticsearch import ( "context" - "github.com/Swiggy/grill/canned" "github.com/elastic/go-elasticsearch/v7" + "github.com/singh-jatin28/grill/canned" ) type ElasticSearch struct { diff --git a/pkg/grillelasticsearch/es_test.go b/pkg/grillelasticsearch/es_test.go index 08d2fb9..d3e58c7 100644 --- a/pkg/grillelasticsearch/es_test.go +++ b/pkg/grillelasticsearch/es_test.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" "testing" "time" ) diff --git a/pkg/grillelasticsearch/stubs.go b/pkg/grillelasticsearch/stubs.go index d3c1d32..6684e09 100644 --- a/pkg/grillelasticsearch/stubs.go +++ b/pkg/grillelasticsearch/stubs.go @@ -4,8 +4,8 @@ import ( "bytes" "context" "fmt" - "github.com/Swiggy/grill" "github.com/elastic/go-elasticsearch/v7/esapi" + "github.com/singh-jatin28/grill" "strings" ) diff --git a/pkg/grillgrpc/assertions.go b/pkg/grillgrpc/assertions.go index a429c74..17f0c91 100644 --- a/pkg/grillgrpc/assertions.go +++ b/pkg/grillgrpc/assertions.go @@ -3,7 +3,7 @@ package grillgrpc import ( "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gg *GRPC) AssertCount(request Request, expectedCount int) grill.Assertion { diff --git a/pkg/grillgrpc/cleaners.go b/pkg/grillgrpc/cleaners.go index e466f79..8909733 100644 --- a/pkg/grillgrpc/cleaners.go +++ b/pkg/grillgrpc/cleaners.go @@ -1,6 +1,6 @@ package grillgrpc -import "github.com/Swiggy/grill" +import "github.com/singh-jatin28/grill" func (gg *GRPC) ResetAllStubs() grill.Cleaner { return grill.CleanerFunc(func() error { diff --git a/pkg/grillgrpc/grpc_test.go b/pkg/grillgrpc/grpc_test.go index 2428bb4..55a0f9b 100644 --- a/pkg/grillgrpc/grpc_test.go +++ b/pkg/grillgrpc/grpc_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/Swiggy/grill/pkg/grillgrpc/hello" + "github.com/singh-jatin28/grill/pkg/grillgrpc/hello" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/pkg/grillgrpc/stubs.go b/pkg/grillgrpc/stubs.go index f3a5676..3e19348 100644 --- a/pkg/grillgrpc/stubs.go +++ b/pkg/grillgrpc/stubs.go @@ -1,7 +1,7 @@ package grillgrpc import ( - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gg *GRPC) Stub(request Request, response Response) grill.Stub { diff --git a/pkg/grillhttp/assertions.go b/pkg/grillhttp/assertions.go index d7035b0..97f4932 100644 --- a/pkg/grillhttp/assertions.go +++ b/pkg/grillhttp/assertions.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gh *HTTP) AssertCount(request *Request, expectedCount int) grill.Assertion { diff --git a/pkg/grillhttp/cleaners.go b/pkg/grillhttp/cleaners.go index eabd60d..76b4703 100644 --- a/pkg/grillhttp/cleaners.go +++ b/pkg/grillhttp/cleaners.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gh *HTTP) ResetAllStubs() grill.Cleaner { diff --git a/pkg/grillhttp/http.go b/pkg/grillhttp/http.go index e4dad5f..d823e16 100644 --- a/pkg/grillhttp/http.go +++ b/pkg/grillhttp/http.go @@ -2,7 +2,7 @@ package grillhttp import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" ) type HTTP struct { diff --git a/pkg/grillhttp/http_test.go b/pkg/grillhttp/http_test.go index 70df2e9..61304ad 100644 --- a/pkg/grillhttp/http_test.go +++ b/pkg/grillhttp/http_test.go @@ -7,7 +7,7 @@ import ( "net/http" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) var ( diff --git a/pkg/grillhttp/stubs.go b/pkg/grillhttp/stubs.go index 2280d28..32d25bd 100644 --- a/pkg/grillhttp/stubs.go +++ b/pkg/grillhttp/stubs.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gh *HTTP) StubFromJSON(stubStr string) grill.Stub { diff --git a/pkg/grillkafka/assertions.go b/pkg/grillkafka/assertions.go index ac79629..e25bc93 100644 --- a/pkg/grillkafka/assertions.go +++ b/pkg/grillkafka/assertions.go @@ -6,13 +6,13 @@ import ( "reflect" "time" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gk *Kafka) AssertCount(topicName string, expectedCount int) grill.Assertion { return grill.AssertionFunc(func() error { group := fmt.Sprintf("%s_%d_%s", "oh_my_test_helper", rand.Intn(1000), time.Now()) - consumer, err := gk.NewConsumer(group, topicName, time.Second*5) + consumer, err := gk.NewConsumer(group, topicName, time.Second) if err != nil { return err } @@ -33,7 +33,7 @@ func (gk *Kafka) AssertCount(topicName string, expectedCount int) grill.Assertio func (gk *Kafka) AssertMessageCount(topic string, message Message, expectedCount int) grill.Assertion { return grill.AssertionFunc(func() error { group := fmt.Sprintf("%s_%d_%s", "oh_my_test_helper", rand.Intn(1000), time.Now()) - consumer, err := gk.NewConsumer(group, topic, time.Second*5) + consumer, err := gk.NewConsumer(group, topic, time.Second) if err != nil { return err } diff --git a/pkg/grillkafka/cleaners.go b/pkg/grillkafka/cleaners.go index f4da82a..4a82849 100644 --- a/pkg/grillkafka/cleaners.go +++ b/pkg/grillkafka/cleaners.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/Swiggy/grill" confluent "github.com/confluentinc/confluent-kafka-go/kafka" + "github.com/singh-jatin28/grill" ) func (gk *Kafka) DeleteTopics(topics ...string) grill.Cleaner { diff --git a/pkg/grillkafka/kafka.go b/pkg/grillkafka/kafka.go index 313f11e..ffbe1e1 100644 --- a/pkg/grillkafka/kafka.go +++ b/pkg/grillkafka/kafka.go @@ -2,7 +2,7 @@ package grillkafka import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "time" confluent "github.com/confluentinc/confluent-kafka-go/kafka" diff --git a/pkg/grillkafka/kafka_test.go b/pkg/grillkafka/kafka_test.go index 49956f2..55618de 100644 --- a/pkg/grillkafka/kafka_test.go +++ b/pkg/grillkafka/kafka_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) var ( diff --git a/pkg/grillkafka/stubs.go b/pkg/grillkafka/stubs.go index 2c5c73e..62701d6 100644 --- a/pkg/grillkafka/stubs.go +++ b/pkg/grillkafka/stubs.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/Swiggy/grill" confluent "github.com/confluentinc/confluent-kafka-go/kafka" + "github.com/singh-jatin28/grill" ) func (gk *Kafka) CreateTopics(topics ...string) grill.Stub { diff --git a/pkg/grillmysql/assertions.go b/pkg/grillmysql/assertions.go index 1e8b3da..d9763d4 100644 --- a/pkg/grillmysql/assertions.go +++ b/pkg/grillmysql/assertions.go @@ -3,7 +3,7 @@ package grillmysql import ( "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gm *Mysql) AssertCount(tableName string, expectedCount int) grill.Assertion { diff --git a/pkg/grillmysql/cleaners.go b/pkg/grillmysql/cleaners.go index 37658ca..1761798 100644 --- a/pkg/grillmysql/cleaners.go +++ b/pkg/grillmysql/cleaners.go @@ -3,7 +3,7 @@ package grillmysql import ( "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gm *Mysql) DeleteTable(tableName string) grill.Cleaner { diff --git a/pkg/grillmysql/mysql.go b/pkg/grillmysql/mysql.go index 3da2c65..530eacb 100644 --- a/pkg/grillmysql/mysql.go +++ b/pkg/grillmysql/mysql.go @@ -3,7 +3,7 @@ package grillmysql import ( "context" "database/sql" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" ) type Mysql struct { diff --git a/pkg/grillmysql/mysql_test.go b/pkg/grillmysql/mysql_test.go index 188df72..81c3b46 100644 --- a/pkg/grillmysql/mysql_test.go +++ b/pkg/grillmysql/mysql_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) const createTaskTableQuery = `CREATE TABLE task ( diff --git a/pkg/grillmysql/stubs.go b/pkg/grillmysql/stubs.go index 5d48265..eb22dba 100644 --- a/pkg/grillmysql/stubs.go +++ b/pkg/grillmysql/stubs.go @@ -3,8 +3,8 @@ package grillmysql import ( "fmt" - "github.com/Swiggy/grill" "github.com/go-sql-driver/mysql" + "github.com/singh-jatin28/grill" ) func (gm *Mysql) CreateTable(query string) grill.Stub { diff --git a/pkg/grillredis/assertions.go b/pkg/grillredis/assertions.go index 087f9b8..47eae86 100644 --- a/pkg/grillredis/assertions.go +++ b/pkg/grillredis/assertions.go @@ -3,7 +3,7 @@ package grillredis import ( "fmt" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gr *Redis) AssertValue(key, expected string) grill.Assertion { diff --git a/pkg/grillredis/cleaners.go b/pkg/grillredis/cleaners.go index 640f576..0157d7d 100644 --- a/pkg/grillredis/cleaners.go +++ b/pkg/grillredis/cleaners.go @@ -1,6 +1,6 @@ package grillredis -import "github.com/Swiggy/grill" +import "github.com/singh-jatin28/grill" func (gr *Redis) FlushDB() grill.Cleaner { return grill.CleanerFunc(func() error { diff --git a/pkg/grillredis/redis.go b/pkg/grillredis/redis.go index c262dd3..9520e57 100644 --- a/pkg/grillredis/redis.go +++ b/pkg/grillredis/redis.go @@ -2,7 +2,7 @@ package grillredis import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "github.com/gomodule/redigo/redis" ) diff --git a/pkg/grillredis/redis_test.go b/pkg/grillredis/redis_test.go index 8032b1b..33d9422 100644 --- a/pkg/grillredis/redis_test.go +++ b/pkg/grillredis/redis_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func Test_GrillRedis(t *testing.T) { diff --git a/pkg/grillredis/stubs.go b/pkg/grillredis/stubs.go index ebd8617..78e53ad 100644 --- a/pkg/grillredis/stubs.go +++ b/pkg/grillredis/stubs.go @@ -1,6 +1,6 @@ package grillredis -import "github.com/Swiggy/grill" +import "github.com/singh-jatin28/grill" func (gr *Redis) SelectDB(db int) grill.Stub { return grill.StubFunc(func() error { diff --git a/pkg/grills3/assertions.go b/pkg/grills3/assertions.go index b23ba9c..177c4d2 100644 --- a/pkg/grills3/assertions.go +++ b/pkg/grills3/assertions.go @@ -3,9 +3,9 @@ package grills3 import ( "fmt" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" + "github.com/singh-jatin28/grill" ) func (gs *S3) AssertFileExists(bucket, key string) grill.Assertion { diff --git a/pkg/grills3/cleaners.go b/pkg/grills3/cleaners.go index 00c2d3d..6ad67b1 100644 --- a/pkg/grills3/cleaners.go +++ b/pkg/grills3/cleaners.go @@ -1,9 +1,9 @@ package grills3 import ( - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" + "github.com/singh-jatin28/grill" ) func (gs *S3) DeleteBucket(bucketName string) grill.Cleaner { diff --git a/pkg/grills3/s3.go b/pkg/grills3/s3.go index ff877c3..b99e77b 100644 --- a/pkg/grills3/s3.go +++ b/pkg/grills3/s3.go @@ -2,7 +2,7 @@ package grills3 import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "github.com/aws/aws-sdk-go/service/s3/s3iface" ) diff --git a/pkg/grills3/s3_test.go b/pkg/grills3/s3_test.go index 08ffabb..adb3ca0 100644 --- a/pkg/grills3/s3_test.go +++ b/pkg/grills3/s3_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func Test_GrillS3(t *testing.T) { diff --git a/pkg/grills3/stubs.go b/pkg/grills3/stubs.go index 4ab8eba..b9f9420 100644 --- a/pkg/grills3/stubs.go +++ b/pkg/grills3/stubs.go @@ -3,9 +3,9 @@ package grills3 import ( "os" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" + "github.com/singh-jatin28/grill" ) func (gs *S3) CreateBucket(bucketName string) grill.Stub { diff --git a/pkg/grillsqs/assertions.go b/pkg/grillsqs/assertions.go index 6dd15bf..ca7198d 100644 --- a/pkg/grillsqs/assertions.go +++ b/pkg/grillsqs/assertions.go @@ -2,9 +2,9 @@ package grillsqs import ( "fmt" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/singh-jatin28/grill" "time" ) diff --git a/pkg/grillsqs/cleaners.go b/pkg/grillsqs/cleaners.go index 9b459c2..d5e8d1e 100644 --- a/pkg/grillsqs/cleaners.go +++ b/pkg/grillsqs/cleaners.go @@ -1,9 +1,9 @@ package grillsqs import ( - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/singh-jatin28/grill" ) func (gs *SQS) DeleteQueues(queues ...string) grill.Cleaner { diff --git a/pkg/grillsqs/sqs.go b/pkg/grillsqs/sqs.go index b07ba48..b472a68 100644 --- a/pkg/grillsqs/sqs.go +++ b/pkg/grillsqs/sqs.go @@ -3,10 +3,10 @@ package grillsqs import ( "context" "fmt" - "github.com/Swiggy/grill/canned" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" "github.com/aws/aws-sdk-go/service/sqs/sqsiface" + "github.com/singh-jatin28/grill/canned" ) type SQS struct { diff --git a/pkg/grillsqs/sqs_test.go b/pkg/grillsqs/sqs_test.go index a783951..0fc4d42 100644 --- a/pkg/grillsqs/sqs_test.go +++ b/pkg/grillsqs/sqs_test.go @@ -3,9 +3,9 @@ package grillsqs import ( "context" "fmt" - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/singh-jatin28/grill" "testing" "time" ) diff --git a/pkg/grillsqs/stubs.go b/pkg/grillsqs/stubs.go index f3086cb..0038a77 100644 --- a/pkg/grillsqs/stubs.go +++ b/pkg/grillsqs/stubs.go @@ -1,8 +1,8 @@ package grillsqs import ( - "github.com/Swiggy/grill" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/singh-jatin28/grill" ) func (gs *SQS) CreateQueue(createQueueInput *sqs.CreateQueueInput) grill.Stub { diff --git a/pkg/grilltile38/assertions.go b/pkg/grilltile38/assertions.go index 8cc9005..a0cee5c 100644 --- a/pkg/grilltile38/assertions.go +++ b/pkg/grilltile38/assertions.go @@ -5,8 +5,8 @@ import ( "fmt" "reflect" - "github.com/Swiggy/grill" "github.com/gomodule/redigo/redis" + "github.com/singh-jatin28/grill" ) func (gt *Tile38) AssertObject(key, id string, expected string) grill.Assertion { diff --git a/pkg/grilltile38/cleaners.go b/pkg/grilltile38/cleaners.go index 00c4eb9..26a8438 100644 --- a/pkg/grilltile38/cleaners.go +++ b/pkg/grilltile38/cleaners.go @@ -1,6 +1,6 @@ package grilltile38 -import "github.com/Swiggy/grill" +import "github.com/singh-jatin28/grill" func (gt *Tile38) FlushDB() grill.Cleaner { return grill.CleanerFunc(func() error { diff --git a/pkg/grilltile38/stubs.go b/pkg/grilltile38/stubs.go index ba7f01a..9280fb1 100644 --- a/pkg/grilltile38/stubs.go +++ b/pkg/grilltile38/stubs.go @@ -1,7 +1,7 @@ package grilltile38 import ( - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) func (gt *Tile38) SetObject(key string, id string, object string) grill.Stub { diff --git a/pkg/grilltile38/tile38.go b/pkg/grilltile38/tile38.go index 43ea745..4669e02 100644 --- a/pkg/grilltile38/tile38.go +++ b/pkg/grilltile38/tile38.go @@ -2,7 +2,7 @@ package grilltile38 import ( "context" - "github.com/Swiggy/grill/canned" + "github.com/singh-jatin28/grill/canned" "github.com/gomodule/redigo/redis" ) diff --git a/pkg/grilltile38/tile38_test.go b/pkg/grilltile38/tile38_test.go index 3a9b92f..c502e1f 100644 --- a/pkg/grilltile38/tile38_test.go +++ b/pkg/grilltile38/tile38_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/Swiggy/grill" + "github.com/singh-jatin28/grill" ) var ( diff --git a/try.go b/try.go index 24999f9..387c592 100644 --- a/try.go +++ b/try.go @@ -5,22 +5,38 @@ import ( "time" ) -func Try(deadline time.Duration, minSuccess int, assertion Assertion) Assertion { - return &tryAssertion{ - assertion: assertion, - deadline: deadline, - minSuccess: minSuccess, +type TryOption func(*tryAssertion) + +// WithCheckFrequency sets a custom frequency for assertion checks. +// If not set, frequency is derived from deadline and minSuccess. +func WithCheckFrequency(frequency time.Duration) TryOption { + return func(t *tryAssertion) { + t.checkFrequency = frequency + } +} + +func Try(deadline time.Duration, minSuccess int, assertion Assertion, options ...TryOption) Assertion { + t := &tryAssertion{ + assertion: assertion, + deadline: deadline, + minSuccess: minSuccess, + checkFrequency: deadline / time.Duration(minSuccess*3+3), + } + for _, opt := range options { + opt(t) } + return t } type tryAssertion struct { - assertion Assertion - deadline time.Duration - minSuccess int + assertion Assertion + deadline time.Duration + minSuccess int + checkFrequency time.Duration } func (assert *tryAssertion) Assert() error { - checkC := time.Tick(assert.deadline / time.Duration(assert.minSuccess*3+3)) + checkC := time.Tick(assert.checkFrequency) quitC := time.Tick(assert.deadline) var successCount = 0 var errors []string diff --git a/try_test.go b/try_test.go index fafc1e0..7fa9989 100644 --- a/try_test.go +++ b/try_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/Swiggy/grill/mock" "github.com/golang/mock/gomock" + "github.com/singh-jatin28/grill/mock" ) func TestTry(t *testing.T) {