aboutsummaryrefslogtreecommitdiff
path: root/mediaapi/routing/upload_test.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-05-02 10:47:16 +0200
committerGitHub <noreply@github.com>2022-05-02 10:47:16 +0200
commit979a551f1e2aeb9f3417df5e52a7279230b7a3ba (patch)
tree69815c9823d0c58ceec1cf3dbbb56a1ce484660e /mediaapi/routing/upload_test.go
parentbfa344e83191c49bdc9917ab7a8ec31b93c202e9 (diff)
Return `null` if MaxFileSizeBytes is 0 (#2409)
* Return "null" if MaxFileSizeBytes is 0 * Add comment and nil check (better save than sorry) * Simplify config
Diffstat (limited to 'mediaapi/routing/upload_test.go')
-rw-r--r--mediaapi/routing/upload_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/mediaapi/routing/upload_test.go b/mediaapi/routing/upload_test.go
index b2c2f5a4..e04c010f 100644
--- a/mediaapi/routing/upload_test.go
+++ b/mediaapi/routing/upload_test.go
@@ -36,12 +36,11 @@ func Test_uploadRequest_doUpload(t *testing.T) {
}
maxSize := config.FileSizeBytes(8)
- unlimitedSize := config.FileSizeBytes(0)
logger := log.New().WithField("mediaapi", "test")
testdataPath := filepath.Join(wd, "./testdata")
cfg := &config.MediaAPI{
- MaxFileSizeBytes: &maxSize,
+ MaxFileSizeBytes: maxSize,
BasePath: config.Path(testdataPath),
AbsBasePath: config.Path(testdataPath),
DynamicThumbnails: false,
@@ -124,7 +123,7 @@ func Test_uploadRequest_doUpload(t *testing.T) {
ctx: context.Background(),
reqReader: strings.NewReader("test test test"),
cfg: &config.MediaAPI{
- MaxFileSizeBytes: &unlimitedSize,
+ MaxFileSizeBytes: config.FileSizeBytes(0),
BasePath: config.Path(testdataPath),
AbsBasePath: config.Path(testdataPath),
DynamicThumbnails: false,