Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Huang committed May 5, 2018
1 parent ec97c99 commit 86f9ea4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/com/unbounce/yopa/aws_client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@
(:subscription-arn
(run-on-sns
#(sns/subscribe
:protocol protocol
{:protocol protocol
:topic-arn topic-arn
:endpoint endpoint))))
:endpoint endpoint}))))

(defn unsubscribe [subscription-arn]
(run-on-sns
#(sns/unsubscribe
:subscription-arn subscription-arn)))
{:subscription-arn subscription-arn})))

(defn set-raw-delivery [subscription-arn]
(run-on-sns
#(sns/set-subscription-attributes
:subscription-arn subscription-arn
{:subscription-arn subscription-arn
:attribute-name "RawMessageDelivery"
:attribute-value true)))
:attribute-value true})))

(defn send-sqs-message [queue-arn message]
(let [queue-url (queue-arn->url queue-arn)]
Expand Down
12 changes: 6 additions & 6 deletions test/com/unbounce/yopa/integration_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
(let [queue-url (aws/queue-name->url queue-name)
receive-result (aws/run-on-sqs
#(sqs/receive-message
:queue-url queue-url
{:queue-url queue-url
:wait-time-seconds 10
:max-number-of-messages 10
:delete true))
:delete true}))
messages (:messages receive-result)]
(is (= 1 (count messages)))
(->> messages first :body)))
Expand All @@ -78,9 +78,9 @@
subject (str "test subject " (rand-int 32768))
message (str "test message " (rand-int 32768))
publish-result (aws/run-on-sns
#(sns/publish :topic-arn topic-arn
#(sns/publish {:topic-arn topic-arn
:subject subject
:message message))
:message message}))
message-id (:message-id publish-result)]
(is (some? message-id))
(let [standard-message (json/read-str
Expand All @@ -95,9 +95,9 @@

(deftest topic-without-subscription-delivery
(let [message-id (aws/run-on-sns
#(sns/publish :topic-arn "arn:aws:sns:yopa-local:000000000000:test-topic-without-subscription"
#(sns/publish {:topic-arn "arn:aws:sns:yopa-local:000000000000:test-topic-without-subscription"
:subject "test subject"
:message "test message"))]
:message "test message"}))]
(is (some? message-id))))

(deftest topic-unsubscribe-success
Expand Down

0 comments on commit 86f9ea4

Please sign in to comment.