Skip to content

feat: support e2e sqs using localstack mock #1824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: support e2e sqs using localstack mock #1824

wants to merge 4 commits into from

Conversation

abc3
Copy link
Contributor

@abc3 abc3 commented Jun 16, 2025

No description provided.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. sqs labels Jun 16, 2025
@@ -18,15 +18,18 @@ defmodule Sequin.Consumers.SqsSink do
field :access_key_id, :string
field :secret_access_key, Encrypted.Field
field :is_fifo, :boolean, default: false
field :endpoint, :string
field :proto, :string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use scheme elsewhere to match URI

Comment on lines +70 to +77
client =
if sink.endpoint do
client
|> Map.put(:endpoint, sink.endpoint)
|> Map.put(:proto, sink.proto)
else
client
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +99 to +105
AWS_ENDPOINT: http://localstack:4566
AWS_NO_VERIFY_SSL: "1"
AWS_DISABLE_SSL: "1"
AWS_SDK_LOAD_CONFIG: "0"
AWS_ACCESS_KEY_ID: "test"
AWS_SECRET_ACCESS_KEY: "test"
AWS_DEFAULT_REGION: "us-east-1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, are all these env vars actually used?

describe "sqs integration" do
@tag :sqs
test "changes are streamed to sqs", %{conn: conn, tid: tid, queue_url: queue_url, aws_client: client} do
IO.inspect(queue_url)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inspect

Comment on lines +170 to +175
e2e-test: ## Run the e2e test suite with specific tag: make e2e-test tag=kafka
@if [ -z "$(tag)" ]; then \
echo "Usage: make e2e-test tag=<tag-name> (available tags: kafka, sqs)"; \
exit 1; \
fi
cd priv/tests_e2e && elixir tests.exs $(tag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool - so this runs a specific, and the one above runs all?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. sqs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants