mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-23 21:10:33 +00:00
b5c6b80790
Backport #39028 by @bircni Bound checksum uploads to the maximum usable digest length before buffering their content. Co-authored-by: bircni <bircni@icloud.com>
16 lines
330 B
Go
16 lines
330 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package maven
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestChecksumSizeAllowed(t *testing.T) {
|
|
assert.True(t, isChecksumSizeAllowed(maxChecksumSize))
|
|
assert.False(t, isChecksumSizeAllowed(maxChecksumSize+1))
|
|
}
|