From 68e69545332cef43223f1d322e2f0379a647d04a Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Fri, 9 Feb 2024 16:09:57 +0000 Subject: [PATCH 01/22] feat: add option WithNetwork, WithNetworkAlias and WithEnv to microcks container Signed-off-by: Julien Breux --- microcks.go | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/microcks.go b/microcks.go index 1929f32..d791e3a 100644 --- a/microcks.go +++ b/microcks.go @@ -48,7 +48,7 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize req := testcontainers.ContainerRequest{ Image: defaultImage, ExposedPorts: []string{DefaultHttpPort, DefaultGrpcPort}, - WaitingFor: wait.ForLog("Started MicrocksApplication"), + WaitingFor: wait.ForLog("Started Microcks application"), } genericContainerReq := testcontainers.GenericContainerRequest{ ContainerRequest: req, @@ -94,6 +94,33 @@ func WithArtifact(artifactFilePath string, main bool) testcontainers.CustomizeRe } } +// WithNetwork allows to add a custom network +func WithNetwork(networkName string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + req.Networks = append(req.Networks, networkName) + } +} + +// WithNetworkAlias allows to add a custom network alias for a specific network +func WithNetworkAlias(networkName, networkAlias string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + if req.NetworkAliases == nil { + req.NetworkAliases = make(map[string][]string) + } + req.NetworkAliases[networkName] = []string{networkAlias} + } +} + +// WithEnv allows to add an environment variable +func WithEnv(key, value string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + if req.Env == nil { + req.Env = make(map[string]string) + } + req.Env[key] = value + } +} + // HttpEndpoint allows retrieving the Http endpoint where Microcks can be accessed // (you'd have to append '/api' to access APIs) func (container *MicrocksContainer) HttpEndpoint(ctx context.Context) (string, error) { From 928236146712e1965800be08bb6458ff60dafa9c Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Fri, 9 Feb 2024 16:10:21 +0000 Subject: [PATCH 02/22] feat: add ensemble system Signed-off-by: Julien Breux --- ensemble/ensemble.go | 136 ++++++++++++++++++++++++++++++++++++ ensemble/ensemble_test.go | 1 + ensemble/postman/postman.go | 60 ++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 ensemble/ensemble.go create mode 100644 ensemble/ensemble_test.go create mode 100644 ensemble/postman/postman.go diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go new file mode 100644 index 0000000..e5b3dd0 --- /dev/null +++ b/ensemble/ensemble.go @@ -0,0 +1,136 @@ +package ensemble + +import ( + "context" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/network" + microcks "microcks.io/testcontainers-go" + "microcks.io/testcontainers-go/ensemble/postman" +) + +const ( + defaultNetworkAlias = "microcks" +) + +// Option represents an option to pass to the ensemble +type Option func(*MicrocksEnsembleContainers) error + +// ContainerOptions represents the container options +type ContainerOptions struct { + list []testcontainers.ContainerCustomizer +} + +// Add adds an option to the list +func (co *ContainerOptions) Add(opt testcontainers.ContainerCustomizer) { + co.list = append(co.list, opt) +} + +// MicrocksEnsembleContainers represents the ensemble of containers +type MicrocksEnsembleContainers struct { + ctx context.Context + + network *testcontainers.DockerNetwork + primaryArtifactFilePath string + secondaryArtifactsFilePath string + + microcksContainer *microcks.MicrocksContainer + microcksContainerOptions ContainerOptions + + postmanContainer *postman.PostmanContainer + postmanContainerOptions ContainerOptions +} + +// GetMicrocksContainers returns the Microcks container +func (ec *MicrocksEnsembleContainers) GetMicrocksContainers() *microcks.MicrocksContainer { + return ec.microcksContainer +} + +// GetPostmanContainer returns the Postman container +func (ec *MicrocksEnsembleContainers) GetPostmanContainer() *postman.PostmanContainer { + return ec.postmanContainer +} + +// RunEnsembleContainers creates instances of the Microcks and necessaries tools. +// Using sequential start to avoid resource contention on CI systems with weaker hardware. +func RunEnsembleContainers(ctx context.Context, opts ...Option) (*MicrocksEnsembleContainers, error) { + var err error + + ensemble := &MicrocksEnsembleContainers{ + ctx: ctx, + } + + // Options + defaults := []Option{WithDefaultNetwork()} + options := append(defaults, opts...) + for _, opt := range options { + if err = opt(ensemble); err != nil { + return nil, err + } + } + + // Microcks container + ensemble.microcksContainerOptions.Add(microcks.WithEnv("POSTMAN_RUNNER_URL", "http://postman:3000")) + ensemble.microcksContainerOptions.Add(microcks.WithEnv("TEST_CALLBACK_URL", "http://microcks:8080")) + ensemble.microcksContainer, err = microcks.RunContainer(ctx, ensemble.microcksContainerOptions.list...) + if err != nil { + return nil, err + } + + // Postman container + ensemble.postmanContainer, err = postman.RunContainer(ctx, ensemble.postmanContainerOptions.list...) + if err != nil { + return nil, err + } + + return ensemble, nil +} + +// WithDefaultNetwork allows to use a default network +func WithDefaultNetwork() Option { + return func(e *MicrocksEnsembleContainers) (err error) { + e.network, err = network.New(e.ctx, network.WithCheckDuplicate()) + if err != nil { + return err + } + + e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + + return nil + } +} + +// WithNetwork allows to define the network +func WithNetwork(network *testcontainers.DockerNetwork) Option { + return func(e *MicrocksEnsembleContainers) error { + e.network = network + e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + return nil + } +} + +// WithMainArtifact provides paths to artifacts that will be imported as main or main +// ones within the Microcks container. +// Once it will be started and healthy. +func WithMainArtifact(artifactFilePath string) Option { + return func(e *MicrocksEnsembleContainers) error { + e.microcksContainerOptions.Add(microcks.WithMainArtifact(artifactFilePath)) + return nil + } +} + +// WithSecondaryArtifact provides paths to artifacts that will be imported as main or main +// ones within the Microcks container. +// Once it will be started and healthy. +func WithSecondaryArtifact(artifactFilePath string) Option { + return func(e *MicrocksEnsembleContainers) error { + e.microcksContainerOptions.Add(microcks.WithSecondaryArtifact(artifactFilePath)) + return nil + } +} diff --git a/ensemble/ensemble_test.go b/ensemble/ensemble_test.go new file mode 100644 index 0000000..1461419 --- /dev/null +++ b/ensemble/ensemble_test.go @@ -0,0 +1 @@ +package ensemble_test diff --git a/ensemble/postman/postman.go b/ensemble/postman/postman.go new file mode 100644 index 0000000..65c97b1 --- /dev/null +++ b/ensemble/postman/postman.go @@ -0,0 +1,60 @@ +package postman + +import ( + "context" + + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" +) + +const ( + defaultImage = "quay.io/microcks/microcks-postman-runtime:latest" + + // DefaultHTTPPort represents the default Postman HTTP port + DefaultHTTPPort = "6000/tcp" +) + +// PostmanContainer represents the Postman container type used in the ensemble. +type PostmanContainer struct { + testcontainers.Container +} + +// RunContainer runs the Postman container +func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*PostmanContainer, error) { + req := testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: defaultImage, + ExposedPorts: []string{DefaultHTTPPort}, + WaitingFor: wait.ForLog("Started Postman"), + }, + Started: true, + } + + for _, opt := range opts { + opt.Customize(&req) + } + + container, err := testcontainers.GenericContainer(ctx, req) + if err != nil { + return nil, err + } + + return &PostmanContainer{Container: container}, nil +} + +// WithNetwork allows to add a custom network +func WithNetwork(networkName string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + req.Networks = append(req.Networks, networkName) + } +} + +// WithNetworkAlias allows to add a custom network alias for a specific network +func WithNetworkAlias(networkName, networkAlias string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + if req.NetworkAliases == nil { + req.NetworkAliases = make(map[string][]string) + } + req.NetworkAliases[networkName] = []string{networkAlias} + } +} From 21fdf31ca321e88fb2dca92858e84b8b6ee64ef7 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 13 Feb 2024 10:46:26 +0000 Subject: [PATCH 03/22] cs: remove unnecessary ensemble options Signed-off-by: Julien Breux --- ensemble/ensemble.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index e5b3dd0..e903f82 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -30,9 +30,7 @@ func (co *ContainerOptions) Add(opt testcontainers.ContainerCustomizer) { type MicrocksEnsembleContainers struct { ctx context.Context - network *testcontainers.DockerNetwork - primaryArtifactFilePath string - secondaryArtifactsFilePath string + network *testcontainers.DockerNetwork microcksContainer *microcks.MicrocksContainer microcksContainerOptions ContainerOptions @@ -56,9 +54,7 @@ func (ec *MicrocksEnsembleContainers) GetPostmanContainer() *postman.PostmanCont func RunEnsembleContainers(ctx context.Context, opts ...Option) (*MicrocksEnsembleContainers, error) { var err error - ensemble := &MicrocksEnsembleContainers{ - ctx: ctx, - } + ensemble := &MicrocksEnsembleContainers{ctx: ctx} // Options defaults := []Option{WithDefaultNetwork()} From d9810c6a958c048a27900c5373f9bb1bf1923ca4 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 14:53:17 +0000 Subject: [PATCH 04/22] core: add helper used for tests Signed-off-by: Julien Breux --- internal/test/helper.go | 162 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 internal/test/helper.go diff --git a/internal/test/helper.go b/internal/test/helper.go new file mode 100644 index 0000000..497139e --- /dev/null +++ b/internal/test/helper.go @@ -0,0 +1,162 @@ +package test + +import ( + "bytes" + "context" + "encoding/json" + "io" + "net/http" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "microcks.io/go-client" + microcks "microcks.io/testcontainers-go" +) + +// ConfigRetrieval tests the configuration +func ConfigRetrieval(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + uri, err := microcksContainer.HttpEndpoint(ctx) + require.NoError(t, err) + + resp, err := http.Get(uri + "/api/keycloak/config") + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode) +} + +// MockEndpoints tests the mock endpoints +func MockEndpoints(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + endpoint, err := microcksContainer.HttpEndpoint(ctx) + require.NoError(t, err) + + baseApiUrl, err := microcksContainer.SoapMockEndpoint(ctx, "Pastries Service", "1.0") + require.NoError(t, err) + require.Equal(t, endpoint+"/soap/Pastries Service/1.0", baseApiUrl) + + baseApiUrl, err = microcksContainer.RestMockEndpoint(ctx, "API Pastries", "0.0.1") + require.NoError(t, err) + require.Equal(t, endpoint+"/rest/API Pastries/0.0.1", baseApiUrl) + + baseApiUrl, err = microcksContainer.GrapQLMockEndpoint(ctx, "Pastries Graph", "1") + require.NoError(t, err) + require.Equal(t, endpoint+"/graphql/Pastries Graph/1", baseApiUrl) + + baseGrpcUrl, err := microcksContainer.GrpcMockEndpoint(ctx) + require.NoError(t, err) + + ip, err := microcksContainer.Host(ctx) + require.NoError(t, err) + + port, err := microcksContainer.MappedPort(ctx, microcks.DefaultGrpcPort) + require.NoError(t, err) + require.Equal(t, "grpc://"+ip+":"+port.Port(), baseGrpcUrl) +} + +// MicrocksMockingFunctionality tests the Microcks mocking functionality +func MicrocksMockingFunctionality(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + baseApiUrl, err := microcksContainer.RestMockEndpoint(ctx, "API Pastries", "0.0.1") + require.NoError(t, err) + + resp, err := http.Get(baseApiUrl + "/pastries/Millefeuille") + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode) + + // Unmarshal body using a generic interface + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + + var pastry = map[string]string{} + json.Unmarshal([]byte(body), &pastry) + + require.Equal(t, "Millefeuille", pastry["name"]) + + // Check that mock from secondary artifact has been loaded. + resp, err = http.Get(baseApiUrl + "/pastries/Eclair Chocolat") + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode) + + // Unmarshal body using a generic interface + body, err = io.ReadAll(resp.Body) + require.NoError(t, err) + + pastry = map[string]string{} + json.Unmarshal([]byte(body), &pastry) + + require.Equal(t, "Eclair Chocolat", pastry["name"]) +} + +// AssertBadImplementation helps to assert the endpoint with a bad implementation +func AssertBadImplementation(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + // Build a new TestRequest. + testRequest := client.TestRequest{ + ServiceId: "API Pastries:0.0.1", + RunnerType: client.TestRunnerTypeOPENAPISCHEMA, + TestEndpoint: "http://bad-impl:3001", + Timeout: 2000, + } + + testResult, err := microcksContainer.TestEndpoint(ctx, &testRequest) + require.NoError(t, err) + + t.Logf("Test Result success is %t", testResult.Success) + + require.False(t, testResult.Success) + require.Equal(t, "http://bad-impl:3001", testResult.TestedEndpoint) + + require.Equal(t, 3, len(*testResult.TestCaseResults)) + for _, r := range *testResult.TestCaseResults { + require.False(t, r.Success) + } + + t0 := (*testResult.TestCaseResults)[0].TestStepResults + require.True(t, strings.Contains(*(*t0)[0].Message, "object has missing required properties")) +} + +// AssertGoodImplementation helps to assert the endpoint with a good implementation +func AssertGoodImplementation(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + // Switch endpoint to the correct implementation. + testRequest := client.TestRequest{ + ServiceId: "API Pastries:0.0.1", + RunnerType: client.TestRunnerTypeOPENAPISCHEMA, + TestEndpoint: "http://good-impl:3002", + Timeout: 2000, + } + + testResult, err := microcksContainer.TestEndpoint(ctx, &testRequest) + require.NoError(t, err) + + t.Logf("Test Result success is %t", testResult.Success) + + require.True(t, testResult.Success) + require.Equal(t, "http://good-impl:3002", testResult.TestedEndpoint) + + require.Equal(t, 3, len(*testResult.TestCaseResults)) + for _, r := range *testResult.TestCaseResults { + require.True(t, r.Success) + } +} + +// Deprecated: use testcontainers.WithNetwork once it's released. +// WithNetwork is a custom request option that adds a network to a container. +// This is a temporary option until the next release of testcontainers-go, which will include +// this option. +func WithNetwork(network string) testcontainers.CustomizeRequestOption { + return func(req *testcontainers.GenericContainerRequest) { + req.Networks = []string{network} + } +} + +// PrintMicrocksContainerLogs prints the Microcks container logs +func PrintMicrocksContainerLogs(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { + readCloser, err := microcksContainer.Logs(ctx) + require.NoError(t, err) + + // example to read data + buf := new(bytes.Buffer) + numOfByte, err := buf.ReadFrom(readCloser) + require.NoError(t, err) + + readCloser.Close() + t.Logf("Read: %d bytes, content is: %s", numOfByte, buf.String()) +} From cd4ddfc0b4e78550f931f7ad834b815743a45b0f Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 14:54:05 +0000 Subject: [PATCH 05/22] test: use new helper to clean tests Signed-off-by: Julien Breux --- microcks_test.go | 170 ++++------------------------------------------- 1 file changed, 12 insertions(+), 158 deletions(-) diff --git a/microcks_test.go b/microcks_test.go index 34999db..1b3ebe4 100644 --- a/microcks_test.go +++ b/microcks_test.go @@ -16,21 +16,17 @@ package microcks_test import ( - "bytes" "context" - "encoding/json" - "io" "net/http" "path/filepath" - "strings" "testing" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" - client "microcks.io/go-client" microcks "microcks.io/testcontainers-go" + "microcks.io/testcontainers-go/internal/test" ) func TestMockingFunctionalityAtStartup(t *testing.T) { @@ -48,10 +44,10 @@ func TestMockingFunctionalityAtStartup(t *testing.T) { } }) - testConfigRetrieval(t, ctx, microcksContainer) - testMockEndpoints(t, ctx, microcksContainer) + test.ConfigRetrieval(t, ctx, microcksContainer) + test.MockEndpoints(t, ctx, microcksContainer) - testMicrocksMockingFunctionality(t, ctx, microcksContainer) + test.MicrocksMockingFunctionality(t, ctx, microcksContainer) } func TestMockingFunctionality(t *testing.T) { @@ -74,10 +70,10 @@ func TestMockingFunctionality(t *testing.T) { require.NoError(t, err) require.Equal(t, http.StatusCreated, status) - testConfigRetrieval(t, ctx, microcksContainer) - testMockEndpoints(t, ctx, microcksContainer) + test.ConfigRetrieval(t, ctx, microcksContainer) + test.MockEndpoints(t, ctx, microcksContainer) - testMicrocksMockingFunctionality(t, ctx, microcksContainer) + test.MicrocksMockingFunctionality(t, ctx, microcksContainer) } func TestContractTestingFunctionality(t *testing.T) { @@ -97,7 +93,7 @@ func TestContractTestingFunctionality(t *testing.T) { microcksContainer, err := microcks.RunContainer(ctx, testcontainers.WithImage("quay.io/microcks/microcks-uber:nightly"), - withNetwork(networkName), + microcks.WithNetwork(networkName), ) require.NoError(t, err) @@ -148,152 +144,10 @@ func TestContractTestingFunctionality(t *testing.T) { require.NoError(t, err) require.Equal(t, http.StatusCreated, status) - testConfigRetrieval(t, ctx, microcksContainer) + test.ConfigRetrieval(t, ctx, microcksContainer) - assertBadImplementation(t, ctx, microcksContainer) - assertGoodImplementation(t, ctx, microcksContainer) + test.AssertBadImplementation(t, ctx, microcksContainer) + test.AssertGoodImplementation(t, ctx, microcksContainer) - printMicrocksContainerLogs(t, ctx, microcksContainer) -} - -func testConfigRetrieval(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - uri, err := microcksContainer.HttpEndpoint(ctx) - require.NoError(t, err) - - resp, err := http.Get(uri + "/api/keycloak/config") - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) -} - -func testMockEndpoints(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - endpoint, err := microcksContainer.HttpEndpoint(ctx) - require.NoError(t, err) - - baseApiUrl, err := microcksContainer.SoapMockEndpoint(ctx, "Pastries Service", "1.0") - require.NoError(t, err) - require.Equal(t, endpoint+"/soap/Pastries Service/1.0", baseApiUrl) - - baseApiUrl, err = microcksContainer.RestMockEndpoint(ctx, "API Pastries", "0.0.1") - require.NoError(t, err) - require.Equal(t, endpoint+"/rest/API Pastries/0.0.1", baseApiUrl) - - baseApiUrl, err = microcksContainer.GrapQLMockEndpoint(ctx, "Pastries Graph", "1") - require.NoError(t, err) - require.Equal(t, endpoint+"/graphql/Pastries Graph/1", baseApiUrl) - - baseGrpcUrl, err := microcksContainer.GrpcMockEndpoint(ctx) - require.NoError(t, err) - - ip, err := microcksContainer.Host(ctx) - require.NoError(t, err) - - port, err := microcksContainer.MappedPort(ctx, microcks.DefaultGrpcPort) - require.NoError(t, err) - require.Equal(t, "grpc://"+ip+":"+port.Port(), baseGrpcUrl) -} - -func testMicrocksMockingFunctionality(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - baseApiUrl, err := microcksContainer.RestMockEndpoint(ctx, "API Pastries", "0.0.1") - require.NoError(t, err) - - resp, err := http.Get(baseApiUrl + "/pastries/Millefeuille") - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) - - // Unmarshal body using a generic interface - body, err := io.ReadAll(resp.Body) - require.NoError(t, err) - - var pastry = map[string]string{} - json.Unmarshal([]byte(body), &pastry) - - require.Equal(t, "Millefeuille", pastry["name"]) - - // Check that mock from secondary artifact has been loaded. - resp, err = http.Get(baseApiUrl + "/pastries/Eclair Chocolat") - require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) - - // Unmarshal body using a generic interface - body, err = io.ReadAll(resp.Body) - require.NoError(t, err) - - pastry = map[string]string{} - json.Unmarshal([]byte(body), &pastry) - - require.Equal(t, "Eclair Chocolat", pastry["name"]) -} - -// assertions for the endpoint with a bad implementation -func assertBadImplementation(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - // Build a new TestRequest. - testRequest := client.TestRequest{ - ServiceId: "API Pastries:0.0.1", - RunnerType: client.TestRunnerTypeOPENAPISCHEMA, - TestEndpoint: "http://bad-impl:3001", - Timeout: 2000, - } - - testResult, err := microcksContainer.TestEndpoint(ctx, &testRequest) - require.NoError(t, err) - - t.Logf("Test Result success is %t", testResult.Success) - - require.False(t, testResult.Success) - require.Equal(t, "http://bad-impl:3001", testResult.TestedEndpoint) - - require.Equal(t, 3, len(*testResult.TestCaseResults)) - for _, r := range *testResult.TestCaseResults { - require.False(t, r.Success) - } - - t0 := (*testResult.TestCaseResults)[0].TestStepResults - require.True(t, strings.Contains(*(*t0)[0].Message, "object has missing required properties")) -} - -// assertions for the endpoint with a good implementation -func assertGoodImplementation(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - // Switch endpoint to the correct implementation. - testRequest := client.TestRequest{ - ServiceId: "API Pastries:0.0.1", - RunnerType: client.TestRunnerTypeOPENAPISCHEMA, - TestEndpoint: "http://good-impl:3002", - Timeout: 2000, - } - - testResult, err := microcksContainer.TestEndpoint(ctx, &testRequest) - require.NoError(t, err) - - t.Logf("Test Result success is %t", testResult.Success) - - require.True(t, testResult.Success) - require.Equal(t, "http://good-impl:3002", testResult.TestedEndpoint) - - require.Equal(t, 3, len(*testResult.TestCaseResults)) - for _, r := range *testResult.TestCaseResults { - require.True(t, r.Success) - } -} - -// Deprecated: use testcontainers.WithNetwork once it's released. -// withNetwork is a custom request option that adds a network to a container. -// This is a temporary option until the next release of testcontainers-go, which will include -// this option. -func withNetwork(network string) testcontainers.CustomizeRequestOption { - return func(req *testcontainers.GenericContainerRequest) { - req.Networks = []string{network} - } -} - -func printMicrocksContainerLogs(t *testing.T, ctx context.Context, microcksContainer *microcks.MicrocksContainer) { - readCloser, err := microcksContainer.Logs(ctx) - require.NoError(t, err) - - // example to read data - buf := new(bytes.Buffer) - numOfByte, err := buf.ReadFrom(readCloser) - require.NoError(t, err) - - readCloser.Close() - t.Logf("Read: %d bytes, content is: %s", numOfByte, buf.String()) + test.PrintMicrocksContainerLogs(t, ctx, microcksContainer) } From bf96f63c368eecab80772f994008ba208daa8263 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 14:55:30 +0000 Subject: [PATCH 06/22] feat: improve ensemble (add WithPostman option, rename main func to RunContainers) Signed-off-by: Julien Breux --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++- ensemble/ensemble.go | 60 +++++++++++++++++++++++++---------- 2 files changed, 118 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 63d1fd0..62d5f8d 100644 --- a/README.md +++ b/README.md @@ -117,4 +117,77 @@ require.False(t, testResult.Success) require.Equal(t, "http://bad-impl:3001", testResult.TestedEndpoint) ``` -The `testResult` gives you access to all details regarding success of failure on different test cases. \ No newline at end of file +The `testResult` gives you access to all details regarding success of failure on different test cases. + +### Advanced features with MicrocksContainersEnsemble + +The `MicrocksContainer` referenced above supports essential features of Microcks provided by the main Microcks container. +The list of supported features is the following: + +* Mocking of REST APIs using different kinds of artifacts, +* Contract-testing of REST APIs using `OPEN_API_SCHEMA` runner/strategy, +* Mocking and contract-testing of SOAP WebServices, +* Mocking and contract-testing of GraphQL APIs, +* Mocking and contract-testing of gRPC APIs. + +To support features like Asynchronous API and `POSTMAN` contract-testing, we introduced `MicrocksContainersEnsemble` that allows managing +additional Microcks services. `MicrocksContainersEnsemble` allow you to implement +[Different levels of API contract testing](https://medium.com/@lbroudoux/different-levels-of-api-contract-testing-with-microcks-ccc0847f8c97) +in the Inner Loop with Testcontainers! + +A `MicrocksContainersEnsemble` conforms to Testcontainers lifecycle methods and presents roughly the same interface +as a `MicrocksContainer`. You can create and build an ensemble that way: + +```go +import ( + ensemble "microcks.io/testcontainers-go/ensemble" +) + +ensembleContainers, err := ensemble.RunContainers(ctx, + ensemble.WithMainArtifact("testdata/apipastries-openapi.yaml"), + ensemble.WithSecondaryArtifact("testdata/apipastries-postman-collection.json"), +) +``` + +A `MicrocksContainer` is wrapped by an ensemble and is still available to import artifacts and execute test methods. +You have to access it using: + +```go +microcks := ensemble.GetMicrocksContainer(); +microcks.ImportAsMainArtifact(...); +microcks.Logs(...); +``` + +Please refer to our [ensemble tests](https://github.com/microcks/microcks-testcontainers-go/blob/main/ensemble/ensemble_test.go) for comprehensive example on how to use it. + +#### Postman contract-testing + +On this `ensemble` you may want to enable additional features such as Postman contract-testing: + +```go +import ( + ensemble "microcks.io/testcontainers-go/ensemble" +) + +ensembleContainers, err := ensemble.RunContainers(ctx, + ensemble.WithMainArtifact("testdata/apipastries-openapi.yaml"), + ensemble.WithSecondaryArtifact("testdata/apipastries-postman-collection.json"), + ensemble.WithPostman(true), +) +``` + +You can execute a `POSTMAN` test using an ensemble that way: + +```go +// Build a new TestRequest. +testRequest := client.TestRequest{ + ServiceId: "API Pastries:0.0.1", + RunnerType: client.TestRunnerTypeOPENAPISCHEMA, + TestEndpoint: "http://good-impl:3001", + Timeout: 2000, +} + +testResult := ensemble. + GetMicrocksContainer(). + TestEndpoint(context.Background(), testRequest); +``` diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index e903f82..c90b4ba 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -14,7 +14,7 @@ const ( ) // Option represents an option to pass to the ensemble -type Option func(*MicrocksEnsembleContainers) error +type Option func(*MicrocksContainersEnsemble) error // ContainerOptions represents the container options type ContainerOptions struct { @@ -26,8 +26,8 @@ func (co *ContainerOptions) Add(opt testcontainers.ContainerCustomizer) { co.list = append(co.list, opt) } -// MicrocksEnsembleContainers represents the ensemble of containers -type MicrocksEnsembleContainers struct { +// MicrocksContainersEnsemble represents the ensemble of containers +type MicrocksContainersEnsemble struct { ctx context.Context network *testcontainers.DockerNetwork @@ -35,26 +35,44 @@ type MicrocksEnsembleContainers struct { microcksContainer *microcks.MicrocksContainer microcksContainerOptions ContainerOptions + postmanEnabled bool postmanContainer *postman.PostmanContainer postmanContainerOptions ContainerOptions } -// GetMicrocksContainers returns the Microcks container -func (ec *MicrocksEnsembleContainers) GetMicrocksContainers() *microcks.MicrocksContainer { +// GetMicrocksContainer returns the Microcks container +func (ec *MicrocksContainersEnsemble) GetMicrocksContainer() *microcks.MicrocksContainer { return ec.microcksContainer } // GetPostmanContainer returns the Postman container -func (ec *MicrocksEnsembleContainers) GetPostmanContainer() *postman.PostmanContainer { +func (ec *MicrocksContainersEnsemble) GetPostmanContainer() *postman.PostmanContainer { return ec.postmanContainer } -// RunEnsembleContainers creates instances of the Microcks and necessaries tools. +// Terminate helps to terminate all containers +func (ec *MicrocksContainersEnsemble) Terminate(ctx context.Context) error { + // Main Microcks container + if err := ec.microcksContainer.Terminate(ctx); err != nil { + return err + } + + // Postman container + if ec.postmanEnabled { + if err := ec.postmanContainer.Terminate(ctx); err != nil { + return err + } + } + + return nil +} + +// RunContainers creates instances of the Microcks and necessaries tools. // Using sequential start to avoid resource contention on CI systems with weaker hardware. -func RunEnsembleContainers(ctx context.Context, opts ...Option) (*MicrocksEnsembleContainers, error) { +func RunContainers(ctx context.Context, opts ...Option) (*MicrocksContainersEnsemble, error) { var err error - ensemble := &MicrocksEnsembleContainers{ctx: ctx} + ensemble := &MicrocksContainersEnsemble{ctx: ctx} // Options defaults := []Option{WithDefaultNetwork()} @@ -74,9 +92,11 @@ func RunEnsembleContainers(ctx context.Context, opts ...Option) (*MicrocksEnsemb } // Postman container - ensemble.postmanContainer, err = postman.RunContainer(ctx, ensemble.postmanContainerOptions.list...) - if err != nil { - return nil, err + if ensemble.postmanEnabled { + ensemble.postmanContainer, err = postman.RunContainer(ctx, ensemble.postmanContainerOptions.list...) + if err != nil { + return nil, err + } } return ensemble, nil @@ -84,7 +104,7 @@ func RunEnsembleContainers(ctx context.Context, opts ...Option) (*MicrocksEnsemb // WithDefaultNetwork allows to use a default network func WithDefaultNetwork() Option { - return func(e *MicrocksEnsembleContainers) (err error) { + return func(e *MicrocksContainersEnsemble) (err error) { e.network, err = network.New(e.ctx, network.WithCheckDuplicate()) if err != nil { return err @@ -101,7 +121,7 @@ func WithDefaultNetwork() Option { // WithNetwork allows to define the network func WithNetwork(network *testcontainers.DockerNetwork) Option { - return func(e *MicrocksEnsembleContainers) error { + return func(e *MicrocksContainersEnsemble) error { e.network = network e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) @@ -115,7 +135,7 @@ func WithNetwork(network *testcontainers.DockerNetwork) Option { // ones within the Microcks container. // Once it will be started and healthy. func WithMainArtifact(artifactFilePath string) Option { - return func(e *MicrocksEnsembleContainers) error { + return func(e *MicrocksContainersEnsemble) error { e.microcksContainerOptions.Add(microcks.WithMainArtifact(artifactFilePath)) return nil } @@ -125,8 +145,16 @@ func WithMainArtifact(artifactFilePath string) Option { // ones within the Microcks container. // Once it will be started and healthy. func WithSecondaryArtifact(artifactFilePath string) Option { - return func(e *MicrocksEnsembleContainers) error { + return func(e *MicrocksContainersEnsemble) error { e.microcksContainerOptions.Add(microcks.WithSecondaryArtifact(artifactFilePath)) return nil } } + +// WithPostman allows to enable Postman container +func WithPostman(enable bool) Option { + return func(e *MicrocksContainersEnsemble) error { + e.postmanEnabled = enable + return nil + } +} From 92d4a7b2370e6a9843a582962d3d1bc2ae008d12 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 15:00:33 +0000 Subject: [PATCH 07/22] test: add tests to cover ensemble Signed-off-by: Julien Breux --- ensemble/ensemble_test.go | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/ensemble/ensemble_test.go b/ensemble/ensemble_test.go index 1461419..788e655 100644 --- a/ensemble/ensemble_test.go +++ b/ensemble/ensemble_test.go @@ -1 +1,51 @@ package ensemble_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "microcks.io/testcontainers-go/ensemble" + "microcks.io/testcontainers-go/internal/test" +) + +func TestMockingFunctionalityAtStartup(t *testing.T) { + ctx := context.Background() + + ec, err := ensemble.RunContainers(ctx, + ensemble.WithMainArtifact("../testdata/apipastries-openapi.yaml"), + ensemble.WithSecondaryArtifact("../testdata/apipastries-postman-collection.json"), + ) + require.NoError(t, err) + t.Cleanup(func() { + if err := ec.Terminate(ctx); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + test.ConfigRetrieval(t, ctx, ec.GetMicrocksContainer()) + test.MockEndpoints(t, ctx, ec.GetMicrocksContainer()) + + test.MicrocksMockingFunctionality(t, ctx, ec.GetMicrocksContainer()) +} + +func TestPostmanContractTestingFunctionality(t *testing.T) { + ctx := context.Background() + + ec, err := ensemble.RunContainers(ctx, + ensemble.WithMainArtifact("../testdata/apipastries-openapi.yaml"), + ensemble.WithSecondaryArtifact("../testdata/apipastries-postman-collection.json"), + ensemble.WithPostman(true), + ) + require.NoError(t, err) + t.Cleanup(func() { + if err := ec.Terminate(ctx); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + }) + + test.ConfigRetrieval(t, ctx, ec.GetMicrocksContainer()) + test.MockEndpoints(t, ctx, ec.GetMicrocksContainer()) + + test.MicrocksMockingFunctionality(t, ctx, ec.GetMicrocksContainer()) +} From b9558b624bde37b4a35ce5a71eb59078f390dae9 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 15:12:32 +0000 Subject: [PATCH 08/22] core: upgrade deps Signed-off-by: Julien Breux --- go.mod | 70 +++++++++++++++++++++++++-------------------- go.sum | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 3b8b7e3..82e5811 100644 --- a/go.mod +++ b/go.mod @@ -4,67 +4,77 @@ go 1.21.3 require ( github.com/stretchr/testify v1.8.4 - github.com/testcontainers/testcontainers-go v0.27.0 + github.com/testcontainers/testcontainers-go v0.28.0 microcks.io/go-client v0.1.0 ) require ( dario.cat/mergo v1.0.0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.4 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/containerd/containerd v1.7.11 // indirect + github.com/containerd/containerd v1.7.13 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deepmap/oapi-codegen v1.16.2 // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/docker v25.0.3+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/getkin/kin-openapi v0.118.0 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/swag v0.19.5 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/getkin/kin-openapi v0.123.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/swag v0.22.9 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/invopop/yaml v0.1.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/invopop/yaml v0.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/klauspost/compress v1.17.6 // indirect + github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.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/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/oapi-codegen/runtime v1.0.0 // indirect + github.com/oapi-codegen/runtime v1.1.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.5 // indirect - github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.11 // indirect + github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // 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 - golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.12.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.31.0 // indirect + github.com/stretchr/objx v0.5.1 // indirect + github.com/tklauser/go-sysconf v0.3.13 // indirect + github.com/tklauser/numcpus v0.7.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect + go.opentelemetry.io/otel v1.23.1 // indirect + go.opentelemetry.io/otel/metric v1.23.1 // indirect + go.opentelemetry.io/otel/trace v1.23.1 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/grpc v1.61.1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 35ac15f..ae8e7cb 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9 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/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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= @@ -20,6 +22,8 @@ github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2u github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.7.11 h1:lfGKw3eU35sjV0aG2eYZTiwFEY1pCzxdzicHP3SZILw= github.com/containerd/containerd v1.7.11/go.mod h1:5UluHxHTX2rdvYuZ5OJTC5m/KJNs0Zs9wVoJm9zf5ZE= +github.com/containerd/containerd v1.7.13 h1:wPYKIeGMN8vaggSKuV1X0wZulpMz4CrgEsZdaCyB6Is= +github.com/containerd/containerd v1.7.13/go.mod h1:zT3up6yTRfEUa6+GsITYIJNgSVL9NQ4x4h1RPzk0Wu4= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -34,24 +38,45 @@ 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/deepmap/oapi-codegen v1.16.2 h1:xGHx0dNqYfy9gE8a7AVgVM8Sd5oF9SEgePzP+UPAUXI= github.com/deepmap/oapi-codegen v1.16.2/go.mod h1:rdYoEA2GE+riuZ91DvpmBX9hJbQpuY9wchXpfQ3n+ho= +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/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= +github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +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.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= 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.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8= +github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -69,9 +94,13 @@ 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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= +github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= @@ -79,15 +108,21 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 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/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed h1:036IscGBfJsFIgJQzlui7nK1Ncm0tp2ktmPj8xO4N/0= +github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -99,6 +134,8 @@ github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YO github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= 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/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= @@ -108,28 +145,39 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= 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-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +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/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= 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/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig= +github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ= github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= 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= @@ -142,21 +190,30 @@ github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKk 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/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/testcontainers/testcontainers-go v0.27.0 h1:IeIrJN4twonTDuMuBNQdKZ+K97yd7VrmNGu+lDpYcDk= github.com/testcontainers/testcontainers-go v0.27.0/go.mod h1:+HgYZcd17GshBUZv9b+jKFJ198heWPQq3KQIp2+N+7U= +github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8= +github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU= 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/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= +github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= +github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= @@ -169,17 +226,31 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= +go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= +go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= +go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= +go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= +go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= +go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= 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/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 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.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.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= @@ -187,11 +258,14 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= 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/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 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-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -207,36 +281,51 @@ golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/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 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= 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.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= 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/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/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= 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/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 14bc5b3365b594de399660a3b7c2e5744a7245db Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Mon, 19 Feb 2024 15:42:32 +0000 Subject: [PATCH 09/22] core: upgrade deps Signed-off-by: Julien Breux --- go.mod | 68 ++++++++++++------------ go.sum | 161 ++++++++++++--------------------------------------------- 2 files changed, 64 insertions(+), 165 deletions(-) diff --git a/go.mod b/go.mod index 82e5811..d2e9b87 100644 --- a/go.mod +++ b/go.mod @@ -10,35 +10,34 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // 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/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/containerd/containerd v1.7.13 // 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/davecgh/go-spew v1.1.1 // indirect github.com/deepmap/oapi-codegen v1.16.2 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v25.0.3+incompatible // indirect + github.com/docker/docker v25.0.2+incompatible // 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.4 // indirect - github.com/getkin/kin-openapi v0.123.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/getkin/kin-openapi v0.118.0 // 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.3.0 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.19.5 // 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/invopop/yaml v0.2.0 // indirect + github.com/invopop/yaml v0.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/compress v1.17.6 // indirect - github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/moby/patternmatcher v0.6.0 // indirect @@ -47,34 +46,31 @@ require ( github.com/moby/term v0.5.0 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/oapi-codegen/runtime v1.1.1 // indirect + github.com/oapi-codegen/runtime v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.5 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/shirou/gopsutil/v3 v3.24.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/stretchr/objx v0.5.1 // indirect - github.com/tklauser/go-sysconf v0.3.13 // indirect - github.com/tklauser/numcpus v0.7.0 // indirect - github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect - go.opentelemetry.io/otel v1.23.1 // indirect - go.opentelemetry.io/otel/metric v1.23.1 // indirect - go.opentelemetry.io/otel/trace v1.23.1 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/grpc v1.61.1 // indirect - google.golang.org/protobuf v1.32.0 // 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.12.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.12.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.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index ae8e7cb..9b7679e 100644 --- a/go.sum +++ b/go.sum @@ -4,9 +4,6 @@ github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9 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/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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= @@ -17,22 +14,14 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= 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/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.7.11 h1:lfGKw3eU35sjV0aG2eYZTiwFEY1pCzxdzicHP3SZILw= -github.com/containerd/containerd v1.7.11/go.mod h1:5UluHxHTX2rdvYuZ5OJTC5m/KJNs0Zs9wVoJm9zf5ZE= -github.com/containerd/containerd v1.7.13 h1:wPYKIeGMN8vaggSKuV1X0wZulpMz4CrgEsZdaCyB6Is= -github.com/containerd/containerd v1.7.13/go.mod h1:zT3up6yTRfEUa6+GsITYIJNgSVL9NQ4x4h1RPzk0Wu4= +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/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 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/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= 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= @@ -40,67 +29,46 @@ github.com/deepmap/oapi-codegen v1.16.2 h1:xGHx0dNqYfy9gE8a7AVgVM8Sd5oF9SEgePzP+ github.com/deepmap/oapi-codegen v1.16.2/go.mod h1:rdYoEA2GE+riuZ91DvpmBX9hJbQpuY9wchXpfQ3n+ho= 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/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= -github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/docker v25.0.2+incompatible h1:/OaKeauroa10K4Nqavw4zlhcDq/WBcPMc5DbjOGgozY= +github.com/docker/docker v25.0.2+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.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= 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.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +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/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= -github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8= -github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= -github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 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.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +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/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= -github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= @@ -108,21 +76,14 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= -github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 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/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed h1:036IscGBfJsFIgJQzlui7nK1Ncm0tp2ktmPj8xO4N/0= -github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -131,7 +92,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 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/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= 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= @@ -142,190 +102,133 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= -github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= -github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= 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-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -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/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= -github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= -github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= 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/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig= -github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ= -github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= -github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= +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/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= 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/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 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.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/testcontainers/testcontainers-go v0.27.0 h1:IeIrJN4twonTDuMuBNQdKZ+K97yd7VrmNGu+lDpYcDk= -github.com/testcontainers/testcontainers-go v0.27.0/go.mod h1:+HgYZcd17GshBUZv9b+jKFJ198heWPQq3KQIp2+N+7U= github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8= github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU= 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/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= -github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= -github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= 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= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= -go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= -go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= -go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= -go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= -go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= -go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= +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/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 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.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.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.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= 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/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= 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-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/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-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/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 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= 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/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= 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.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= 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/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= 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/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From c25436418d9af55ba27c4feb9a6ff1f03ea28343 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 08:49:34 +0000 Subject: [PATCH 10/22] =?UTF-8?q?fix:=20revert=20ForLog=20value=20?= =?UTF-8?q?=F0=9F=A4=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julien Breux --- microcks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microcks.go b/microcks.go index d791e3a..935eaf7 100644 --- a/microcks.go +++ b/microcks.go @@ -48,7 +48,7 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize req := testcontainers.ContainerRequest{ Image: defaultImage, ExposedPorts: []string{DefaultHttpPort, DefaultGrpcPort}, - WaitingFor: wait.ForLog("Started Microcks application"), + WaitingFor: wait.ForLog("Started MicrocksApplication"), } genericContainerReq := testcontainers.GenericContainerRequest{ ContainerRequest: req, From ded879bb55dc5ee9150cb5231de5c3bd17bb2982 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 09:13:22 +0000 Subject: [PATCH 11/22] fix: importArtifact check error Signed-off-by: Julien Breux --- microcks.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/microcks.go b/microcks.go index 935eaf7..11d01fe 100644 --- a/microcks.go +++ b/microcks.go @@ -290,6 +290,9 @@ func (container *MicrocksContainer) importArtifact(ctx context.Context, artifact } response, err := c.UploadArtifactWithBody(ctx, nil, writer.FormDataContentType(), body) + if err != nil { + return 0, err + } return response.StatusCode, err } From 2371fbcd72b9b6257c40c0f197faedb6b8fc862d Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 09:15:33 +0000 Subject: [PATCH 12/22] fix: use PostReadies hook instead of PostStarts Signed-off-by: Julien Breux --- microcks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microcks.go b/microcks.go index 11d01fe..91e3958 100644 --- a/microcks.go +++ b/microcks.go @@ -86,7 +86,7 @@ func WithSecondaryArtifact(artifactFilePath string) testcontainers.CustomizeRequ func WithArtifact(artifactFilePath string, main bool) testcontainers.CustomizeRequestOption { return func(req *testcontainers.GenericContainerRequest) { hooks := testcontainers.ContainerLifecycleHooks{ - PostStarts: []testcontainers.ContainerHook{ + PostReadies: []testcontainers.ContainerHook{ importArtifactHook(artifactFilePath, main), }, } From 00bcdef8b3bdc94b0894c265649450fe7846f0d6 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 09:47:10 +0000 Subject: [PATCH 13/22] fix: Postman for Ensemble Signed-off-by: Julien Breux --- ensemble/postman/postman.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ensemble/postman/postman.go b/ensemble/postman/postman.go index 65c97b1..121d27b 100644 --- a/ensemble/postman/postman.go +++ b/ensemble/postman/postman.go @@ -11,7 +11,7 @@ const ( defaultImage = "quay.io/microcks/microcks-postman-runtime:latest" // DefaultHTTPPort represents the default Postman HTTP port - DefaultHTTPPort = "6000/tcp" + DefaultHTTPPort = "3000/tcp" ) // PostmanContainer represents the Postman container type used in the ensemble. @@ -25,7 +25,7 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize ContainerRequest: testcontainers.ContainerRequest{ Image: defaultImage, ExposedPorts: []string{DefaultHTTPPort}, - WaitingFor: wait.ForLog("Started Postman"), + WaitingFor: wait.ForLog("Microcks postman-runtime wrapper listening on port: 3000"), }, Started: true, } From e18fc76ae01bfbab996b33f08c6ead05ba1ebcee Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 09:55:28 +0000 Subject: [PATCH 14/22] feat: add WithPostmanImage and WithMicrocksImage funcs to ensemble Signed-off-by: Julien Breux --- README.md | 5 +++++ ensemble/ensemble.go | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index 62d5f8d..f7a7121 100644 --- a/README.md +++ b/README.md @@ -170,9 +170,14 @@ import ( ) ensembleContainers, err := ensemble.RunContainers(ctx, + // Microcks container in ensemble + ensemble.WithMicrocksImage("quay.io/microcks/microcks-uber:latest"), // Optional ensemble.WithMainArtifact("testdata/apipastries-openapi.yaml"), ensemble.WithSecondaryArtifact("testdata/apipastries-postman-collection.json"), + + // Postman container in ensemble ensemble.WithPostman(true), + ensemble.WithPostmanImage("quay.io/microcks/microcks-postman-runtime:latest"), // Optional ) ``` diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index c90b4ba..a29d933 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -158,3 +158,19 @@ func WithPostman(enable bool) Option { return nil } } + +// WithPostmanImage helps to use specific Postman image +func WithPostmanImage(image string) Option { + return func(e *MicrocksContainersEnsemble) error { + e.postmanContainerOptions.Add(testcontainers.WithImage(image)) + return nil + } +} + +// WithMicrocksImage helps to use specific Microcks image +func WithMicrocksImage(image string) Option { + return func(e *MicrocksContainersEnsemble) error { + e.postmanContainerOptions.Add(testcontainers.WithImage(image)) + return nil + } +} From fcb2dcca76bc8f256b9ba1716628cf9063548b8b Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 14:31:05 +0000 Subject: [PATCH 15/22] feat: add GetNetwork to ensemble Signed-off-by: Julien Breux --- ensemble/ensemble.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index a29d933..be6ddcf 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -40,6 +40,11 @@ type MicrocksContainersEnsemble struct { postmanContainerOptions ContainerOptions } +// GetNetwork returns the ensemble network +func (ec *MicrocksContainersEnsemble) GetNetwork() *testcontainers.DockerNetwork { + return ec.network +} + // GetMicrocksContainer returns the Microcks container func (ec *MicrocksContainersEnsemble) GetMicrocksContainer() *microcks.MicrocksContainer { return ec.microcksContainer From 235b54e4cd80cbee3f97979b7cc476f1dfa1faa7 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 16:40:36 +0000 Subject: [PATCH 16/22] test: add ensemble Signed-off-by: Julien Breux --- ensemble/ensemble_test.go | 57 ++++++++++++++++++++++++++++++++++----- internal/test/helper.go | 42 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 6 deletions(-) diff --git a/ensemble/ensemble_test.go b/ensemble/ensemble_test.go index 788e655..3663fc3 100644 --- a/ensemble/ensemble_test.go +++ b/ensemble/ensemble_test.go @@ -5,6 +5,8 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" "microcks.io/testcontainers-go/ensemble" "microcks.io/testcontainers-go/internal/test" ) @@ -32,20 +34,63 @@ func TestMockingFunctionalityAtStartup(t *testing.T) { func TestPostmanContractTestingFunctionality(t *testing.T) { ctx := context.Background() - ec, err := ensemble.RunContainers(ctx, + // Ensemble + ec, err := ensemble.RunContainers( + ctx, ensemble.WithMainArtifact("../testdata/apipastries-openapi.yaml"), - ensemble.WithSecondaryArtifact("../testdata/apipastries-postman-collection.json"), ensemble.WithPostman(true), ) require.NoError(t, err) + networkName := ec.GetNetwork().Name + + // Demo pastry bad implementation + badImpl, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: "quay.io/microcks/contract-testing-demo:02", + Networks: []string{networkName}, + NetworkAliases: map[string][]string{ + networkName: {"bad-impl"}, + }, + WaitingFor: wait.ForLog("Example app listening on port 3002"), + }, + Started: true, + }) + require.NoError(t, err) + + // Demo pastry good implementation + goodImpl, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: testcontainers.ContainerRequest{ + Image: "quay.io/microcks/contract-testing-demo:03", + Networks: []string{networkName}, + NetworkAliases: map[string][]string{ + networkName: {"good-impl"}, + }, + WaitingFor: wait.ForLog("Example app listening on port 3003"), + }, + Started: true, + }) + require.NoError(t, err) + + // Cleanup containers t.Cleanup(func() { - if err := ec.Terminate(ctx); err != nil { + if err := ec.GetMicrocksContainer().Terminate(ctx); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + if err := badImpl.Terminate(ctx); err != nil { + t.Fatalf("failed to terminate container: %s", err) + } + if err := goodImpl.Terminate(ctx); err != nil { t.Fatalf("failed to terminate container: %s", err) } }) + // Tests & assertions test.ConfigRetrieval(t, ctx, ec.GetMicrocksContainer()) - test.MockEndpoints(t, ctx, ec.GetMicrocksContainer()) - - test.MicrocksMockingFunctionality(t, ctx, ec.GetMicrocksContainer()) + test.MicrocksContractTestingFunctionality( + t, + ctx, + ec.GetMicrocksContainer(), + badImpl, + goodImpl, + ) } diff --git a/internal/test/helper.go b/internal/test/helper.go index 497139e..5acc692 100644 --- a/internal/test/helper.go +++ b/internal/test/helper.go @@ -137,6 +137,48 @@ func AssertGoodImplementation(t *testing.T, ctx context.Context, microcksContain } } +// MicrocksContractTestingFunctionality helps to assert contract testing functionality +func MicrocksContractTestingFunctionality( + t *testing.T, + ctx context.Context, + mc *microcks.MicrocksContainer, + badImpl, + goodImpl testcontainers.Container) { + + // Bad implementation + testRequestBad := client.TestRequest{ + ServiceId: "API Pastries:0.0.1", + RunnerType: client.TestRunnerTypePOSTMAN, + TestEndpoint: "http://bad-impl:3002", + Timeout: 5000, + } + testResultBad, errBad := mc.TestEndpoint(ctx, &testRequestBad) + require.NoError(t, errBad) + require.False(t, testResultBad.Success) + require.Equal(t, "http://bad-impl:3002", testResultBad.TestedEndpoint) + require.Equal(t, 3, len(*testResultBad.TestCaseResults)) + for _, r := range *testResultBad.TestCaseResults { + require.False(t, r.Success) + } + + // Good implementation + testRequestGood := client.TestRequest{ + ServiceId: "API Pastries:0.0.1", + RunnerType: client.TestRunnerTypePOSTMAN, + TestEndpoint: "http://good-impl:3003", + Timeout: 5000, + } + testResultGood, errGood := mc.TestEndpoint(ctx, &testRequestGood) + require.NoError(t, errGood) + require.True(t, testResultGood.Success) + require.Equal(t, "http://good-impl:3003", testResultGood.TestedEndpoint) + require.Equal(t, 3, len(*testResultGood.TestCaseResults)) + for _, r := range *testResultGood.TestCaseResults { + require.True(t, r.Success) + } + // TODO: Assert messages +} + // Deprecated: use testcontainers.WithNetwork once it's released. // WithNetwork is a custom request option that adds a network to a container. // This is a temporary option until the next release of testcontainers-go, which will include From 9650bc443bc59550f4f4643c23144865d1f82082 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 16:42:26 +0000 Subject: [PATCH 17/22] test: add missing secondary artifact Signed-off-by: Julien Breux --- ensemble/ensemble_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ensemble/ensemble_test.go b/ensemble/ensemble_test.go index 3663fc3..b4af2c9 100644 --- a/ensemble/ensemble_test.go +++ b/ensemble/ensemble_test.go @@ -38,6 +38,7 @@ func TestPostmanContractTestingFunctionality(t *testing.T) { ec, err := ensemble.RunContainers( ctx, ensemble.WithMainArtifact("../testdata/apipastries-openapi.yaml"), + ensemble.WithSecondaryArtifact("../testdata/apipastries-postman-collection.json"), ensemble.WithPostman(true), ) require.NoError(t, err) From 4c4224c50d90deb22b86c1d3ea747c5674f78278 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 16:51:10 +0000 Subject: [PATCH 18/22] doc: fix example Signed-off-by: Julien Breux --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f7a7121..87f1c79 100644 --- a/README.md +++ b/README.md @@ -187,8 +187,8 @@ You can execute a `POSTMAN` test using an ensemble that way: // Build a new TestRequest. testRequest := client.TestRequest{ ServiceId: "API Pastries:0.0.1", - RunnerType: client.TestRunnerTypeOPENAPISCHEMA, - TestEndpoint: "http://good-impl:3001", + RunnerType: client.TestRunnerTypePOSTMAN, + TestEndpoint: "http://good-impl:3003", Timeout: 2000, } From fde827547000c1d6cf29bbdfc34044391beca26c Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 16:58:33 +0000 Subject: [PATCH 19/22] fix: network alias system on ensemble Signed-off-by: Julien Breux --- ensemble/ensemble.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index be6ddcf..3fb0b36 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -10,7 +10,8 @@ import ( ) const ( - defaultNetworkAlias = "microcks" + defaultNetworkAliasMicrocks = "microcks" + defaultNetworkAliasPostman = "postman" ) // Option represents an option to pass to the ensemble @@ -116,9 +117,9 @@ func WithDefaultNetwork() Option { } e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) - e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAliasMicrocks)) e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) - e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAliasPostman)) return nil } @@ -129,9 +130,9 @@ func WithNetwork(network *testcontainers.DockerNetwork) Option { return func(e *MicrocksContainersEnsemble) error { e.network = network e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) - e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAliasMicrocks)) e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) - e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAlias)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAliasPostman)) return nil } } From 9c7e43ca578bee5ea6e90e6f202601a9ba5ba8dc Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 17:24:06 +0000 Subject: [PATCH 20/22] fix: helper to enforce tests Signed-off-by: Julien Breux --- internal/test/helper.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/internal/test/helper.go b/internal/test/helper.go index 5acc692..b7bd569 100644 --- a/internal/test/helper.go +++ b/internal/test/helper.go @@ -161,6 +161,13 @@ func MicrocksContractTestingFunctionality( require.False(t, r.Success) } + // Check nil first step result message + t0bad := (*testResultBad.TestCaseResults)[0].TestStepResults + require.NotNil(t, t0bad) + s0bad := (*t0bad)[0] + require.NotNil(t, s0bad) + require.True(t, strings.Contains(*s0bad.Message, "Valid"), "Message not contain Valid word", *s0bad.Message) + // Good implementation testRequestGood := client.TestRequest{ ServiceId: "API Pastries:0.0.1", @@ -176,7 +183,13 @@ func MicrocksContractTestingFunctionality( for _, r := range *testResultGood.TestCaseResults { require.True(t, r.Success) } - // TODO: Assert messages + + // Check nil first step result message + t0good := (*testResultGood.TestCaseResults)[0].TestStepResults + require.NotNil(t, t0good) + s0good := (*t0good)[0] + require.NotNil(t, s0good) + require.Nil(t, s0good.Message) } // Deprecated: use testcontainers.WithNetwork once it's released. From 47f4ad7b0e744334cb6fef8d64fbb5038578ba87 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Tue, 20 Feb 2024 17:27:06 +0000 Subject: [PATCH 21/22] fix: add env condition Signed-off-by: Julien Breux --- ensemble/ensemble.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index 3fb0b36..528de16 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -90,7 +90,9 @@ func RunContainers(ctx context.Context, opts ...Option) (*MicrocksContainersEnse } // Microcks container - ensemble.microcksContainerOptions.Add(microcks.WithEnv("POSTMAN_RUNNER_URL", "http://postman:3000")) + if ensemble.postmanEnabled { + ensemble.microcksContainerOptions.Add(microcks.WithEnv("POSTMAN_RUNNER_URL", "http://postman:3000")) + } ensemble.microcksContainerOptions.Add(microcks.WithEnv("TEST_CALLBACK_URL", "http://microcks:8080")) ensemble.microcksContainer, err = microcks.RunContainer(ctx, ensemble.microcksContainerOptions.list...) if err != nil { From be4e999bb534d5e2b652856f79cb50e2bbfc49a7 Mon Sep 17 00:00:00 2001 From: Julien Breux Date: Wed, 21 Feb 2024 09:43:41 +0000 Subject: [PATCH 22/22] feat: simplify options Signed-off-by: Julien Breux --- README.md | 2 -- ensemble/ensemble.go | 21 ++++++++++----------- ensemble/postman/postman.go | 3 +++ microcks.go | 9 ++++++++- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 87f1c79..7b88ce2 100644 --- a/README.md +++ b/README.md @@ -171,13 +171,11 @@ import ( ensembleContainers, err := ensemble.RunContainers(ctx, // Microcks container in ensemble - ensemble.WithMicrocksImage("quay.io/microcks/microcks-uber:latest"), // Optional ensemble.WithMainArtifact("testdata/apipastries-openapi.yaml"), ensemble.WithSecondaryArtifact("testdata/apipastries-postman-collection.json"), // Postman container in ensemble ensemble.WithPostman(true), - ensemble.WithPostmanImage("quay.io/microcks/microcks-postman-runtime:latest"), // Optional ) ``` diff --git a/ensemble/ensemble.go b/ensemble/ensemble.go index 528de16..2508097 100644 --- a/ensemble/ensemble.go +++ b/ensemble/ensemble.go @@ -2,6 +2,7 @@ package ensemble import ( "context" + "strings" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/network" @@ -9,11 +10,6 @@ import ( "microcks.io/testcontainers-go/ensemble/postman" ) -const ( - defaultNetworkAliasMicrocks = "microcks" - defaultNetworkAliasPostman = "postman" -) - // Option represents an option to pass to the ensemble type Option func(*MicrocksContainersEnsemble) error @@ -91,9 +87,11 @@ func RunContainers(ctx context.Context, opts ...Option) (*MicrocksContainersEnse // Microcks container if ensemble.postmanEnabled { - ensemble.microcksContainerOptions.Add(microcks.WithEnv("POSTMAN_RUNNER_URL", "http://postman:3000")) + postmanRunnerURL := strings.Join([]string{"http://", postman.DefaultNetworkAlias, ":3000"}, "") + ensemble.microcksContainerOptions.Add(microcks.WithEnv("POSTMAN_RUNNER_URL", postmanRunnerURL)) } - ensemble.microcksContainerOptions.Add(microcks.WithEnv("TEST_CALLBACK_URL", "http://microcks:8080")) + testCallbackURL := strings.Join([]string{"http://", microcks.DefaultNetworkAlias, ":8080"}, "") + ensemble.microcksContainerOptions.Add(microcks.WithEnv("TEST_CALLBACK_URL", testCallbackURL)) ensemble.microcksContainer, err = microcks.RunContainer(ctx, ensemble.microcksContainerOptions.list...) if err != nil { return nil, err @@ -119,9 +117,9 @@ func WithDefaultNetwork() Option { } e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) - e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAliasMicrocks)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, microcks.DefaultNetworkAlias)) e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) - e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAliasPostman)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, postman.DefaultNetworkAlias)) return nil } @@ -132,9 +130,9 @@ func WithNetwork(network *testcontainers.DockerNetwork) Option { return func(e *MicrocksContainersEnsemble) error { e.network = network e.microcksContainerOptions.Add(microcks.WithNetwork(e.network.Name)) - e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, defaultNetworkAliasMicrocks)) + e.microcksContainerOptions.Add(microcks.WithNetworkAlias(e.network.Name, microcks.DefaultNetworkAlias)) e.postmanContainerOptions.Add(postman.WithNetwork(e.network.Name)) - e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, defaultNetworkAliasPostman)) + e.postmanContainerOptions.Add(postman.WithNetworkAlias(e.network.Name, postman.DefaultNetworkAlias)) return nil } } @@ -171,6 +169,7 @@ func WithPostman(enable bool) Option { func WithPostmanImage(image string) Option { return func(e *MicrocksContainersEnsemble) error { e.postmanContainerOptions.Add(testcontainers.WithImage(image)) + e.postmanEnabled = true return nil } } diff --git a/ensemble/postman/postman.go b/ensemble/postman/postman.go index 121d27b..699dbbc 100644 --- a/ensemble/postman/postman.go +++ b/ensemble/postman/postman.go @@ -12,6 +12,9 @@ const ( // DefaultHTTPPort represents the default Postman HTTP port DefaultHTTPPort = "3000/tcp" + + // DefaultNetworkAlias represents the default network alias of the the PostmanContainer + DefaultNetworkAlias = "postman" ) // PostmanContainer represents the Postman container type used in the ensemble. diff --git a/microcks.go b/microcks.go index 91e3958..c452bbc 100644 --- a/microcks.go +++ b/microcks.go @@ -33,9 +33,16 @@ import ( ) const ( - defaultImage = "quay.io/microcks/microcks-uber:latest" + defaultImage = "quay.io/microcks/microcks-uber:latest" + + // DefaultHttpPort represents the default Microcks HTTP port DefaultHttpPort = "8080/tcp" + + // DefaultGrpcPort represents the default Microcks GRPC port DefaultGrpcPort = "9090/tcp" + + // DefaultNetworkAlias represents the default network alias of the the MicrocksContainer + DefaultNetworkAlias = "microcks" ) // MicrocksContainer represents the Microcks container type used in the module.