Skip to content

Commit

Permalink
Fix init in sqssns + Docker Compose update (#3498)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <[email protected]>
  • Loading branch information
artursouza authored Aug 1, 2024
1 parent bffaeeb commit 12d7c2b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions pubsub/aws/snssqs/snssqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 8 additions & 4 deletions tests/certification/flow/dockercompose/dockercompose.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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()
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions tests/certification/pubsub/pulsar/pulsar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/certification/state/cockroachdb/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 12d7c2b

Please sign in to comment.