Skip to content

Commit

Permalink
Merge pull request #584 from gotify/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
jmattheis committed Jul 30, 2023
2 parents 72bd8c8 + 835adee commit a444182
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 54 deletions.
18 changes: 1 addition & 17 deletions api/application_test.go
Expand Up @@ -302,7 +302,7 @@ func (s *ApplicationSuite) Test_UploadAppImage_OtherErrors_expectServerError() {
s.a.UploadApplicationImage(s.ctx)

assert.Equal(s.T(), 500, s.recorder.Code)
assert.Equal(s.T(), s.ctx.Errors[0].Err, errors.New("multipart: NextPart: EOF"))
assert.Error(s.T(), s.ctx.Errors[0].Err, "multipart: NextPart: EOF")
}

func (s *ApplicationSuite) Test_UploadAppImage_WithImageFile_expectSuccess() {
Expand Down Expand Up @@ -467,22 +467,6 @@ func (s *ApplicationSuite) Test_RemoveAppImage_expectSuccess() {
assert.Equal(s.T(), 200, s.recorder.Code)
}

func (s *ApplicationSuite) Test_UploadAppImage_WithSaveError_expectServerError() {
s.db.User(5).App(1)

cType, buffer, err := upload(map[string]*os.File{"file": mustOpen("../test/assets/image.png")})
assert.Nil(s.T(), err)
s.ctx.Request = httptest.NewRequest("POST", "/irrelevant/", &buffer)
s.a.ImageDir = "asdasd/asdasda/asdasd"
s.ctx.Request.Header.Set("Content-Type", cType)
test.WithUser(s.ctx, 5)
s.ctx.Params = gin.Params{{Key: "id", Value: "1"}}

s.a.UploadApplicationImage(s.ctx)

assert.Equal(s.T(), 500, s.recorder.Code)
}

func (s *ApplicationSuite) Test_UpdateApplicationNameAndDescription_expectSuccess() {
s.db.User(5).NewAppWithToken(2, "app-2")

Expand Down
36 changes: 21 additions & 15 deletions go.mod
Expand Up @@ -4,45 +4,51 @@ require (
github.com/fortytw2/leaktest v1.3.0
github.com/gin-contrib/cors v1.4.0
github.com/gin-contrib/gzip v0.0.6
github.com/gin-gonic/gin v1.8.1
github.com/go-playground/validator/v10 v10.11.0
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/validator/v10 v10.14.1
github.com/gorilla/websocket v1.5.0
github.com/gotify/configor v1.0.2
github.com/gotify/location v0.0.0-20170722210143-03bc4ad20437
github.com/gotify/plugin-api v1.0.0
github.com/h2non/filetype v1.1.3
github.com/jinzhu/gorm v1.9.16
github.com/robfig/cron v1.2.0
github.com/stretchr/testify v1.8.0
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.11.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
github.com/goccy/go-json v0.9.7 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lib/pq v1.10.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down

0 comments on commit a444182

Please sign in to comment.