File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
test/taoensso/faraday/tests Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 107107 Get]
108108
109109 com.amazonaws.ClientConfiguration
110+ com.amazonaws.Protocol
110111 com.amazonaws.auth.AWSCredentials
111112 com.amazonaws.auth.AWSCredentialsProvider
112113 com.amazonaws.auth.BasicAWSCredentials
132133(defn- client-params
133134 [{:as client-opts
134135 :keys [provider creds access-key secret-key proxy-host proxy-port
135- proxy-username proxy-password
136- conn-timeout max-conns max- error-retry socket-timeout keep-alive?]}]
136+ proxy-username proxy-password conn-timeout max-conns
137+ max-error-retry socket-timeout keep-alive? protocol ]}]
137138
138139 (let [creds (or creds (:credentials client-opts)) ; Deprecated opt
139140
148149
149150 ^AWSCredentialsProvider provider
150151 (or provider (when-not aws-creds (DefaultAWSCredentialsProviderChain. )))
152+ proto (Protocol/valueOf (name (or protocol :HTTPS )))
151153
152154 client-config
153155 (doto-cond [g (ClientConfiguration. )]
159161 max-conns (.setMaxConnections g)
160162 max-error-retry (.setMaxErrorRetry g)
161163 socket-timeout (.setSocketTimeout g)
162- keep-alive? (.setUseTcpKeepAlive g))]
164+ keep-alive? (.setUseTcpKeepAlive g)
165+ proto (.setProtocol g))]
163166
164167 [aws-creds provider client-config]))
165168
Original file line number Diff line number Diff line change 7070
7171(deftest client-creation
7272 (is (#'far/db-client (assoc *client-opts* :region " us-east-1" )))
73- (is (#'far/db-client (assoc *client-opts* :endpoint " http://localhost:6798" ))))
73+ (is (#'far/db-client (assoc *client-opts* :endpoint " http://localhost:6798" )))
74+ (is (#'far/db-client (assoc *client-opts* :protocol " HTTP" )))
75+ (is (#'far/db-client (assoc *client-opts* :protocol " HTTPS" )))
76+ (is (thrown? IllegalArgumentException
77+ (#'far/db-client (assoc *client-opts* :protocol " random" )))))
7478
7579(deftest basic-api
7680 (let [i0 {:id 0 :name " foo" }
You can’t perform that action at this time.
0 commit comments