Files
zot/pkg/api/constants/consts_test.go
Andrei Aaron c6289ec5ba fix: address code review comments (#3942)
* fix: address code review comments in https://github.com/project-zot/zot/pull/3885#pullrequestreview-4045836197

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* fix: data race in GetPort()

See https://github.com/project-zot/zot/actions/runs/24045271222/job/70126983674?pr=3942

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* fix(test): reuse ReadLogFileAndSearchString for auto-port log; throttle poll loop

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-04-08 00:10:54 +03:00

19 lines
371 B
Go

package constants_test
import (
"testing"
"github.com/stretchr/testify/assert"
"zotregistry.dev/zot/v2/pkg/api/constants"
zreg "zotregistry.dev/zot/v2/pkg/regexp"
)
func TestMaxManifestDigestQueryTagsDerived(t *testing.T) {
t.Parallel()
want := (8192 - 2048) / (len("tag=") + zreg.TagMaxLen + 1)
assert.Equal(t, want, constants.MaxManifestDigestQueryTags)
}