-
Notifications
You must be signed in to change notification settings - Fork 62
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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 |
There was a problem hiding this comment.
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
client = | ||
if sink.endpoint do | ||
client | ||
|> Map.put(:endpoint, sink.endpoint) | ||
|> Map.put(:proto, sink.proto) | ||
else | ||
client | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inspect
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) |
There was a problem hiding this comment.
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?
No description provided.