Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 9304c39

Browse files
authored
chore: update deps (#191)
1 parent 19d678c commit 9304c39

836 files changed

Lines changed: 22889 additions & 40403 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/get_file_information_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ func TestGetFileInformation(t *testing.T) {
187187
id: testFiles.ProcessedFiles[1].ID,
188188
expected: &client.FileInformationHeader{
189189
CacheControl: "max-age=3600",
190-
ContentLength: 14495,
190+
ContentLength: 14497,
191191
ContentType: "image/jpeg",
192-
Etag: `"c534df8fcf66240a63b561b1d628e05fa02baad44aac4c8a93550080c2a159f1"`,
192+
Etag: `"dc72277490497dc9b3ca900e5d2797b99a23797a3bcfbc7418f60f9d4c058fe9"`,
193193
LastModified: "",
194194
Error: "",
195195
StatusCode: 200,
@@ -204,9 +204,9 @@ func TestGetFileInformation(t *testing.T) {
204204
id: testFiles.ProcessedFiles[1].ID,
205205
expected: &client.FileInformationHeader{
206206
CacheControl: "max-age=3600",
207-
ContentLength: 6640,
207+
ContentLength: 6658,
208208
ContentType: "image/jpeg",
209-
Etag: `"4ce6e420e7bb5a1c577a9125ce2bc37f950bb9f25f964112308a452985a17912"`,
209+
Etag: `"2b99a81ce11cd6604622fcf44701318e7a9c85cdac43ccb5296f5168fb301429"`,
210210
LastModified: "",
211211
Error: "",
212212
StatusCode: 200,

client/get_file_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func TestGetFile(t *testing.T) {
235235
name: "get image manipulated, if-match==etag",
236236
id: testFiles.ProcessedFiles[1].ID,
237237
opts: []client.GetFileInformationOpt{
238-
client.WithIfMatch(`"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`),
238+
client.WithIfMatch(`"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`),
239239
client.WithImageSize(600, 200),
240240
client.WithImageQuality(50),
241241
client.WithImageBlur(5),
@@ -244,14 +244,14 @@ func TestGetFile(t *testing.T) {
244244
Filename: "nhost.jpg",
245245
FileInformationHeader: &client.FileInformationHeader{
246246
CacheControl: "max-age=3600",
247-
ContentLength: 6761,
247+
ContentLength: 6775,
248248
ContentType: "image/jpeg",
249-
Etag: `"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`,
249+
Etag: `"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`,
250250
LastModified: "Tue, 18 Jan 2022 13:18:04 UTC",
251251
StatusCode: 200,
252252
},
253253
},
254-
expectedSha: "38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b",
254+
expectedSha: "012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43",
255255
},
256256
{
257257
name: "get image manipulated, if-match!=etag",
@@ -265,9 +265,9 @@ func TestGetFile(t *testing.T) {
265265
expected: &client.FileInformationHeaderWithReader{
266266
FileInformationHeader: &client.FileInformationHeader{
267267
CacheControl: "max-age=3600",
268-
ContentLength: 6761,
268+
ContentLength: 6775,
269269
ContentType: "image/jpeg",
270-
Etag: `"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`,
270+
Etag: `"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`,
271271
LastModified: "Tue, 18 Jan 2022 13:18:04 UTC",
272272
StatusCode: 412,
273273
},

cmd/serve.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const (
4646
corsAllowOriginsFlag = "cors-allow-origins"
4747
corsAllowCredentialsFlag = "cors-allow-credentials" //nolint: gosec
4848
clamavServerFlag = "clamav-server"
49-
hasuraDbNameFlag = "hasura-db-name"
49+
hasuraDBNameFlag = "hasura-db-name"
5050
)
5151

5252
func ginLogger(logger *logrus.Logger) gin.HandlerFunc {
@@ -165,7 +165,7 @@ func getContentStorage(
165165
o.EndpointOptions.DisableHTTPS = disableHTTPS
166166
},
167167
)
168-
st := storage.NewS3(client, bucket, rootFolder, s3Endpoint, disableHTTPS, logger)
168+
st := storage.NewS3(client, bucket, rootFolder, s3Endpoint, logger)
169169

170170
return st
171171
}
@@ -176,7 +176,7 @@ func applymigrations(
176176
hasuraMetadata bool,
177177
hasuraEndpoint string,
178178
hasuraSecret string,
179-
hasuraDbName string,
179+
hasuraDBName string,
180180
logger *logrus.Logger,
181181
) {
182182
if postgresMigrations {
@@ -193,7 +193,7 @@ func applymigrations(
193193

194194
if hasuraMetadata {
195195
logger.Info("applying hasura metadata")
196-
if err := migrations.ApplyHasuraMetadata(hasuraEndpoint, hasuraSecret, hasuraDbName); err != nil {
196+
if err := migrations.ApplyHasuraMetadata(hasuraEndpoint, hasuraSecret, hasuraDBName); err != nil {
197197
logger.Errorf("problem applying hasura metadata: %s", err.Error())
198198
os.Exit(1)
199199
}
@@ -241,7 +241,7 @@ func init() {
241241
"",
242242
"postgres connection, i.e. postgres://user@pass:localhost:5432/mydb",
243243
)
244-
addStringFlag(serveCmd.Flags(), hasuraDbNameFlag, "default", "Hasura database name")
244+
addStringFlag(serveCmd.Flags(), hasuraDBNameFlag, "default", "Hasura database name")
245245
}
246246

247247
{
@@ -295,7 +295,7 @@ var serveCmd = &cobra.Command{
295295
s3BucketFlag: viper.GetString(s3BucketFlag),
296296
s3RootFolderFlag: viper.GetString(s3RootFolderFlag),
297297
clamavServerFlag: viper.GetString(clamavServerFlag),
298-
hasuraDbNameFlag: viper.GetString(hasuraDbNameFlag),
298+
hasuraDBNameFlag: viper.GetString(hasuraDBNameFlag),
299299
},
300300
).Debug("parameters")
301301

@@ -317,7 +317,7 @@ var serveCmd = &cobra.Command{
317317
viper.GetBool(hasuraMetadataFlag),
318318
viper.GetString(hasuraEndpointFlag),
319319
viper.GetString(hasuraAdminSecretFlag),
320-
viper.GetString(hasuraDbNameFlag),
320+
viper.GetString(hasuraDBNameFlag),
321321
logger,
322322
)
323323

controller/delete_broken_metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"net/http/httptest"
88
"testing"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/nhost/hasura-storage/controller"
1211
"github.com/nhost/hasura-storage/controller/mock"
1312
"github.com/sirupsen/logrus"
13+
gomock "go.uber.org/mock/gomock"
1414
)
1515

1616
func TestDeleteBrokenMetadata(t *testing.T) {

controller/delete_file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"net/http/httptest"
77
"testing"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/nhost/hasura-storage/controller"
1110
"github.com/nhost/hasura-storage/controller/mock"
1211
"github.com/sirupsen/logrus"
12+
gomock "go.uber.org/mock/gomock"
1313
)
1414

1515
func TestDeleteFile(t *testing.T) {

controller/delete_orphans_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"net/http/httptest"
88
"testing"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/nhost/hasura-storage/controller"
1211
"github.com/nhost/hasura-storage/controller/mock"
1312
"github.com/sirupsen/logrus"
13+
gomock "go.uber.org/mock/gomock"
1414
)
1515

1616
func TestDeleteOrphans(t *testing.T) {

controller/get_file_information_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"net/http/httptest"
77
"testing"
88

9-
"github.com/golang/mock/gomock"
109
"github.com/nhost/hasura-storage/controller"
1110
"github.com/nhost/hasura-storage/controller/mock"
1211
"github.com/nhost/hasura-storage/image"
1312
"github.com/sirupsen/logrus"
13+
gomock "go.uber.org/mock/gomock"
1414
)
1515

1616
func getFileTestCases() []struct {

controller/get_file_presigned_url_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/golang/mock/gomock"
1211
"github.com/nhost/hasura-storage/controller"
1312
"github.com/nhost/hasura-storage/controller/mock"
1413
"github.com/sirupsen/logrus"
14+
gomock "go.uber.org/mock/gomock"
1515
)
1616

1717
func TestGetFilePresignedURL(t *testing.T) {

controller/get_file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"strings"
99
"testing"
1010

11-
"github.com/golang/mock/gomock"
1211
"github.com/nhost/hasura-storage/controller"
1312
"github.com/nhost/hasura-storage/controller/mock"
1413
"github.com/sirupsen/logrus"
14+
gomock "go.uber.org/mock/gomock"
1515
)
1616

1717
func TestGetFile(t *testing.T) {

controller/list_broken_metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"net/http/httptest"
88
"testing"
99

10-
"github.com/golang/mock/gomock"
1110
"github.com/nhost/hasura-storage/controller"
1211
"github.com/nhost/hasura-storage/controller/mock"
1312
"github.com/sirupsen/logrus"
13+
gomock "go.uber.org/mock/gomock"
1414
)
1515

1616
func TestListBrokenMetadata(t *testing.T) {

0 commit comments

Comments
 (0)