Skip to content

Commit 6165e6e

Browse files
committed
src: replace boolean-to-str function with str
1 parent 6d7b6ff commit 6165e6e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/tarantool/db.clj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@
187187
(c/su (c/exec :dpkg :--purge :--force-all :tarantool))
188188
(c/su (c/exec :dpkg :--configure :-a)))
189189

190-
(defn boolean-to-str
191-
[b]
192-
(if (true? b) "true" "false"))
193-
194190
(defn is-single-mode?
195191
[test]
196192
(let [n (count (:nodes test))]
@@ -226,8 +222,8 @@
226222
(str/replace #"%TARANTOOL_QUORUM%" (str (calculate-quorum test)))
227223
(str/replace #"%TARANTOOL_IP_ADDRESS%" node)
228224
(str/replace #"%TARANTOOL_REPLICATION%" (replica-set test))
229-
(str/replace #"%TARANTOOL_MVCC%" (boolean-to-str (:mvcc test)))
230-
(str/replace #"%TARANTOOL_SINGLE_MODE%" (boolean-to-str (is-single-mode? test)))
225+
(str/replace #"%TARANTOOL_MVCC%" (str (:mvcc test)))
226+
(str/replace #"%TARANTOOL_SINGLE_MODE%" (str (is-single-mode? test)))
231227
(str/replace #"%TARANTOOL_DATA_ENGINE%" (:engine test)))
232228
:> "/etc/tarantool/instances.enabled/jepsen.lua")
233229
(c/exec :cp "/etc/tarantool/instances.enabled/jepsen.lua" "/etc/tarantool/instances.available"))

0 commit comments

Comments
 (0)