Skip to content

Commit

Permalink
chore: update deps (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Jan 11, 2024
1 parent 19d678c commit 9304c39
Show file tree
Hide file tree
Showing 836 changed files with 22,889 additions and 40,403 deletions.
8 changes: 4 additions & 4 deletions client/get_file_information_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ func TestGetFileInformation(t *testing.T) {
id: testFiles.ProcessedFiles[1].ID,
expected: &client.FileInformationHeader{
CacheControl: "max-age=3600",
ContentLength: 14495,
ContentLength: 14497,
ContentType: "image/jpeg",
Etag: `"c534df8fcf66240a63b561b1d628e05fa02baad44aac4c8a93550080c2a159f1"`,
Etag: `"dc72277490497dc9b3ca900e5d2797b99a23797a3bcfbc7418f60f9d4c058fe9"`,
LastModified: "",
Error: "",
StatusCode: 200,
Expand All @@ -204,9 +204,9 @@ func TestGetFileInformation(t *testing.T) {
id: testFiles.ProcessedFiles[1].ID,
expected: &client.FileInformationHeader{
CacheControl: "max-age=3600",
ContentLength: 6640,
ContentLength: 6658,
ContentType: "image/jpeg",
Etag: `"4ce6e420e7bb5a1c577a9125ce2bc37f950bb9f25f964112308a452985a17912"`,
Etag: `"2b99a81ce11cd6604622fcf44701318e7a9c85cdac43ccb5296f5168fb301429"`,
LastModified: "",
Error: "",
StatusCode: 200,
Expand Down
12 changes: 6 additions & 6 deletions client/get_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func TestGetFile(t *testing.T) {
name: "get image manipulated, if-match==etag",
id: testFiles.ProcessedFiles[1].ID,
opts: []client.GetFileInformationOpt{
client.WithIfMatch(`"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`),
client.WithIfMatch(`"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`),
client.WithImageSize(600, 200),
client.WithImageQuality(50),
client.WithImageBlur(5),
Expand All @@ -244,14 +244,14 @@ func TestGetFile(t *testing.T) {
Filename: "nhost.jpg",
FileInformationHeader: &client.FileInformationHeader{
CacheControl: "max-age=3600",
ContentLength: 6761,
ContentLength: 6775,
ContentType: "image/jpeg",
Etag: `"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`,
Etag: `"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`,
LastModified: "Tue, 18 Jan 2022 13:18:04 UTC",
StatusCode: 200,
},
},
expectedSha: "38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b",
expectedSha: "012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43",
},
{
name: "get image manipulated, if-match!=etag",
Expand All @@ -265,9 +265,9 @@ func TestGetFile(t *testing.T) {
expected: &client.FileInformationHeaderWithReader{
FileInformationHeader: &client.FileInformationHeader{
CacheControl: "max-age=3600",
ContentLength: 6761,
ContentLength: 6775,
ContentType: "image/jpeg",
Etag: `"38aae548d455b164041743d5a0131d93b94fd0f13b2d6aed278469ce29f2328b"`,
Etag: `"012fe5fec0a590f1c7246938af1918d02cc1514e30b76e0b45ff5ab2123a2b43"`,
LastModified: "Tue, 18 Jan 2022 13:18:04 UTC",
StatusCode: 412,
},
Expand Down
14 changes: 7 additions & 7 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
corsAllowOriginsFlag = "cors-allow-origins"
corsAllowCredentialsFlag = "cors-allow-credentials" //nolint: gosec
clamavServerFlag = "clamav-server"
hasuraDbNameFlag = "hasura-db-name"
hasuraDBNameFlag = "hasura-db-name"
)

func ginLogger(logger *logrus.Logger) gin.HandlerFunc {
Expand Down Expand Up @@ -165,7 +165,7 @@ func getContentStorage(
o.EndpointOptions.DisableHTTPS = disableHTTPS
},
)
st := storage.NewS3(client, bucket, rootFolder, s3Endpoint, disableHTTPS, logger)
st := storage.NewS3(client, bucket, rootFolder, s3Endpoint, logger)

return st
}
Expand All @@ -176,7 +176,7 @@ func applymigrations(
hasuraMetadata bool,
hasuraEndpoint string,
hasuraSecret string,
hasuraDbName string,
hasuraDBName string,
logger *logrus.Logger,
) {
if postgresMigrations {
Expand All @@ -193,7 +193,7 @@ func applymigrations(

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

{
Expand Down Expand Up @@ -295,7 +295,7 @@ var serveCmd = &cobra.Command{
s3BucketFlag: viper.GetString(s3BucketFlag),
s3RootFolderFlag: viper.GetString(s3RootFolderFlag),
clamavServerFlag: viper.GetString(clamavServerFlag),
hasuraDbNameFlag: viper.GetString(hasuraDbNameFlag),
hasuraDBNameFlag: viper.GetString(hasuraDBNameFlag),
},
).Debug("parameters")

Expand All @@ -317,7 +317,7 @@ var serveCmd = &cobra.Command{
viper.GetBool(hasuraMetadataFlag),
viper.GetString(hasuraEndpointFlag),
viper.GetString(hasuraAdminSecretFlag),
viper.GetString(hasuraDbNameFlag),
viper.GetString(hasuraDBNameFlag),
logger,
)

Expand Down
2 changes: 1 addition & 1 deletion controller/delete_broken_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestDeleteBrokenMetadata(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/delete_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestDeleteFile(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/delete_orphans_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestDeleteOrphans(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/get_file_information_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/nhost/hasura-storage/image"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func getFileTestCases() []struct {
Expand Down
2 changes: 1 addition & 1 deletion controller/get_file_presigned_url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestGetFilePresignedURL(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/get_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strings"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestGetFile(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/list_broken_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestListBrokenMetadata(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/list_not_uploaded_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestListNotUploaded(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/list_orphans_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"

"github.com/golang/mock/gomock"
"github.com/nhost/hasura-storage/controller"
"github.com/nhost/hasura-storage/controller/mock"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

func TestListOrphans(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion controller/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/nhost/hasura-storage/controller"
"github.com/sirupsen/logrus"
gomock "go.uber.org/mock/gomock"
)

type readerMatcher struct {
Expand Down
10 changes: 7 additions & 3 deletions controller/mock/antivirus.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions controller/mock/content_storage.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9304c39

Please sign in to comment.