Files
Gitea/routers/api/packages/maven/maven_test.go
T
bircni fa4c0b1cf6 fix(packages): limit Maven checksum uploads (#39028)
Bound checksum uploads to the maximum usable digest length before
buffering their content.
2026-08-21 23:41:12 +00:00

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))
}