summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBessenyei Balázs Donát <bessbd@users.noreply.github.com>2021-03-30 11:07:00 +0200
committerGitHub <noreply@github.com>2021-03-30 11:07:00 +0200
commitcfe2fd3a4420ec451746dc57aac506069de5fc38 (patch)
tree7f630eb155b50058674857848157f974e34e1829
parentacb43e12fd7fddc6f606246875909f7c7df27324 (diff)
downloadcouchdb-cfe2fd3a4420ec451746dc57aac506069de5fc38.tar.gz
Refactor config_test.exs (#3465)
-rw-r--r--test/elixir/test/config/skip.elixir5
-rw-r--r--test/elixir/test/config_test.exs12
2 files changed, 3 insertions, 14 deletions
diff --git a/test/elixir/test/config/skip.elixir b/test/elixir/test/config/skip.elixir
index 88263e48e..21cda1eaf 100644
--- a/test/elixir/test/config/skip.elixir
+++ b/test/elixir/test/config/skip.elixir
@@ -45,16 +45,13 @@
"ConfigTest": [
"Atoms, binaries, and strings suffice as whitelist sections and keys.",
"Blacklist is functional",
- "CouchDB respects configured protocols",
"Keys not in the whitelist may not be modified",
"Non-2-tuples in the whitelist are ignored",
"Non-list whitelist values allow further modification of the whitelist",
"Non-term whitelist values allow further modification of the whitelist",
- "PORT `BUGGED` ?raw tests from config.js",
"Reload config",
"Server-side password hashing, and raw updates disabling that",
- "Settings can be altered with undefined whitelist allowing any change",
- "Standard config options are present"
+ "Settings can be altered with undefined whitelist allowing any change"
],
"CookieAuthTest": [
"cookie auth"
diff --git a/test/elixir/test/config_test.exs b/test/elixir/test/config_test.exs
index bb89d8683..e49d2aa8f 100644
--- a/test/elixir/test/config_test.exs
+++ b/test/elixir/test/config_test.exs
@@ -10,8 +10,7 @@ defmodule ConfigTest do
"""
setup do
- # TODO: switch this to _local when that's landed
- config_url = "/_node/node1@127.0.0.1/_config"
+ config_url = "/_node/_local/_config"
resp = Couch.get(config_url)
assert resp.status_code == 200
{:ok, config: resp.body, config_url: config_url}
@@ -71,13 +70,9 @@ defmodule ConfigTest do
end
end
- # TODO: port sever_port tests from config.js
- @tag :pending
- test "CouchDB respects configured protocols"
test "Standard config options are present", context do
- assert context[:config]["couchdb"]["database_dir"]
- assert context[:config]["log"]["level"]
+ assert context[:config]["chttpd"]["port"]
end
test "Settings can be altered with undefined whitelist allowing any change", context do
@@ -100,9 +95,6 @@ defmodule ConfigTest do
assert Couch.delete("/_session").body["ok"]
end
- @tag :pending
- test "PORT `BUGGED` ?raw tests from config.js"
-
test "Non-term whitelist values allow further modification of the whitelist", context do
val = "!This is an invalid Erlang term!"
set_config(context, "httpd", "config_whitelist", val)