diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96b4673328..8eb2989c8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: matrix: go-version: [1.21.x, 1.x] platform: [ubuntu-latest] - module: [artemis, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, elasticsearch, gcloud, inbucket, k3s, k6, kafka, localstack, mariadb, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, surrealdb, vault, weaviate] + module: [artemis, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, elasticsearch, gcloud, inbucket, k3s, k6, kafka, localstack, mariadb, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, registry, surrealdb, vault, weaviate] uses: ./.github/workflows/ci-test-go.yml with: go-version: ${{ matrix.go-version }} diff --git a/.vscode/.testcontainers-go.code-workspace b/.vscode/.testcontainers-go.code-workspace index fa5a2e90e6..fc27db598a 100644 --- a/.vscode/.testcontainers-go.code-workspace +++ b/.vscode/.testcontainers-go.code-workspace @@ -149,6 +149,10 @@ "name": "module / redpanda", "path": "../modules/redpanda" }, + { + "name": "module / registry", + "path": "../modules/registry" + }, { "name": "module / surrealdb", "path": "../modules/surrealdb" diff --git a/docs/modules/registry.md b/docs/modules/registry.md new file mode 100644 index 0000000000..18e9e14fd8 --- /dev/null +++ b/docs/modules/registry.md @@ -0,0 +1,113 @@ +# Registry + +Not available until the next release of testcontainers-go :material-tag: main + +## Introduction + +The Testcontainers module for Registry. + +## Adding this module to your project dependencies + +Please run the following command to add the Registry module to your Go dependencies: + +``` +go get github.com/testcontainers/testcontainers-go/modules/registry +``` + +## Usage example + + +[Creating a Registry container](../../modules/registry/examples_test.go) inside_block:runRegistryContainer + + +## Module reference + +The Registry module exposes one entrypoint function to create the Registry container, and this function receives two parameters: + +```golang +func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*RegistryContainer, error) +``` + +- `context.Context`, the Go context. +- `testcontainers.ContainerCustomizer`, a variadic argument for passing options. + +### Container Options + +When starting the Registry container, you can pass options in a variadic way to configure it. + +#### Image + +If you need to set a different Registry Docker image, you can use `testcontainers.WithImage` with a valid Docker image +for Registry. E.g. `testcontainers.WithImage("registry:2.8.3")`. + +{% include "../features/common_functional_options.md" %} + +#### With Authentication + +It's possible to enable authentication for the Registry container. By default, it is disabled, but you can enable it in two ways: + +- You can use `WithHtpasswd` to enable authentication with a string representing the contents of a `htpasswd` file. +A temporary file will be created with the contents of the string and copied to the container. +- You can use `WithHtpasswdFile` to copy a `htpasswd` file from your local filesystem to the container. + +In both cases, the `htpasswd` file will be copied into the `/auth` directory inside the container. + + +[Htpasswd string](../../modules/registry/registry_test.go) inside_block:htpasswdString +[Htpasswd file](../../modules/registry/examples_test.go) inside_block:htpasswdFile + + +#### WithData + +In the case you want to initialise the Registry with your own images, you can use `WithData` to copy a directory from your local filesystem to the container. +The directory will be copied into the `/data` directory inside the container. +The format of the directory should be the same as the one used by the Registry to store images. +Otherwise, the Registry will start but you won't be able to read any images from it. + + +[Including data](../../modules/registry/examples_test.go) inside_block:htpasswdFile + + +### Container Methods + +The Registry container exposes the following methods: + +#### Address + +This method returns the HTTP address string to connect to the Distribution Registry, so that you can use to connect to the Registry. +E.g. `http://localhost:32878/v2/_catalog`. + + +[HTTP Address](../../modules/registry/registry_test.go) inside_block:httpAddress + + +#### ImageExists + +The `ImageExists` method allows to check if an image exists in the Registry. It receives the Go context and the image reference as parameters. + +!!! info + The image reference should be in the format `my-registry:port/image:tag` in order to be pushed to the Registry. + +#### PushImage + +The `PushImage` method allows to push an image to the Registry. It receives the Go context and the image reference as parameters. + +!!! info + The image reference should be in the format `my-registry:port/image:tag` in order to be pushed to the Registry. + + +[Pushing images to the registry](../../modules/registry/examples_test.go) inside_block:pushingImage + + +If the push operation is successful, the method will internally wait for the image to be available in the Registry, querying the Registry API, returning an error in case of any failure (e.g. pushing or waiting for the image). + +#### DeleteImage + +The `DeleteImage` method allows to delete an image from the Registry. It receives the Go context and the image reference as parameters. + +!!! info + The image reference should be in the format `image:tag` in order to be deleted from the Registry. + + +[Deleting images from the registry](../../modules/registry/examples_test.go) inside_block:deletingImage + diff --git a/mkdocs.yml b/mkdocs.yml index 53d00fad03..f8f282ee4a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -96,6 +96,7 @@ nav: - modules/rabbitmq.md - modules/redis.md - modules/redpanda.md + - modules/registry.md - modules/surrealdb.md - modules/vault.md - modules/weaviate.md diff --git a/modules/registry/Makefile b/modules/registry/Makefile new file mode 100644 index 0000000000..b4746b64d8 --- /dev/null +++ b/modules/registry/Makefile @@ -0,0 +1,5 @@ +include ../../commons-test.mk + +.PHONY: test +test: + $(MAKE) test-registry diff --git a/modules/registry/examples_test.go b/modules/registry/examples_test.go new file mode 100644 index 0000000000..efb0aff126 --- /dev/null +++ b/modules/registry/examples_test.go @@ -0,0 +1,246 @@ +package registry_test + +import ( + "context" + "fmt" + "log" + "os" + "path/filepath" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/registry" + "github.com/testcontainers/testcontainers-go/wait" +) + +func ExampleRunContainer() { + // runRegistryContainer { + registryContainer, err := registry.RunContainer(context.Background(), testcontainers.WithImage("registry:2.8.3")) + if err != nil { + log.Fatalf("failed to start container: %s", err) + } + + // Clean up the container + defer func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + // } + + state, err := registryContainer.State(context.Background()) + if err != nil { + log.Fatalf("failed to get container state: %s", err) // nolint:gocritic + } + + fmt.Println(state.Running) + + // Output: + // true +} + +func ExampleRunContainer_withAuthentication() { + // htpasswdFile { + registryContainer, err := registry.RunContainer( + context.Background(), + testcontainers.WithImage("registry:2.8.3"), + registry.WithHtpasswdFile(filepath.Join("testdata", "auth", "htpasswd")), + registry.WithData(filepath.Join("testdata", "data")), + ) + // } + if err != nil { + log.Fatalf("failed to start container: %s", err) + } + defer func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + + registryPort, err := registryContainer.MappedPort(context.Background(), "5000/tcp") + if err != nil { + log.Fatalf("failed to get mapped port: %s", err) // nolint:gocritic + } + strPort := registryPort.Port() + + previousAuthConfig := os.Getenv("DOCKER_AUTH_CONFIG") + + // make sure the Docker Auth credentials are set + // using the same as in the Docker Registry + // testuser:testpassword + os.Setenv("DOCKER_AUTH_CONFIG", `{ + "auths": { + "localhost:`+strPort+`": { "username": "testuser", "password": "testpassword", "auth": "dGVzdHVzZXI6dGVzdHBhc3N3b3Jk" } + }, + "credsStore": "desktop" + }`) + defer func() { + // reset the original state after the example. + os.Unsetenv("DOCKER_AUTH_CONFIG") + os.Setenv("DOCKER_AUTH_CONFIG", previousAuthConfig) + }() + + // build a custom redis image from the private registry, + // using RegistryName of the container as the registry. + + redisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "redis"), + BuildArgs: map[string]*string{ + "REGISTRY_PORT": &strPort, + }, + PrintBuildLog: true, + }, + AlwaysPullImage: true, // make sure the authentication takes place + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err != nil { + log.Fatalf("failed to start container: %s", err) // nolint:gocritic + } + defer func() { + if err := redisC.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + + state, err := redisC.State(context.Background()) + if err != nil { + log.Fatalf("failed to get redis container state: %s", err) // nolint:gocritic + } + + fmt.Println(state.Running) + + // Output: + // true +} + +func ExampleRunContainer_pushImage() { + registryContainer, err := registry.RunContainer( + context.Background(), + testcontainers.WithImage("registry:2.8.3"), + registry.WithHtpasswdFile(filepath.Join("testdata", "auth", "htpasswd")), + registry.WithData(filepath.Join("testdata", "data")), + ) + if err != nil { + log.Fatalf("failed to start container: %s", err) + } + defer func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + + registryPort, err := registryContainer.MappedPort(context.Background(), "5000/tcp") + if err != nil { + log.Fatalf("failed to get mapped port: %s", err) // nolint:gocritic + } + strPort := registryPort.Port() + + previousAuthConfig := os.Getenv("DOCKER_AUTH_CONFIG") + + // make sure the Docker Auth credentials are set + // using the same as in the Docker Registry + // testuser:testpassword + // Besides, we are also setting the authentication + // for both the registry and localhost to make sure + // the image is pushed to the private registry. + os.Setenv("DOCKER_AUTH_CONFIG", `{ + "auths": { + "localhost:`+strPort+`": { "username": "testuser", "password": "testpassword", "auth": "dGVzdHVzZXI6dGVzdHBhc3N3b3Jk" }, + "`+registryContainer.RegistryName+`": { "username": "testuser", "password": "testpassword", "auth": "dGVzdHVzZXI6dGVzdHBhc3N3b3Jk" } + }, + "credsStore": "desktop" + }`) + defer func() { + // reset the original state after the example. + os.Unsetenv("DOCKER_AUTH_CONFIG") + os.Setenv("DOCKER_AUTH_CONFIG", previousAuthConfig) + }() + + // build a custom redis image from the private registry, + // using RegistryName of the container as the registry. + // We are agoing to build the image with a fixed tag + // that matches the private registry, and we are going to + // push it again to the registry after the build. + + repo := registryContainer.RegistryName + "/customredis" + tag := "v1.2.3" + + redisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "redis"), + BuildArgs: map[string]*string{ + "REGISTRY_PORT": &strPort, + }, + Repo: repo, + Tag: tag, + PrintBuildLog: true, + }, + AlwaysPullImage: true, // make sure the authentication takes place + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err != nil { + log.Fatalf("failed to start container: %s", err) // nolint:gocritic + } + defer func() { + if err := redisC.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + + // pushingImage { + // repo is localhost:32878/customredis + // tag is v1.2.3 + err = registryContainer.PushImage(context.Background(), fmt.Sprintf("%s:%s", repo, tag)) + if err != nil { + log.Fatalf("failed to push image: %s", err) // nolint:gocritic + } + // } + + newImage := fmt.Sprintf("%s:%s", repo, tag) + + // now run a container from the new image + // But first remove the local image to avoid using the local one. + + // deletingImage { + // newImage is customredis:v1.2.3 + err = registryContainer.DeleteImage(context.Background(), newImage) + if err != nil { + log.Fatalf("failed to delete image: %s", err) // nolint:gocritic + } + // } + + newRedisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: newImage, + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err != nil { + log.Fatalf("failed to start container from %s: %s", newImage, err) // nolint:gocritic + } + defer func() { + if err := newRedisC.Terminate(context.Background()); err != nil { + log.Fatalf("failed to terminate container: %s", err) // nolint:gocritic + } + }() + + state, err := newRedisC.State(context.Background()) + if err != nil { + log.Fatalf("failed to get redis container state from %s: %s", newImage, err) // nolint:gocritic + } + + fmt.Println(state.Running) + + // Output: + // true +} diff --git a/modules/registry/go.mod b/modules/registry/go.mod new file mode 100644 index 0000000000..dd742e1169 --- /dev/null +++ b/modules/registry/go.mod @@ -0,0 +1,60 @@ +module github.com/testcontainers/testcontainers-go/modules/registry + +go 1.21 + +require ( + github.com/docker/docker v25.0.5+incompatible + github.com/testcontainers/testcontainers-go v0.29.1 +) + +require ( + dario.cat/mergo v1.0.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/containerd/containerd v1.7.12 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/cpuguy83/dockercfg v0.3.1 // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/klauspost/compress v1.16.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/grpc v1.58.3 // indirect + google.golang.org/protobuf v1.33.0 // indirect +) + +replace github.com/testcontainers/testcontainers-go => ../.. diff --git a/modules/registry/go.sum b/modules/registry/go.sum new file mode 100644 index 0000000000..d5d44b3380 --- /dev/null +++ b/modules/registry/go.sum @@ -0,0 +1,188 @@ +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= +github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= diff --git a/modules/registry/options.go b/modules/registry/options.go new file mode 100644 index 0000000000..a3304d1ffa --- /dev/null +++ b/modules/registry/options.go @@ -0,0 +1,74 @@ +package registry + +import ( + "os" + "path/filepath" + + "github.com/testcontainers/testcontainers-go" +) + +const ( + containerDataPath string = "/data" + containerHtpasswdPath string = "/auth/htpasswd" +) + +// WithData is a custom option to set the data directory for the registry, +// which is used to store the images. It will copy the data from the host to +// the container in the /data path. The container will be configured to use +// this path as the root directory for the registry, thanks to the +// REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY environment variable. +// The dataPath must have the same structure as the registry data directory. +func WithData(dataPath string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + req.Files = append(req.Files, testcontainers.ContainerFile{ + HostFilePath: dataPath, + ContainerFilePath: containerDataPath, + }) + + req.Env["REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY"] = containerDataPath + } +} + +// WithHtpasswd is a custom option to set the htpasswd credentials for the registry +// It will create a temporary file with the credentials and copy it to the container +// in the /auth/htpasswd path. The container will be configured to use this file as +// the htpasswd file, thanks to the REGISTRY_AUTH_HTPASSWD_PATH environment variable. +func WithHtpasswd(credentials string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + tmpFile, err := os.Create(filepath.Join(os.TempDir(), "htpasswd")) + if err != nil { + tmpFile, err = os.Create(".") + if err != nil { + // cannot create the file in the temp dir or in the current dir + panic(err) + } + } + defer tmpFile.Close() + + _, err = tmpFile.WriteString(credentials) + if err != nil { + panic(err) + } + + WithHtpasswdFile(tmpFile.Name())(req) + } +} + +// WithHtpasswdFile is a custom option to set the htpasswd file for the registry +// It will copy a file with the credentials in the /auth/htpasswd path. +// The container will be configured to use this file as the htpasswd file, +// thanks to the REGISTRY_AUTH_HTPASSWD_PATH environment variable. +func WithHtpasswdFile(htpasswdPath string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + req.Files = append(req.Files, testcontainers.ContainerFile{ + HostFilePath: htpasswdPath, + ContainerFilePath: containerHtpasswdPath, + FileMode: 0o644, + }) + + req.Env["REGISTRY_AUTH"] = "htpasswd" + req.Env["REGISTRY_AUTH_HTPASSWD_REALM"] = "Registry" + req.Env["REGISTRY_AUTH_HTPASSWD_PATH"] = containerHtpasswdPath + req.Env["REGISTRY_AUTH_HTPASSWD_PATH"] = containerHtpasswdPath + } +} diff --git a/modules/registry/registry.go b/modules/registry/registry.go new file mode 100644 index 0000000000..7c77ac594e --- /dev/null +++ b/modules/registry/registry.go @@ -0,0 +1,198 @@ +package registry + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "net/http" + "strings" + "time" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/registry" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" +) + +// RegistryContainer represents the Registry container type used in the module +type RegistryContainer struct { + testcontainers.Container + RegistryName string +} + +// Address returns the address of the Registry container, using the HTTP protocol +func (c *RegistryContainer) Address(ctx context.Context) (string, error) { + port, err := c.MappedPort(ctx, "5000") + if err != nil { + return "", err + } + + ipAddress, err := c.Host(ctx) + if err != nil { + return "", err + } + + return fmt.Sprintf("http://%s:%s", ipAddress, port.Port()), nil +} + +// getEndpointWithAuth returns the HTTP endpoint of the Registry container, along with the image auth +// for the image referece. +// E.g. imageRef = "localhost:5000/alpine:latest" +func getEndpointWithAuth(ctx context.Context, imageRef string) (string, string, registry.AuthConfig, error) { + registry, imageAuth, err := testcontainers.DockerImageAuth(ctx, imageRef) + if err != nil { + return "", "", imageAuth, fmt.Errorf("failed to get image auth: %w", err) + } + + imageWithoutRegistry := strings.TrimPrefix(imageRef, registry+"/") + image := strings.Split(imageWithoutRegistry, ":")[0] + tag := strings.Split(imageWithoutRegistry, ":")[1] + + return fmt.Sprintf("/v2/%s/manifests/%s", image, tag), image, imageAuth, nil +} + +// DeleteImage deletes an image reference from the Registry container. +// It will use the HTTP endpoint of the Registry container to delete it, +// doing a HEAD request to get the image digest and then a DELETE request +// to actually delete the image. +// E.g. imageRef = "localhost:5000/alpine:latest" +func (c *RegistryContainer) DeleteImage(ctx context.Context, imageRef string) error { + endpoint, image, imageAuth, err := getEndpointWithAuth(ctx, imageRef) + if err != nil { + return fmt.Errorf("failed to get image auth: %w", err) + } + + var digest string + err = wait.ForHTTP(endpoint). + WithMethod(http.MethodHead). + WithBasicAuth(imageAuth.Username, imageAuth.Password). + WithHeaders(map[string]string{"Accept": "application/vnd.docker.distribution.manifest.v2+json"}). + WithStatusCodeMatcher(func(statusCode int) bool { + return statusCode == http.StatusOK + }). + WithResponseHeadersMatcher(func(headers http.Header) bool { + contentDigest := headers.Get("Docker-Content-Digest") + if contentDigest != "" { + digest = contentDigest + return true + } + + return false + }). + WaitUntilReady(ctx, c) + + if err != nil { + return fmt.Errorf("failed to get image digest: %w", err) + } + + deleteEndpoint := fmt.Sprintf("/v2/%s/manifests/%s", image, digest) + return wait.ForHTTP(deleteEndpoint). + WithMethod(http.MethodDelete). + WithBasicAuth(imageAuth.Username, imageAuth.Password). + WithStatusCodeMatcher(func(statusCode int) bool { + return statusCode == http.StatusAccepted + }). + WaitUntilReady(ctx, c) +} + +// ImageExists checks if an image exists in the Registry container. It will use the v2 HTTP endpoint +// of the Registry container to check if the image reference exists. +// E.g. imageRef = "localhost:5000/alpine:latest" +func (c *RegistryContainer) ImageExists(ctx context.Context, imageRef string) error { + endpoint, _, imageAuth, err := getEndpointWithAuth(ctx, imageRef) + if err != nil { + return fmt.Errorf("failed to get image auth: %w", err) + } + + return wait.ForHTTP(endpoint). + WithMethod(http.MethodHead). + WithBasicAuth(imageAuth.Username, imageAuth.Password). + WithHeaders(map[string]string{"Accept": "application/vnd.docker.distribution.manifest.v2+json"}). + WithForcedIPv4LocalHost(). + WithStatusCodeMatcher(func(statusCode int) bool { + return statusCode == http.StatusOK + }). + WithResponseHeadersMatcher(func(headers http.Header) bool { + return headers.Get("Docker-Content-Digest") != "" + }). + WaitUntilReady(ctx, c) +} + +// PushImage pushes an image to the Registry container. It will use the internally stored RegistryName +// to push the image to the container, and it will finally wait for the image to be pushed. +func (c *RegistryContainer) PushImage(ctx context.Context, ref string) error { + dockerProvider, err := testcontainers.NewDockerProvider() + if err != nil { + return fmt.Errorf("failed to create Docker provider: %w", err) + } + defer dockerProvider.Close() + + dockerCli := dockerProvider.Client() + + _, imageAuth, err := testcontainers.DockerImageAuth(ctx, ref) + if err != nil { + return fmt.Errorf("failed to get image auth: %w", err) + } + + pushOpts := types.ImagePushOptions{ + All: true, + } + + // see https://github.com/docker/docs/blob/e8e1204f914767128814dca0ea008644709c117f/engine/api/sdk/examples.md?plain=1#L649-L657 + encodedJSON, err := json.Marshal(imageAuth) + if err != nil { + return fmt.Errorf("failed to encode image auth: %w", err) + } else { + pushOpts.RegistryAuth = base64.URLEncoding.EncodeToString(encodedJSON) + } + + _, err = dockerCli.ImagePush(ctx, ref, pushOpts) + if err != nil { + return fmt.Errorf("failed to push image %s: %w", ref, err) + } + + return c.ImageExists(ctx, ref) +} + +// RunContainer creates an instance of the Registry container type +func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*RegistryContainer, error) { + req := testcontainers.ContainerRequest{ + Image: "registry:2.8.3", + ExposedPorts: []string{"5000/tcp"}, + Env: map[string]string{ + // convenient for testing + "REGISTRY_STORAGE_DELETE_ENABLED": "true", + }, + WaitingFor: wait.ForAll( + wait.ForExposedPort(), + wait.ForLog("listening on [::]:5000").WithStartupTimeout(10*time.Second), + ), + } + + genericContainerReq := testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + } + + for _, opt := range opts { + opt.Customize(&genericContainerReq) + } + + container, err := testcontainers.GenericContainer(ctx, genericContainerReq) + if err != nil { + return nil, err + } + + c := &RegistryContainer{Container: container} + + address, err := c.Address(ctx) + if err != nil { + return c, err + } + + c.RegistryName = strings.TrimPrefix(address, "http://") + + return c, nil +} diff --git a/modules/registry/registry_test.go b/modules/registry/registry_test.go new file mode 100644 index 0000000000..62c1ebf6e6 --- /dev/null +++ b/modules/registry/registry_test.go @@ -0,0 +1,328 @@ +package registry_test + +import ( + "context" + "net/http" + "path/filepath" + "strings" + "testing" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/registry" + "github.com/testcontainers/testcontainers-go/wait" +) + +func TestRegistry_unauthenticated(t *testing.T) { + container, err := registry.RunContainer(context.Background(), testcontainers.WithImage("registry:2.8.3")) + if err != nil { + t.Fatal(err) + } + + // Clean up the container after the test is complete + t.Cleanup(func() { + if err := container.Terminate(context.Background()); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + httpAddress, err := container.Address(context.Background()) + if err != nil { + t.Fatal(err) + } + + resp, err := http.Get(httpAddress + "/v2/_catalog") + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + t.Fatalf("expected status code 200, but got %d", resp.StatusCode) + } +} + +func TestRunContainer_authenticated(t *testing.T) { + registryContainer, err := registry.RunContainer( + context.Background(), + testcontainers.WithImage("registry:2.8.3"), + registry.WithHtpasswdFile(filepath.Join("testdata", "auth", "htpasswd")), + registry.WithData(filepath.Join("testdata", "data")), + ) + if err != nil { + t.Fatalf("failed to start container: %s", err) + } + t.Cleanup(func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + // httpAddress { + httpAddress, err := registryContainer.Address(context.Background()) + // } + if err != nil { + t.Fatal(err) + } + + registryPort, err := registryContainer.MappedPort(context.Background(), "5000/tcp") + if err != nil { + t.Fatalf("failed to get mapped port: %s", err) + } + strPort := registryPort.Port() + + t.Run("HTTP connection without basic auth fails", func(tt *testing.T) { + httpCli := http.Client{} + req, err := http.NewRequest("GET", httpAddress+"/v2/_catalog", nil) + if err != nil { + tt.Fatal(err) + } + + resp, err := httpCli.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusUnauthorized { + t.Fatalf("expected status code 401, but got %d", resp.StatusCode) + } + }) + + t.Run("HTTP connection with incorrect basic auth fails", func(tt *testing.T) { + httpCli := http.Client{} + req, err := http.NewRequest("GET", httpAddress+"/v2/_catalog", nil) + if err != nil { + tt.Fatal(err) + } + + req.SetBasicAuth("foo", "bar") + + resp, err := httpCli.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusUnauthorized { + t.Fatalf("expected status code 401, but got %d", resp.StatusCode) + } + }) + + t.Run("HTTP connection with basic auth succeeds", func(tt *testing.T) { + httpCli := http.Client{} + req, err := http.NewRequest("GET", httpAddress+"/v2/_catalog", nil) + if err != nil { + tt.Fatal(err) + } + + req.SetBasicAuth("testuser", "testpassword") + + resp, err := httpCli.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + t.Fatalf("expected status code 200, but got %d", resp.StatusCode) + } + }) + + t.Run("build images with wrong credentials fails", func(tt *testing.T) { + // Zm9vOmJhcg== is base64 for foo:bar + tt.Setenv("DOCKER_AUTH_CONFIG", `{ + "auths": { + "localhost:`+strPort+`": { "username": "foo", "password": "bar", "auth": "Zm9vOmJhcg==" } + }, + "credsStore": "desktop" + }`) + + redisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "redis"), + BuildArgs: map[string]*string{ + "REGISTRY_PORT": &strPort, + }, + PrintBuildLog: true, + }, + AlwaysPullImage: true, // make sure the authentication takes place + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err == nil { + tt.Fatalf("expected to fail to start container, but it did not") + } + if redisC != nil { + tt.Fatal("redis container should not be running") + tt.Cleanup(func() { + if err := redisC.Terminate(context.Background()); err != nil { + tt.Fatalf("failed to terminate container: %s", err) + } + }) + } + + if !strings.Contains(err.Error(), "unauthorized: authentication required") { + tt.Fatalf("expected error to be 'unauthorized: authentication required' but got '%s'", err.Error()) + } + }) + + t.Run("build image with valid credentials", func(tt *testing.T) { + // dGVzdHVzZXI6dGVzdHBhc3N3b3Jk is base64 for testuser:testpassword + tt.Setenv("DOCKER_AUTH_CONFIG", `{ + "auths": { + "localhost:`+strPort+`": { "username": "testuser", "password": "testpassword", "auth": "dGVzdHVzZXI6dGVzdHBhc3N3b3Jk" } + }, + "credsStore": "desktop" + }`) + + // build a custom redis image from the private registry, + // using RegistryName of the container as the registry. + // The container should start because the authentication + // is correct. + + redisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "redis"), + BuildArgs: map[string]*string{ + "REGISTRY_PORT": &strPort, + }, + PrintBuildLog: true, + }, + AlwaysPullImage: true, // make sure the authentication takes place + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err != nil { + tt.Fatalf("failed to start container: %s", err) + } + + tt.Cleanup(func() { + if err := redisC.Terminate(context.Background()); err != nil { + tt.Fatalf("failed to terminate container: %s", err) + } + }) + + state, err := redisC.State(context.Background()) + if err != nil { + tt.Fatalf("failed to get redis container state: %s", err) // nolint:gocritic + } + + if !state.Running { + tt.Fatalf("expected redis container to be running, but it is not") + } + }) +} + +func TestRunContainer_authenticated_withCredentials(t *testing.T) { + // htpasswdString { + registryContainer, err := registry.RunContainer( + context.Background(), + testcontainers.WithImage("registry:2.8.3"), + registry.WithHtpasswd("testuser:$2y$05$tTymaYlWwJOqie.bcSUUN.I.kxmo1m5TLzYQ4/ejJ46UMXGtq78EO"), + ) + // } + if err != nil { + t.Fatalf("failed to start container: %s", err) + } + t.Cleanup(func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + httpAddress, err := registryContainer.Address(context.Background()) + if err != nil { + t.Fatal(err) + } + + httpCli := http.Client{} + req, err := http.NewRequest("GET", httpAddress+"/v2/_catalog", nil) + if err != nil { + t.Fatal(err) + } + + req.SetBasicAuth("testuser", "testpassword") + + resp, err := httpCli.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + t.Fatalf("expected status code 200, but got %d", resp.StatusCode) + } +} + +func TestRunContainer_wrongData(t *testing.T) { + registryContainer, err := registry.RunContainer( + context.Background(), + testcontainers.WithImage("registry:2.8.3"), + registry.WithHtpasswdFile(filepath.Join("testdata", "auth", "htpasswd")), + registry.WithData(filepath.Join("testdata", "wrongdata")), + ) + if err != nil { + t.Fatalf("failed to start container: %s", err) + } + t.Cleanup(func() { + if err := registryContainer.Terminate(context.Background()); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + registryPort, err := registryContainer.MappedPort(context.Background(), "5000/tcp") + if err != nil { + t.Fatalf("failed to get mapped port: %s", err) + } + strPort := registryPort.Port() + + // dGVzdHVzZXI6dGVzdHBhc3N3b3Jk is base64 for testuser:testpassword + t.Setenv("DOCKER_AUTH_CONFIG", `{ + "auths": { + "localhost:`+strPort+`": { "username": "testuser", "password": "testpassword", "auth": "dGVzdHVzZXI6dGVzdHBhc3N3b3Jk" } + }, + "credsStore": "desktop" + }`) + + // build a custom redis image from the private registry, + // using RegistryName of the container as the registry. + // The container won't be able to start because the data + // directory is wrong. + + redisC, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "redis"), + BuildArgs: map[string]*string{ + "REGISTRY_PORT": &strPort, + }, + PrintBuildLog: true, + }, + AlwaysPullImage: true, // make sure the authentication takes place + ExposedPorts: []string{"6379/tcp"}, + WaitingFor: wait.ForLog("Ready to accept connections"), + }, + Started: true, + }) + if err == nil { + t.Fatalf("expected to fail to start container, but it did not") + } + if redisC != nil { + t.Fatal("redis container should not be running") + t.Cleanup(func() { + if err := redisC.Terminate(context.Background()); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + } + + if !strings.Contains(err.Error(), "manifest unknown") { + t.Fatalf("expected error to be 'manifest unknown' but got '%s'", err.Error()) + } +} diff --git a/modules/registry/testdata/auth/htpasswd b/modules/registry/testdata/auth/htpasswd new file mode 100644 index 0000000000..9a5d4aaff6 --- /dev/null +++ b/modules/registry/testdata/auth/htpasswd @@ -0,0 +1,2 @@ +testuser:$2y$05$tTymaYlWwJOqie.bcSUUN.I.kxmo1m5TLzYQ4/ejJ46UMXGtq78EO + diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/21/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/21/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/data new file mode 100644 index 0000000000..caac84b41c Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/21/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/25/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/25/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/data new file mode 100644 index 0000000000..81c85d096f Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/25/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/64/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/64/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/data new file mode 100644 index 0000000000..7f2bf8fe86 Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/64/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/66/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/66/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/data new file mode 100644 index 0000000000..8d34bd5df0 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/66/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/data @@ -0,0 +1,41 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 6320, + "digest": "sha256:960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 2806054, + "digest": "sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49" + }, + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 1271, + "digest": "sha256:fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a" + }, + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 398361, + "digest": "sha256:dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e" + }, + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 6444723, + "digest": "sha256:a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a" + }, + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 135, + "digest": "sha256:64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b" + }, + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 580, + "digest": "sha256:2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1" + } + ] +} \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/96/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/96/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/data new file mode 100644 index 0000000000..4233a50f51 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/96/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/data @@ -0,0 +1 @@ +{"architecture":"amd64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"6379/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","REDIS_VERSION=5.0.14","REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-5.0.14.tar.gz","REDIS_DOWNLOAD_SHA=3ea5024766d983249e80d4aa9457c897a9f079957d0fb1f35682df233f997f32"],"Cmd":["redis-server"],"Image":"sha256:c6b61b4eb28dfbb356b1faf35269891803301551508b1604cf67492e23f58496","Volumes":{"/data":{}},"WorkingDir":"/data","Entrypoint":["docker-entrypoint.sh"],"OnBuild":null,"Labels":null},"container":"3f5209e45fd8d25352646faf4c9ed85bd0f55581859dac5c0b6f71a0f354d59f","container_config":{"Hostname":"3f5209e45fd8","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"6379/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","REDIS_VERSION=5.0.14","REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-5.0.14.tar.gz","REDIS_DOWNLOAD_SHA=3ea5024766d983249e80d4aa9457c897a9f079957d0fb1f35682df233f997f32"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"redis-server\"]"],"Image":"sha256:c6b61b4eb28dfbb356b1faf35269891803301551508b1604cf67492e23f58496","Volumes":{"/data":{}},"WorkingDir":"/data","Entrypoint":["docker-entrypoint.sh"],"OnBuild":null,"Labels":{}},"created":"2022-10-07T03:33:38.951799853Z","docker_version":"20.10.12","history":[{"created":"2022-08-09T17:19:53.274069586Z","created_by":"/bin/sh -c #(nop) ADD file:2a949686d9886ac7c10582a6c29116fd29d3077d02755e87e111870d63607725 in / "},{"created":"2022-08-09T17:19:53.47374331Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true},{"created":"2022-10-07T03:30:17.540132626Z","created_by":"/bin/sh -c addgroup -S -g 1000 redis \u0026\u0026 adduser -S -G redis -u 999 redis"},{"created":"2022-10-07T03:30:18.701947002Z","created_by":"/bin/sh -c apk add --no-cache \t\t'su-exec\u003e=0.2' \t\ttzdata"},{"created":"2022-10-07T03:33:00.969689587Z","created_by":"/bin/sh -c #(nop) ENV REDIS_VERSION=5.0.14","empty_layer":true},{"created":"2022-10-07T03:33:01.061281294Z","created_by":"/bin/sh -c #(nop) ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-5.0.14.tar.gz","empty_layer":true},{"created":"2022-10-07T03:33:01.154686334Z","created_by":"/bin/sh -c #(nop) ENV REDIS_DOWNLOAD_SHA=3ea5024766d983249e80d4aa9457c897a9f079957d0fb1f35682df233f997f32","empty_layer":true},{"created":"2022-10-07T03:33:37.807285887Z","created_by":"/bin/sh -c set -eux; \t\tapk add --no-cache --virtual .build-deps \t\tcoreutils \t\tdpkg-dev dpkg \t\tgcc \t\tlinux-headers \t\tmake \t\tmusl-dev \t\topenssl-dev \t\twget \t; \t\twget -O redis.tar.gz \"$REDIS_DOWNLOAD_URL\"; \techo \"$REDIS_DOWNLOAD_SHA *redis.tar.gz\" | sha256sum -c -; \tmkdir -p /usr/src/redis; \ttar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1; \trm redis.tar.gz; \t\tgrep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' /usr/src/redis/src/server.h; \tsed -ri 's!^(#define CONFIG_DEFAULT_PROTECTED_MODE) 1$!\\1 0!' /usr/src/redis/src/server.h; \tgrep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 0$' /usr/src/redis/src/server.h; \t\tgnuArch=\"$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)\"; \textraJemallocConfigureFlags=\"--build=$gnuArch\"; \tdpkgArch=\"$(dpkg --print-architecture)\"; \tcase \"${dpkgArch##*-}\" in \t\tamd64 | i386 | x32) extraJemallocConfigureFlags=\"$extraJemallocConfigureFlags --with-lg-page=12\" ;; \t\t*) extraJemallocConfigureFlags=\"$extraJemallocConfigureFlags --with-lg-page=16\" ;; \tesac; \textraJemallocConfigureFlags=\"$extraJemallocConfigureFlags --with-lg-hugepage=21\"; \tgrep -F 'cd jemalloc \u0026\u0026 ./configure ' /usr/src/redis/deps/Makefile; \tsed -ri 's!cd jemalloc \u0026\u0026 ./configure !\u0026'\"$extraJemallocConfigureFlags\"' !' /usr/src/redis/deps/Makefile; \tgrep -F \"cd jemalloc \u0026\u0026 ./configure $extraJemallocConfigureFlags \" /usr/src/redis/deps/Makefile; \t\tmake -C /usr/src/redis -j \"$(nproc)\" all; \tmake -C /usr/src/redis install; \t\tserverMd5=\"$(md5sum /usr/local/bin/redis-server | cut -d' ' -f1)\"; export serverMd5; \tfind /usr/local/bin/redis* -maxdepth 0 \t\t-type f -not -name redis-server \t\t-exec sh -eux -c ' \t\t\tmd5=\"$(md5sum \"$1\" | cut -d\" \" -f1)\"; \t\t\ttest \"$md5\" = \"$serverMd5\"; \t\t' -- '{}' ';' \t\t-exec ln -svfT 'redis-server' '{}' ';' \t; \t\trm -r /usr/src/redis; \t\trunDeps=\"$( \t\tscanelf --needed --nobanner --format '%n#p' --recursive /usr/local \t\t\t| tr ',' '\\n' \t\t\t| sort -u \t\t\t| awk 'system(\"[ -e /usr/local/lib/\" $1 \" ]\") == 0 { next } { print \"so:\" $1 }' \t)\"; \tapk add --no-network --virtual .redis-rundeps $runDeps; \tapk del --no-network .build-deps; \t\tredis-cli --version; \tredis-server --version"},{"created":"2022-10-07T03:33:38.347225861Z","created_by":"/bin/sh -c mkdir /data \u0026\u0026 chown redis:redis /data"},{"created":"2022-10-07T03:33:38.444090076Z","created_by":"/bin/sh -c #(nop) VOLUME [/data]","empty_layer":true},{"created":"2022-10-07T03:33:38.545951015Z","created_by":"/bin/sh -c #(nop) WORKDIR /data","empty_layer":true},{"created":"2022-10-07T03:33:38.658945137Z","created_by":"/bin/sh -c #(nop) COPY file:a9e7249f657e2eec627bb4be492ad18aae3e5e1f0e47d22644eaf1ef2138c0ce in /usr/local/bin/ "},{"created":"2022-10-07T03:33:38.754618391Z","created_by":"/bin/sh -c #(nop) ENTRYPOINT [\"docker-entrypoint.sh\"]","empty_layer":true},{"created":"2022-10-07T03:33:38.850313099Z","created_by":"/bin/sh -c #(nop) EXPOSE 6379","empty_layer":true},{"created":"2022-10-07T03:33:38.951799853Z","created_by":"/bin/sh -c #(nop) CMD [\"redis-server\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:994393dc58e7931862558d06e46aa2bb17487044f670f310dffe1d24e4d1eec7","sha256:6dbd9594c43d4115a12f2e203dfd586ba420dbd75a00d2d6c3feecdeb0048371","sha256:5669106330164180bda406cb49aa2126735bc29065b55354736d2656dffdbb96","sha256:ae23d15ebd31905b77598e96646e2cf46463bf8bd50e3b65c32ded7502402a9e","sha256:82566308f0b016b3848e916f16363ef5329f1fac362347fcb8cb99b1ba9461d7","sha256:beeee888b45e7cbe9e51c618ffe059806875e5570cb5607da75bd9e0b2649a43"]}} \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/a5/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/a5/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/data new file mode 100644 index 0000000000..1ac50ad3c7 Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/a5/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/dc/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/dc/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/data new file mode 100644 index 0000000000..f6708738a6 Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/dc/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/fb/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/data b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/fb/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/data new file mode 100644 index 0000000000..eca594a3ac Binary files /dev/null and b/modules/registry/testdata/data/docker/registry/v2/blobs/sha256/fb/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/data differ diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/link new file mode 100644 index 0000000000..a36da7dcd8 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49/link @@ -0,0 +1 @@ +sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49 \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/link new file mode 100644 index 0000000000..0e19e655c1 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1/link @@ -0,0 +1 @@ +sha256:2595acf2c0bea71c4135062d027e4cf088b1674b3bb008b2571796491aa662b1 \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/link new file mode 100644 index 0000000000..8fb2ca14b5 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b/link @@ -0,0 +1 @@ +sha256:64acd9e2f7c70ed5b56219f5b8949a8cbc67c03f8c51fdb6786bec66eec4476b \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/link new file mode 100644 index 0000000000..ff0826dc7f --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa/link @@ -0,0 +1 @@ +sha256:960343481690ac146b55e1b704b9685104f1710bd557c7a409c48fdc721929fa \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/link new file mode 100644 index 0000000000..719dc0acdb --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a/link @@ -0,0 +1 @@ +sha256:a59c682d8704ef96c5dec2f59481ac24993fb3c25a4a139e22e2db664a34b06a \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/link new file mode 100644 index 0000000000..34fb3fb32a --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e/link @@ -0,0 +1 @@ +sha256:dc2e3041aaa57579fe87bf26fbb56fcf7aef49b3f5a0e0ee37eab519855dd37e \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/link new file mode 100644 index 0000000000..b2cd2f62e0 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_layers/sha256/fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a/link @@ -0,0 +1 @@ +sha256:fb541f77610a7550755893b11853752742e9b173e4e9967f4db6b02c2e51ce4a \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/revisions/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/revisions/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link new file mode 100644 index 0000000000..58e62086c4 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/revisions/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link @@ -0,0 +1 @@ +sha256:662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/current/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/current/link new file mode 100644 index 0000000000..58e62086c4 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/current/link @@ -0,0 +1 @@ +sha256:662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb \ No newline at end of file diff --git a/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/index/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/index/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link new file mode 100644 index 0000000000..58e62086c4 --- /dev/null +++ b/modules/registry/testdata/data/docker/registry/v2/repositories/redis/_manifests/tags/5.0-alpine/index/sha256/662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb/link @@ -0,0 +1 @@ +sha256:662f040a4fc0e397e379a82a7d79663bb26698ae009d674e70b0224c4b155edb \ No newline at end of file diff --git a/modules/registry/testdata/redis/Dockerfile b/modules/registry/testdata/redis/Dockerfile new file mode 100644 index 0000000000..502db64261 --- /dev/null +++ b/modules/registry/testdata/redis/Dockerfile @@ -0,0 +1,3 @@ +ARG REGISTRY_PORT=5000 + +FROM localhost:${REGISTRY_PORT}/redis:5.0-alpine \ No newline at end of file diff --git a/modules/registry/testdata/wrongdata/layerrrr/layer.tmp b/modules/registry/testdata/wrongdata/layerrrr/layer.tmp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sonar-project.properties b/sonar-project.properties index bc4bd78a0f..965692b1c0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -18,4 +18,4 @@ sonar.test.inclusions=**/*_test.go sonar.test.exclusions=**/vendor/** sonar.go.coverage.reportPaths=**/coverage.out -sonar.go.tests.reportPaths=TEST-unit.xml,examples/nginx/TEST-unit.xml,examples/toxiproxy/TEST-unit.xml,modulegen/TEST-unit.xml,modules/artemis/TEST-unit.xml,modules/cassandra/TEST-unit.xml,modules/chroma/TEST-unit.xml,modules/clickhouse/TEST-unit.xml,modules/cockroachdb/TEST-unit.xml,modules/compose/TEST-unit.xml,modules/consul/TEST-unit.xml,modules/couchbase/TEST-unit.xml,modules/elasticsearch/TEST-unit.xml,modules/gcloud/TEST-unit.xml,modules/inbucket/TEST-unit.xml,modules/k3s/TEST-unit.xml,modules/k6/TEST-unit.xml,modules/kafka/TEST-unit.xml,modules/localstack/TEST-unit.xml,modules/mariadb/TEST-unit.xml,modules/milvus/TEST-unit.xml,modules/minio/TEST-unit.xml,modules/mockserver/TEST-unit.xml,modules/mongodb/TEST-unit.xml,modules/mssql/TEST-unit.xml,modules/mysql/TEST-unit.xml,modules/nats/TEST-unit.xml,modules/neo4j/TEST-unit.xml,modules/ollama/TEST-unit.xml,modules/openfga/TEST-unit.xml,modules/openldap/TEST-unit.xml,modules/opensearch/TEST-unit.xml,modules/postgres/TEST-unit.xml,modules/pulsar/TEST-unit.xml,modules/qdrant/TEST-unit.xml,modules/rabbitmq/TEST-unit.xml,modules/redis/TEST-unit.xml,modules/redpanda/TEST-unit.xml,modules/surrealdb/TEST-unit.xml,modules/vault/TEST-unit.xml,modules/weaviate/TEST-unit.xml +sonar.go.tests.reportPaths=TEST-unit.xml,examples/nginx/TEST-unit.xml,examples/toxiproxy/TEST-unit.xml,modulegen/TEST-unit.xml,modules/artemis/TEST-unit.xml,modules/cassandra/TEST-unit.xml,modules/chroma/TEST-unit.xml,modules/clickhouse/TEST-unit.xml,modules/cockroachdb/TEST-unit.xml,modules/compose/TEST-unit.xml,modules/consul/TEST-unit.xml,modules/couchbase/TEST-unit.xml,modules/elasticsearch/TEST-unit.xml,modules/gcloud/TEST-unit.xml,modules/inbucket/TEST-unit.xml,modules/k3s/TEST-unit.xml,modules/k6/TEST-unit.xml,modules/kafka/TEST-unit.xml,modules/localstack/TEST-unit.xml,modules/mariadb/TEST-unit.xml,modules/milvus/TEST-unit.xml,modules/minio/TEST-unit.xml,modules/mockserver/TEST-unit.xml,modules/mongodb/TEST-unit.xml,modules/mssql/TEST-unit.xml,modules/mysql/TEST-unit.xml,modules/nats/TEST-unit.xml,modules/neo4j/TEST-unit.xml,modules/ollama/TEST-unit.xml,modules/openfga/TEST-unit.xml,modules/openldap/TEST-unit.xml,modules/opensearch/TEST-unit.xml,modules/postgres/TEST-unit.xml,modules/pulsar/TEST-unit.xml,modules/qdrant/TEST-unit.xml,modules/rabbitmq/TEST-unit.xml,modules/redis/TEST-unit.xml,modules/redpanda/TEST-unit.xml,modules/registry/TEST-unit.xml,modules/surrealdb/TEST-unit.xml,modules/vault/TEST-unit.xml,modules/weaviate/TEST-unit.xml