Skip to content

Commit eeb16fb

Browse files
committed
Fix warnings about quotes
``` warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead. You may run "mix format --migrate" to fix this warning automatically. │ 43 │ addr = :config.get('couch_httpd', 'bind_address', '127.0.0.1') │ ~ │ └─ test/elixir/lib/step/start.ex:43:24 warning: found quoted keyword "_id" but the quotes are not required. Note that keywords are always atoms, even when quoted. Similar to atoms, keywords made exclusively of ASCII letters, numbers, and underscores and not beginning with a number do not require quotes │ 91 │ docs ++ [%{"_id": "#{doc2._id}", "_rev": att_rev2}] │ ~ │ └─ test/elixir/test/compact_test.exs:91:16 ```
1 parent 57b3774 commit eeb16fb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

test/elixir/lib/step/start.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ defmodule Couch.Test.Setup.Step.Start do
4040
test_config = setup |> Setup.get(:test_config) |> Step.Config.get()
4141
protocol = test_config[:backdoor][:protocol] || "http"
4242
test_ctx = :test_util.start_couch(extra_apps)
43-
addr = :config.get('couch_httpd', 'bind_address', '127.0.0.1')
43+
addr = :config.get("couch_httpd", "bind_address", "127.0.0.1")
4444
port = :mochiweb_socket_server.get(:couch_httpd, :port)
4545
backdoor_url = "#{protocol}://#{addr}:#{port}"
4646
clustered_url =
4747
if :chttpd in extra_apps do
4848
protocol = test_config[:clustered][:protocol] || "http"
49-
addr = :config.get('chttpd', 'bind_address', '127.0.0.1')
49+
addr = :config.get("chttpd", "bind_address", "127.0.0.1")
5050
port = :mochiweb_socket_server.get(:chttpd, :port)
5151
"#{protocol}://#{addr}:#{port}"
5252
else

test/elixir/lib/step/user.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule Couch.Test.Setup.Step.User do
3333

3434
def setup(_setup, %__MODULE__{roles: roles} = step) do
3535
users_db = IO.chardata_to_string(
36-
:config.get('chttpd_auth', 'authentication_db', '_users'))
36+
:config.get("chttpd_auth", "authentication_db", "_users"))
3737
if not Utils.db_exists?(users_db) do
3838
on_exit fn ->
3939
:fabric.delete_db(users_db, [@admin])
@@ -46,7 +46,7 @@ defmodule Couch.Test.Setup.Step.User do
4646
name = Utils.random_name("admin")
4747
pass = Utils.random_password()
4848
:config.set(
49-
'admins', String.to_charlist(name), String.to_charlist(pass), false)
49+
"admins", String.to_charlist(name), String.to_charlist(pass), false)
5050
%{step |
5151
name: name,
5252
password: pass,

test/elixir/test/attachments_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ defmodule AttachmentsTest do
131131
assert resp.status_code in [201, 202]
132132
rev = resp.body["rev"]
133133

134-
resp = Couch.delete("/#{db_name}/bin_doc/foo.txt", body: 'some payload', query: %{w: 3, rev: rev}, ibrowse: [{:max_sessions, 1}, {:max_pipeline_size, 1}])
134+
resp = Couch.delete("/#{db_name}/bin_doc/foo.txt", body: "some payload", query: %{w: 3, rev: rev}, ibrowse: [{:max_sessions, 1}, {:max_pipeline_size, 1}])
135135
assert resp.status_code == 200
136136

137137
resp = Couch.get("/", timeout: 1000, ibrowse: [{:max_sessions, 1}, {:max_pipeline_size, 1}])

test/elixir/test/compact_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ defmodule CompactTest do
8888
assert resp.status_code in [201, 202]
8989

9090
att_rev2 = resp.body["rev"]
91-
docs ++ [%{"_id": "#{doc2._id}", "_rev": att_rev2}]
91+
docs ++ [%{_id: "#{doc2._id}", _rev: att_rev2}]
9292
end
9393

9494
defp delete(db, docs) do

0 commit comments

Comments
 (0)