mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 11:37:56 +08:00
fix: migrate to Go module v2 for proper semantic versioning (#3462)
* fix: migrate to Go module v2 for proper semantic versioning This change updates the module path from 'zotregistry.dev/zot' to 'zotregistry.dev/zot/v2' to comply with Go's semantic versioning rules. According to Go's module versioning requirements, major version v2+ must include the major version in the module path. The current module path 'zotregistry.dev/zot' only supports v0.x.x and v1.x.x versions, making existing v2.x.x tags (like v2.1.8) unusable. Changes: - Updated go.mod module path to zotregistry.dev/zot/v2 - Updated all internal import paths across 280+ Go source files - Updated configuration files (golangcilint.yaml, gqlgen.yml) - Updated README.md Go reference badge This fix enables proper use of existing v2.x.x Git tags and allows external packages to import zot v2+ versions without compatibility errors. Resolves: Go module import compatibility for v2+ versions Fixes: #3071 Signed-off-by: Luca Muscariello <muscariello@ieee.org> * fix: regenerate GraphQL files with updated v2 import paths The gqlgen tool needs to regenerate the GraphQL schema files after the module path change to use the new v2 imports. Signed-off-by: Luca Muscariello <muscariello@ieee.org> --------- Signed-off-by: Luca Muscariello <muscariello@ieee.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# zot
|
||||
[](https://github.com/project-zot/zot/actions/workflows/build.yaml) [](https://github.com/project-zot/zot/actions/workflows/test.yaml) [](https://github.com/project-zot/zot/actions/workflows/nightly.yaml) [](https://codecov.io/gh/project-zot/zot) [](https://github.com/project-zot/zot/actions/workflows/oci-conformance-action.yaml) [](https://github.com/project-zot/zot/actions/workflows/codeql-analysis.yml) [](https://bestpractices.coreinfrastructure.org/projects/5425) [](https://securityscorecards.dev/viewer/?uri=github.com/project-zot/zot) [](https://pkg.go.dev/zotregistry.dev/zot) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fproject-zot%2Fzot?ref=badge_shield)
|
||||
[](https://github.com/project-zot/zot/actions/workflows/build.yaml) [](https://github.com/project-zot/zot/actions/workflows/test.yaml) [](https://github.com/project-zot/zot/actions/workflows/nightly.yaml) [](https://codecov.io/gh/project-zot/zot) [](https://github.com/project-zot/zot/actions/workflows/oci-conformance-action.yaml) [](https://github.com/project-zot/zot/actions/workflows/codeql-analysis.yml) [](https://bestpractices.coreinfrastructure.org/projects/5425) [](https://securityscorecards.dev/viewer/?uri=github.com/project-zot/zot) [](https://pkg.go.dev/zotregistry.dev/zot/v2) [](https://app.fossa.com/projects/git%2Bgithub.com%2Fproject-zot%2Fzot?ref=badge_shield)
|
||||
|
||||
**zot**: a production-ready vendor-neutral OCI image registry - images stored in [OCI image format](https://github.com/opencontainers/image-spec), [distribution specification](https://github.com/opencontainers/distribution-spec) on-the-wire, that's it!
|
||||
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func makeHTTPGetRequest(url string, resultPtr interface{}, client *resty.Client) (http.Header, error) {
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ import (
|
||||
distspec "github.com/opencontainers/distribution-spec/specs-go"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
// "zb" - performance benchmark and stress.
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
)
|
||||
|
||||
func TestIntegration(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
||||
godigest "github.com/opencontainers/go-digest"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
cli "zotregistry.dev/zot/pkg/cli/client"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/pkg/cli/client"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
)
|
||||
|
||||
func TestIntegration(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
)
|
||||
|
||||
func TestIntegration(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"zotregistry.dev/zot/pkg/exporter/cli"
|
||||
"zotregistry.dev/zot/v2/pkg/exporter/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module zotregistry.dev/zot
|
||||
module zotregistry.dev/zot/v2
|
||||
|
||||
go 1.24.4
|
||||
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ formatters:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(zotregistry.dev/zot)
|
||||
- prefix(zotregistry.dev/zot/v2)
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
|
||||
+7
-7
@@ -29,13 +29,13 @@ import (
|
||||
"golang.org/x/oauth2"
|
||||
githubOAuth "golang.org/x/oauth2/github"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/pkg/api/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/v2/pkg/api/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+16
-16
@@ -22,22 +22,22 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
"zotregistry.dev/zot/pkg/scheduler"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/pkg/storage/local"
|
||||
authutils "zotregistry.dev/zot/pkg/test/auth"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/pkg/test/mocks"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/v2/pkg/meta/types"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
"zotregistry.dev/zot/v2/pkg/scheduler"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/storage/local"
|
||||
authutils "zotregistry.dev/zot/v2/pkg/test/auth"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/test/mocks"
|
||||
)
|
||||
|
||||
var ErrUnexpectedError = errors.New("error: unexpected error")
|
||||
|
||||
+6
-6
@@ -7,12 +7,12 @@ import (
|
||||
glob "github.com/bmatcuk/doublestar/v4"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
storageTypes "zotregistry.dev/zot/v2/pkg/storage/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
var bearerTokenMatch = regexp.MustCompile("(?i)bearer (.*)")
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
)
|
||||
|
||||
func TestBearerAuthorizer(t *testing.T) {
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
distspec "github.com/opencontainers/distribution-spec/specs-go"
|
||||
|
||||
"zotregistry.dev/zot/pkg/compat"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/compat"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
)
|
||||
|
||||
func TestMountConfig(t *testing.T) {
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/config/events"
|
||||
)
|
||||
|
||||
func TestConfig(t *testing.T) {
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/redis/go-redis/v9"
|
||||
"github.com/spf13/cast"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
var once sync.Once //nolint: gochecknoglobals // redis.SetLogger modifies an unprotected global variable
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
"github.com/redis/go-redis/v9"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
rediscfg "zotregistry.dev/zot/pkg/api/config/redis"
|
||||
"zotregistry.dev/zot/pkg/cli/server"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
rediscfg "zotregistry.dev/zot/v2/pkg/api/config/redis"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
func TestRedisLogger(t *testing.T) {
|
||||
|
||||
+13
-13
@@ -18,19 +18,19 @@ import (
|
||||
"github.com/gorilla/securecookie"
|
||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
ext "zotregistry.dev/zot/pkg/extensions"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/pkg/extensions/events"
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/meta"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
"zotregistry.dev/zot/pkg/scheduler"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
"zotregistry.dev/zot/pkg/storage/gc"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
ext "zotregistry.dev/zot/v2/pkg/extensions"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/events"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/meta"
|
||||
mTypes "zotregistry.dev/zot/v2/pkg/meta/types"
|
||||
"zotregistry.dev/zot/v2/pkg/scheduler"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
"zotregistry.dev/zot/v2/pkg/storage/gc"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+22
-22
@@ -50,28 +50,28 @@ import (
|
||||
"go.etcd.io/bbolt"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/pkg/api/errors"
|
||||
"zotregistry.dev/zot/pkg/cli/server"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/meta"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/pkg/storage/gc"
|
||||
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
||||
authutils "zotregistry.dev/zot/pkg/test/auth"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/pkg/test/inject"
|
||||
"zotregistry.dev/zot/pkg/test/mocks"
|
||||
ociutils "zotregistry.dev/zot/pkg/test/oci-utils"
|
||||
"zotregistry.dev/zot/pkg/test/signature"
|
||||
tskip "zotregistry.dev/zot/pkg/test/skip"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/v2/pkg/api/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/meta"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/storage/gc"
|
||||
storageTypes "zotregistry.dev/zot/v2/pkg/storage/types"
|
||||
authutils "zotregistry.dev/zot/v2/pkg/test/auth"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/test/inject"
|
||||
"zotregistry.dev/zot/v2/pkg/test/mocks"
|
||||
ociutils "zotregistry.dev/zot/v2/pkg/test/oci-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/test/signature"
|
||||
tskip "zotregistry.dev/zot/v2/pkg/test/skip"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -14,13 +14,13 @@ import (
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/rbcervilla/redisstore/v9"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
rediscfg "zotregistry.dev/zot/pkg/api/config/redis"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/scheduler"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
rediscfg "zotregistry.dev/zot/v2/pkg/api/config/redis"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/scheduler"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
)
|
||||
|
||||
const cookiesMaxAge = 7200 // 2h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package errors
|
||||
|
||||
import (
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
type Error struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
apiErr "zotregistry.dev/zot/pkg/api/errors"
|
||||
apiErr "zotregistry.dev/zot/v2/pkg/api/errors"
|
||||
)
|
||||
|
||||
func TestUnknownCodeError(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
// HTPasswd user auth store
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestHTPasswdWatcher(t *testing.T) {
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type LDAPClient struct {
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/cluster"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/cluster"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
// ClusterProxy wraps an http.HandlerFunc which requires proxying between zot instances to ensure
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
)
|
||||
|
||||
func TestGetLocalMemberClusterSocket(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type Stack struct {
|
||||
|
||||
+18
-18
@@ -33,24 +33,24 @@ import (
|
||||
"github.com/zitadel/oidc/v3/pkg/client/rp"
|
||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/pkg/api/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
gqlPlayground "zotregistry.dev/zot/pkg/debug/gqlplayground"
|
||||
"zotregistry.dev/zot/pkg/debug/pprof"
|
||||
debug "zotregistry.dev/zot/pkg/debug/swagger"
|
||||
ext "zotregistry.dev/zot/pkg/extensions"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/meta"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
zreg "zotregistry.dev/zot/pkg/regexp"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
storageCommon "zotregistry.dev/zot/pkg/storage/common"
|
||||
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
||||
"zotregistry.dev/zot/pkg/test/inject"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/v2/pkg/api/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
gqlPlayground "zotregistry.dev/zot/v2/pkg/debug/gqlplayground"
|
||||
"zotregistry.dev/zot/v2/pkg/debug/pprof"
|
||||
debug "zotregistry.dev/zot/v2/pkg/debug/swagger"
|
||||
ext "zotregistry.dev/zot/v2/pkg/extensions"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/meta"
|
||||
mTypes "zotregistry.dev/zot/v2/pkg/meta/types"
|
||||
zreg "zotregistry.dev/zot/v2/pkg/regexp"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
storageCommon "zotregistry.dev/zot/v2/pkg/storage/common"
|
||||
storageTypes "zotregistry.dev/zot/v2/pkg/storage/types"
|
||||
"zotregistry.dev/zot/v2/pkg/test/inject"
|
||||
)
|
||||
|
||||
type RouteHandler struct {
|
||||
|
||||
+10
-10
@@ -23,16 +23,16 @@ import (
|
||||
"github.com/zitadel/oidc/v3/pkg/oidc"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/pkg/test/mocks"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/v2/pkg/meta/types"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
storageTypes "zotregistry.dev/zot/v2/pkg/storage/types"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/test/mocks"
|
||||
)
|
||||
|
||||
const sessionStr = "session"
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
// DumpRuntimeParams dumps important runtime state such as file and socket limits.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
func getCurrentHandleCount() (uint32, error) {
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/didip/tollbooth/v7"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type statusWriter struct {
|
||||
|
||||
@@ -19,8 +19,8 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/sigstore/cosign/v2/pkg/oci/remote"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -16,12 +16,12 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
extConf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
extConf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
)
|
||||
|
||||
func TestConfigCmdBasics(t *testing.T) {
|
||||
|
||||
@@ -16,12 +16,12 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestSearchCVECmd(t *testing.T) {
|
||||
|
||||
@@ -22,23 +22,23 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
cveinfo "zotregistry.dev/zot/pkg/extensions/search/cve"
|
||||
cvemodel "zotregistry.dev/zot/pkg/extensions/search/cve/model"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/pkg/meta/types"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
"zotregistry.dev/zot/pkg/storage/local"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/pkg/test/mocks"
|
||||
ociutils "zotregistry.dev/zot/pkg/test/oci-utils"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
cveinfo "zotregistry.dev/zot/v2/pkg/extensions/search/cve"
|
||||
cvemodel "zotregistry.dev/zot/v2/pkg/extensions/search/cve/model"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
mTypes "zotregistry.dev/zot/v2/pkg/meta/types"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
"zotregistry.dev/zot/v2/pkg/storage/local"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/test/mocks"
|
||||
ociutils "zotregistry.dev/zot/v2/pkg/test/oci-utils"
|
||||
)
|
||||
|
||||
func TestNegativeServerResponse(t *testing.T) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
distext "github.com/opencontainers/distribution-spec/specs-go/v1/extensions"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
type field struct {
|
||||
|
||||
@@ -16,11 +16,11 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestElevatedPrivilegesTLSNewControllerPrivilegedCert(t *testing.T) {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "zotregistry.dev/zot/pkg/cli/client"
|
||||
gql_gen "zotregistry.dev/zot/pkg/extensions/search/gql_generated"
|
||||
. "zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
gql_gen "zotregistry.dev/zot/v2/pkg/extensions/search/gql_generated"
|
||||
)
|
||||
|
||||
func TestSortFlagsMapping(t *testing.T) {
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestGQLQueries(t *testing.T) {
|
||||
|
||||
@@ -22,14 +22,14 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
stypes "zotregistry.dev/zot/pkg/storage/types"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
stypes "zotregistry.dev/zot/v2/pkg/storage/types"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
)
|
||||
|
||||
func TestSearchImageCmd(t *testing.T) {
|
||||
|
||||
@@ -24,15 +24,15 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
zlog "zotregistry.dev/zot/pkg/log"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
ociutils "zotregistry.dev/zot/pkg/test/oci-utils"
|
||||
"zotregistry.dev/zot/pkg/test/signature"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
zlog "zotregistry.dev/zot/v2/pkg/log"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
ociutils "zotregistry.dev/zot/v2/pkg/test/oci-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/test/signature"
|
||||
)
|
||||
|
||||
//nolint:dupl
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func NewImageListCommand(searchService SearchService) *cobra.Command {
|
||||
|
||||
@@ -13,11 +13,11 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
)
|
||||
|
||||
func TestReposCommand(t *testing.T) {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
distspec "github.com/opencontainers/distribution-spec/specs-go"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
// "zli" - client-side cli.
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
)
|
||||
|
||||
func TestCliUsage(t *testing.T) {
|
||||
|
||||
@@ -13,11 +13,11 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
)
|
||||
|
||||
func TestSearchCommandGQL(t *testing.T) {
|
||||
|
||||
@@ -15,13 +15,13 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
. "zotregistry.dev/zot/pkg/test/image-utils"
|
||||
ociutils "zotregistry.dev/zot/pkg/test/oci-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/cli/client"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
ociutils "zotregistry.dev/zot/v2/pkg/test/oci-utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
const CveDBRetryInterval = 3
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func TestSearchAllImages(t *testing.T) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func NewSearchSubjectCommand(searchService SearchService) *cobra.Command {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -14,12 +14,12 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestServerStatusCommand(t *testing.T) {
|
||||
|
||||
@@ -21,9 +21,9 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
"github.com/olekukonko/tablewriter/tw"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func getDefaultSearchConf(baseURL string) SearchConfig {
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type HotReloader struct {
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestConfigReloader(t *testing.T) {
|
||||
|
||||
@@ -13,10 +13,10 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
. "zotregistry.dev/zot/pkg/test/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
const readLogFileTimeout = 5 * time.Second
|
||||
|
||||
+10
-10
@@ -20,16 +20,16 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
extconf "zotregistry.dev/zot/pkg/extensions/config"
|
||||
eventsconf "zotregistry.dev/zot/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
zlog "zotregistry.dev/zot/pkg/log"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
extconf "zotregistry.dev/zot/v2/pkg/extensions/config"
|
||||
eventsconf "zotregistry.dev/zot/v2/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
zlog "zotregistry.dev/zot/v2/pkg/log"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
)
|
||||
|
||||
// metadataConfig reports metadata after parsing, which we use to track
|
||||
|
||||
@@ -11,12 +11,12 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
storageConstants "zotregistry.dev/zot/pkg/storage/constants"
|
||||
. "zotregistry.dev/zot/pkg/test/common"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
storageConstants "zotregistry.dev/zot/v2/pkg/storage/constants"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestServerUsage(t *testing.T) {
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/pkg/cli/server"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
cli "zotregistry.dev/zot/v2/pkg/cli/server"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
syncconf "zotregistry.dev/zot/pkg/extensions/config/sync"
|
||||
zlog "zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
syncconf "zotregistry.dev/zot/v2/pkg/extensions/config/sync"
|
||||
zlog "zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
func validateRetentionSyncOverlaps(config *config.Config, content syncconf.Content, urls []string, log zlog.Logger) {
|
||||
|
||||
@@ -6,10 +6,10 @@ package server
|
||||
import (
|
||||
"path"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
syncconf "zotregistry.dev/zot/pkg/extensions/config/sync"
|
||||
"zotregistry.dev/zot/pkg/extensions/sync"
|
||||
zlog "zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
syncconf "zotregistry.dev/zot/v2/pkg/extensions/config/sync"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/sync"
|
||||
zlog "zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
func validateRetentionSyncOverlaps(config *config.Config, content syncconf.Content, urls []string, log zlog.Logger) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/cluster"
|
||||
"zotregistry.dev/zot/v2/pkg/cluster"
|
||||
)
|
||||
|
||||
func TestComputeTargetMember(t *testing.T) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
notreg "github.com/notaryproject/notation-go/registry"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func TestCommon(t *testing.T) {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
var errNotReady = errors.New("not ready yet")
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestHTTPClient(t *testing.T) {
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
"github.com/gorilla/mux"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/pkg/api/errors"
|
||||
reqCtx "zotregistry.dev/zot/pkg/requestcontext"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
apiErr "zotregistry.dev/zot/v2/pkg/api/errors"
|
||||
reqCtx "zotregistry.dev/zot/v2/pkg/requestcontext"
|
||||
)
|
||||
|
||||
func AllowedMethods(methods ...string) []string {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/opencontainers/go-digest"
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
func GetImageDirAndTag(imageName string) (string, string) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/common"
|
||||
)
|
||||
|
||||
func TestOCI(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
docker "github.com/distribution/distribution/v3/manifest/schema2"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
|
||||
"zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
// MediaCompatibility determines non-OCI media-compatilibility.
|
||||
|
||||
@@ -19,11 +19,11 @@ import (
|
||||
"github.com/smartystreets/goconvey/convey/reporting"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
"zotregistry.dev/zot/pkg/compliance"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/pkg/test/image-utils"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/compliance"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/test/image-utils"
|
||||
)
|
||||
|
||||
func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/compliance"
|
||||
"zotregistry.dev/zot/pkg/compliance/v1_0_0"
|
||||
. "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/compliance"
|
||||
"zotregistry.dev/zot/v2/pkg/compliance/v1_0_0"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
//nolint:gochecknoglobals
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
debugCst "zotregistry.dev/zot/pkg/debug/constants"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
debugCst "zotregistry.dev/zot/v2/pkg/debug/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
)
|
||||
|
||||
//go:embed index.html.tmpl
|
||||
|
||||
@@ -6,8 +6,8 @@ package debug
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/pkg/storage"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/storage"
|
||||
)
|
||||
|
||||
// SetupGQLPlaygroundRoutes ...
|
||||
|
||||
@@ -17,11 +17,11 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
registryConst "zotregistry.dev/zot/pkg/api/constants"
|
||||
zcommon "zotregistry.dev/zot/pkg/common"
|
||||
"zotregistry.dev/zot/pkg/debug/constants"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
registryConst "zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
zcommon "zotregistry.dev/zot/v2/pkg/common"
|
||||
"zotregistry.dev/zot/v2/pkg/debug/constants"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type profileEntry struct {
|
||||
|
||||
@@ -6,8 +6,8 @@ package pprof
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log" //nolint:goimports
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log" //nolint:goimports
|
||||
)
|
||||
|
||||
func SetupPprofRoutes(conf *config.Config, router *mux.Router, authFunc mux.MiddlewareFunc,
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api"
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/api/constants"
|
||||
debugConstants "zotregistry.dev/zot/pkg/debug/constants"
|
||||
test "zotregistry.dev/zot/pkg/test/common"
|
||||
"zotregistry.dev/zot/v2/pkg/api"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/api/constants"
|
||||
debugConstants "zotregistry.dev/zot/v2/pkg/debug/constants"
|
||||
test "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func TestProfilingAuthz(t *testing.T) {
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
"github.com/gorilla/mux"
|
||||
httpSwagger "github.com/swaggo/http-swagger"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log" //nolint:goimports
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log" //nolint:goimports
|
||||
// as required by swaggo.
|
||||
_ "zotregistry.dev/zot/swagger"
|
||||
_ "zotregistry.dev/zot/v2/swagger"
|
||||
)
|
||||
|
||||
func SetupSwaggerRoutes(conf *config.Config, router *mux.Router, authFunc mux.MiddlewareFunc,
|
||||
|
||||
@@ -10,8 +10,8 @@ package debug
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
func SetupSwaggerRoutes(conf *config.Config, router *mux.Router, authFunc mux.MiddlewareFunc,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
|
||||
@@ -22,12 +22,12 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"gopkg.in/resty.v1"
|
||||
|
||||
zotapi "zotregistry.dev/zot/pkg/api"
|
||||
zotcfg "zotregistry.dev/zot/pkg/api/config"
|
||||
"zotregistry.dev/zot/pkg/exporter/api"
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/pkg/scheduler"
|
||||
. "zotregistry.dev/zot/pkg/test/common"
|
||||
zotapi "zotregistry.dev/zot/v2/pkg/api"
|
||||
zotcfg "zotregistry.dev/zot/v2/pkg/api/config"
|
||||
"zotregistry.dev/zot/v2/pkg/exporter/api"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/v2/pkg/scheduler"
|
||||
. "zotregistry.dev/zot/v2/pkg/test/common"
|
||||
)
|
||||
|
||||
func getRandomLatencyN(maxLatency int64) time.Duration {
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/monitoring"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
"zotregistry.dev/zot/pkg/exporter/api"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
"zotregistry.dev/zot/v2/pkg/exporter/api"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
// metadataConfig reports metadata after parsing, which we use to track
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"zotregistry.dev/zot/pkg/exporter/cli"
|
||||
"zotregistry.dev/zot/v2/pkg/exporter/cli"
|
||||
)
|
||||
|
||||
func TestExporterCli(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package config
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zotregistry.dev/zot/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/pkg/extensions/config/sync"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/v2/pkg/extensions/config/sync"
|
||||
)
|
||||
|
||||
// BaseConfig has params applicable to all extensions.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
// SinkConfigDecoderHook provides a mapstructure hook for decoding SinkConfig interfaces.
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
cloudevents "github.com/cloudevents/sdk-go/v2"
|
||||
"github.com/google/uuid"
|
||||
|
||||
zerr "zotregistry.dev/zot/errors"
|
||||
zerr "zotregistry.dev/zot/v2/errors"
|
||||
)
|
||||
|
||||
type eventBuilder struct {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
|
||||
cloudevents "github.com/cloudevents/sdk-go/v2"
|
||||
|
||||
eventsconf "zotregistry.dev/zot/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/pkg/log"
|
||||
eventsconf "zotregistry.dev/zot/v2/pkg/extensions/config/events"
|
||||
"zotregistry.dev/zot/v2/pkg/log"
|
||||
)
|
||||
|
||||
type eventRecorder struct {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user