You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2021/03/30 09:07:12 UTC

[couchdb] branch main updated: Refactor config_test.exs (#3465)

This is an automated email from the ASF dual-hosted git repository.

bessbd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/main by this push:
     new cfe2fd3  Refactor config_test.exs (#3465)
cfe2fd3 is described below

commit cfe2fd3a4420ec451746dc57aac506069de5fc38
Author: Bessenyei Balázs Donát <be...@users.noreply.github.com>
AuthorDate: Tue Mar 30 11:07:00 2021 +0200

    Refactor config_test.exs (#3465)
---
 test/elixir/test/config/skip.elixir |  5 +----
 test/elixir/test/config_test.exs    | 12 ++----------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/test/elixir/test/config/skip.elixir b/test/elixir/test/config/skip.elixir
index 88263e4..21cda1e 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 bb89d86..e49d2aa 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)