Skip to content

Commit

Permalink
Merge pull request #103 from RyanWillDev/fix/attribute-naming
Browse files Browse the repository at this point in the history
Supports Localstack topic creation
  • Loading branch information
bernardd authored Sep 10, 2024
2 parents e2128f0 + 27e7a3f commit ec2bcc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/ex_aws/sns.ex
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ defmodule ExAws.SNS do
prefix = "Attributes.entry.#{index}."

%{}
|> Map.put(prefix <> "name", format_param_key(name))
|> Map.put(prefix <> "key", format_param_key(name))
|> Map.put(prefix <> "value", value)
end

Expand Down
8 changes: 4 additions & 4 deletions test/lib/sns_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule ExAws.SNSTest do
expected = %{
"Action" => "CreateTopic",
"Name" => "test_topic.fifo",
"Attributes.entry.1.name" => "FifoTopic",
"Attributes.entry.1.key" => "FifoTopic",
"Attributes.entry.1.value" => true
}

Expand Down Expand Up @@ -494,11 +494,11 @@ defmodule ExAws.SNSTest do
test "#set_endpoint_attributes" do
expected = %{
"Action" => "SetEndpointAttributes",
"Attributes.entry.1.name" => "Token",
"Attributes.entry.1.key" => "Token",
"Attributes.entry.1.value" => "1234",
"Attributes.entry.2.name" => "Enabled",
"Attributes.entry.2.key" => "Enabled",
"Attributes.entry.2.value" => false,
"Attributes.entry.3.name" => "CustomUserData",
"Attributes.entry.3.key" => "CustomUserData",
"Attributes.entry.3.value" => "blah",
"EndpointArn" => "test-endpoint-arn"
}
Expand Down

0 comments on commit ec2bcc4

Please sign in to comment.