From 12d7c2ba4f899e62bd297f1aa43748a1992a04ea Mon Sep 17 00:00:00 2001 From: Artur Souza Date: Thu, 1 Aug 2024 15:43:27 -0700 Subject: [PATCH] Fix init in sqssns + Docker Compose update (#3498) Signed-off-by: Artur Souza --- pubsub/aws/snssqs/snssqs.go | 1 + .../flow/dockercompose/dockercompose.go | 12 ++++++++---- tests/certification/pubsub/pulsar/pulsar_test.go | 4 ++-- tests/certification/state/cockroachdb/v1/README.md | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pubsub/aws/snssqs/snssqs.go b/pubsub/aws/snssqs/snssqs.go index 9ec22ef43b..501a7344aa 100644 --- a/pubsub/aws/snssqs/snssqs.go +++ b/pubsub/aws/snssqs/snssqs.go @@ -172,6 +172,7 @@ func (s *snsSqs) Init(ctx context.Context, metadata pubsub.Metadata) error { s.queues = make(map[string]*sqsQueueInfo) s.subscriptions = make(map[string]string) + s.topicArns = make(map[string]string) return nil } diff --git a/tests/certification/flow/dockercompose/dockercompose.go b/tests/certification/flow/dockercompose/dockercompose.go index afa8822148..83bb243b4e 100644 --- a/tests/certification/flow/dockercompose/dockercompose.go +++ b/tests/certification/flow/dockercompose/dockercompose.go @@ -49,7 +49,8 @@ func Up(project, filename string) flow.Runnable { func (c Compose) Up(ctx flow.Context) error { out, err := exec.Command( - "docker-compose", + "docker", + "compose", "-p", c.project, "-f", c.filename, "up", "-d", @@ -65,7 +66,8 @@ func Down(project, filename string) flow.Runnable { func (c Compose) Down(ctx flow.Context) error { out, err := exec.Command( - "docker-compose", + "docker", + "compose", "-p", c.project, "-f", c.filename, "down", "-v").CombinedOutput() @@ -81,12 +83,13 @@ func Start(project, filename string, services ...string) flow.Runnable { func (c Compose) Start(services ...string) flow.Runnable { return func(ctx flow.Context) error { args := []string{ + "compose", "-p", c.project, "-f", c.filename, "start", } args = append(args, services...) - out, err := exec.Command("docker-compose", args...).CombinedOutput() + out, err := exec.Command("docker", args...).CombinedOutput() ctx.Log(string(out)) return err } @@ -99,12 +102,13 @@ func Stop(project, filename string, services ...string) flow.Runnable { func (c Compose) Stop(services ...string) flow.Runnable { return func(ctx flow.Context) error { args := []string{ + "compose", "-p", c.project, "-f", c.filename, "stop", } args = append(args, services...) - out, err := exec.Command("docker-compose", args...).CombinedOutput() + out, err := exec.Command("docker", args...).CombinedOutput() ctx.Log(string(out)) return err } diff --git a/tests/certification/pubsub/pulsar/pulsar_test.go b/tests/certification/pubsub/pulsar/pulsar_test.go index 93f590d2d7..c8578dbb53 100644 --- a/tests/certification/pubsub/pulsar/pulsar_test.go +++ b/tests/certification/pubsub/pulsar/pulsar_test.go @@ -123,7 +123,7 @@ func TestPulsar(t *testing.T) { t.Log("Starting OAuth2 server...") out, err := exec.Command( - "docker-compose", + "docker", "compose", "-p", "oauth2", "-f", dockerComposeMockOAuth2YAML, "up", "-d").CombinedOutput() @@ -133,7 +133,7 @@ func TestPulsar(t *testing.T) { t.Cleanup(func() { t.Log("Stopping OAuth2 server...") out, err = exec.Command( - "docker-compose", + "docker", "compose", "-p", "oauth2", "-f", dockerComposeMockOAuth2YAML, "down", "-v", diff --git a/tests/certification/state/cockroachdb/v1/README.md b/tests/certification/state/cockroachdb/v1/README.md index 74de6596ab..ea41c763cb 100644 --- a/tests/certification/state/cockroachdb/v1/README.md +++ b/tests/certification/state/cockroachdb/v1/README.md @@ -7,7 +7,7 @@ The purpose of this module is to provide tests that certify the CockroachDB Stat ## Connection Test * Verify the connection is established to CockroachDB. * Create component spec. - * Run the component with docker-compose + * Run the component with docker compose * Run dapr application with component. * Ensure that you have access to the queue and connection to the queue is established.