summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2019-01-30 11:53:28 +0200
committergarren smith <garren.smith@gmail.com>2019-01-31 12:22:17 +0200
commit7918fba2a5b5ce416e6a7b4ce7cc93261ec57de4 (patch)
treed0f84acc0e8cfbe55bc9c01ff9842d575c0a2368
parent5be58a6ca9ab49668730e7b7150d515df62869f2 (diff)
downloadcouchdb-7918fba2a5b5ce416e6a7b4ce7cc93261ec57de4.tar.gz
Change enviromental variables not to clash with travis
Creates EX_USERNAME, EX_PASSWORD and EX_COUCH_URL to manage the elixir test setup.
-rw-r--r--test/elixir/README.md2
-rw-r--r--test/elixir/lib/couch.ex6
2 files changed, 4 insertions, 4 deletions
diff --git a/test/elixir/README.md b/test/elixir/README.md
index 20e01903b..8300fa101 100644
--- a/test/elixir/README.md
+++ b/test/elixir/README.md
@@ -17,7 +17,7 @@ By default the Elixir tests require CouchDB running at http://127.0.0.1:15984 wi
You can override those using the following:
```
-$ USER=myusername PASS=password COUCH_URL=http://my-couchdb.com mix test
+$ EX_USERNAME=myusername EX_PASSWORD=password EX_COUCH_URL=http://my-couchdb.com mix test
```
## Tests to port
diff --git a/test/elixir/lib/couch.ex b/test/elixir/lib/couch.ex
index c4e218f23..58581b2fd 100644
--- a/test/elixir/lib/couch.ex
+++ b/test/elixir/lib/couch.ex
@@ -55,7 +55,7 @@ defmodule Couch do
end
def process_url(url) do
- base_url = System.get_env("COUCH_URL") || "http://127.0.0.1:15984"
+ base_url = System.get_env("EX_COUCH_URL") || "http://127.0.0.1:15984"
base_url <> url
end
@@ -85,8 +85,8 @@ defmodule Couch do
if headers[:basic_auth] != nil or headers[:authorization] != nil do
options
else
- username = System.get_env("USER") || "adm"
- password = System.get_env("PASS") || "pass"
+ username = System.get_env("EX_USERNAME") || "adm"
+ password = System.get_env("EX_PASSWORD") || "pass"
Keyword.put(options, :basic_auth, {username, password})
end
else