mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
c6289ec5ba
* 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>
19 lines
371 B
Go
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)
|
|
}
|