You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/09/24 20:06:35 UTC
[couchdb] branch re-enable-most-elixir-tests created (now 2e763ae)
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a change to branch re-enable-most-elixir-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
at 2e763ae Re-enable most elixir tests
This branch includes the following new commits:
new 7e861d8 Remove quorum tests
new 2e763ae Re-enable most elixir tests
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 01/02: Remove quorum tests
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch re-enable-most-elixir-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 7e861d87fa9af46d153bb5233f66799b55291edf
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Sep 24 13:36:10 2020 -0500
Remove quorum tests
Quorum is no longer a thing now that we rely on FoundationDB.
---
Makefile | 18 +-
Makefile.win | 16 +-
test/elixir/test/cluster_with_quorum_test.exs | 186 ---------------------
test/elixir/test/cluster_without_quorum_test.exs | 185 --------------------
.../tests-cluster/with-quorum/attachments.js | 37 ----
.../with-quorum/attachments_delete.js | 33 ----
.../attachments_delete_overridden_quorum.js | 38 -----
.../with-quorum/attachments_overridden_quorum.js | 42 -----
.../tests-cluster/with-quorum/db_creation.js | 28 ----
.../with-quorum/db_creation_overridden_quorum.js | 30 ----
.../tests-cluster/with-quorum/db_deletion.js | 31 ----
.../with-quorum/db_deletion_overridden_quorum.js | 24 ---
.../tests-cluster/with-quorum/doc_bulk.js | 26 ---
.../with-quorum/doc_bulk_overridden_quorum.js | 26 ---
.../tests-cluster/with-quorum/doc_copy.js | 28 ----
.../with-quorum/doc_copy_overridden_quorum.js | 32 ----
.../tests-cluster/with-quorum/doc_crud.js | 32 ----
.../with-quorum/doc_crud_overridden_quorum.js | 32 ----
.../tests-cluster/without-quorum/attachments.js | 40 -----
.../without-quorum/attachments_delete.js | 39 -----
.../attachments_delete_overridden_quorum.js | 38 -----
.../attachments_overridden_quorum.js | 43 -----
.../tests-cluster/without-quorum/db_creation.js | 28 ----
.../db_creation_overridden_quorum.js | 32 ----
.../tests-cluster/without-quorum/db_deletion.js | 31 ----
.../db_deletion_overridden_quorum.js | 26 ---
.../tests-cluster/without-quorum/doc_bulk.js | 29 ----
.../without-quorum/doc_bulk_overridden_quorum.js | 29 ----
.../tests-cluster/without-quorum/doc_copy.js | 31 ----
.../without-quorum/doc_copy_overridden_quorum.js | 35 ----
.../tests-cluster/without-quorum/doc_crud.js | 36 ----
.../without-quorum/doc_crud_overridden_quorum.js | 35 ----
32 files changed, 3 insertions(+), 1313 deletions(-)
diff --git a/Makefile b/Makefile
index 5bef9c7..b1d9d71 100644
--- a/Makefile
+++ b/Makefile
@@ -244,7 +244,7 @@ elixir: elixir-init elixir-check-formatted elixir-credo devclean
--enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
--erlang-config rel/files/eunit.config \
- --no-eval 'mix test --trace --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace $(EXUNIT_OPTS)'
.PHONY: elixir-only
elixir-only: devclean
@@ -254,27 +254,13 @@ elixir-only: devclean
--enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
--erlang-config rel/files/eunit.config \
- --no-eval 'mix test --trace --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace $(EXUNIT_OPTS)'
.PHONY: elixir-init
elixir-init: MIX_ENV=test
elixir-init: config.erl
@mix local.rebar --force && mix local.hex --force && mix deps.get
-.PHONY: elixir-cluster-without-quorum
-elixir-cluster-without-quorum: export MIX_ENV=integration
-elixir-cluster-without-quorum: elixir-init elixir-check-formatted elixir-credo devclean
- @dev/run -n 3 -q -a adm:pass \
- --degrade-cluster 2 \
- --no-eval 'mix test --trace --only without_quorum_test $(EXUNIT_OPTS)'
-
-.PHONY: elixir-cluster-with-quorum
-elixir-cluster-with-quorum: export MIX_ENV=integration
-elixir-cluster-with-quorum: elixir-init elixir-check-formatted elixir-credo devclean
- @dev/run -n 3 -q -a adm:pass \
- --degrade-cluster 1 \
- --no-eval 'mix test --trace --only with_quorum_test $(EXUNIT_OPTS)'
-
.PHONY: elixir-check-formatted
elixir-check-formatted: elixir-init
@mix format --check-formatted
diff --git a/Makefile.win b/Makefile.win
index edfc1bf..6b254e2 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -207,27 +207,13 @@ elixir: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
elixir: elixir-init elixir-check-formatted elixir-credo devclean
@dev\run $(TEST_OPTS) -a adm:pass -n 1 --enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
- --no-eval 'mix test --trace --exclude without_quorum_test --exclude with_quorum_test $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace $(EXUNIT_OPTS)'
.PHONY: elixir-init
elixir-init: MIX_ENV=test
elixir-init: config.erl
@mix local.rebar --force && mix local.hex --force && mix deps.get
-.PHONY: elixir-cluster-without-quorum
-elixir-cluster-without-quorum: export MIX_ENV=integration
-elixir-cluster-without-quorum: elixir-init elixir-check-formatted elixir-credo devclean
- @dev\run -n 3 -q -a adm:pass \
- --degrade-cluster 2 \
- --no-eval 'mix test --trace --only without_quorum_test $(EXUNIT_OPTS)'
-
-.PHONY: elixir-cluster-with-quorum
-elixir-cluster-with-quorum: export MIX_ENV=integration
-elixir-cluster-with-quorum: elixir-init elixir-check-formatted elixir-credo devclean
- @dev\run -n 3 -q -a adm:pass \
- --degrade-cluster 1 \
- --no-eval 'mix test --trace --only with_quorum_test $(EXUNIT_OPTS)'
-
.PHONY: elixir-check-formatted
elixir-check-formatted: elixir-init
@mix format --check-formatted
diff --git a/test/elixir/test/cluster_with_quorum_test.exs b/test/elixir/test/cluster_with_quorum_test.exs
deleted file mode 100644
index dc3d66b..0000000
--- a/test/elixir/test/cluster_with_quorum_test.exs
+++ /dev/null
@@ -1,186 +0,0 @@
-defmodule WithQuorumTest do
- use CouchTestCase
-
- @moduletag :with_quorum_test
- @moduletag kind: :cluster
-
- @moduledoc """
- Test CouchDB API in a cluster without quorum.
- """
- @tag :with_db_name
- test "Creating/Deleting DB should return 201-Created/202-Acepted", context do
- db_name = context[:db_name]
- resp = Couch.put("/#{db_name}")
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
- resp = Couch.delete("/#{db_name}")
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
- end
-
- @tag :with_db_name
- test "Creating-Updating/Deleting doc should return 201-Created/200-OK", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0", :a => 1})
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
-
- resp =
- Couch.put("/#{context[:db_name]}/0", body: %{:_id => "0", :_rev => rev, :a => 2})
-
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
- resp = Couch.delete("/#{context[:db_name]}/0", query: %{:rev => rev})
- msg = "Should return 200-OK"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Creating-Updating/Deleting doc with overriden quorum should return 202-Acepted/200-OK",
- context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- resp =
- Couch.post(
- "/#{context[:db_name]}",
- query: %{:w => 3},
- body: %{:_id => "0", :a => 1}
- )
-
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0",
- query: %{:w => 3},
- body: %{:_id => "0", :_rev => rev, :a => 2}
- )
-
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
- resp = Couch.delete("/#{context[:db_name]}/0", query: %{:w => 1, :rev => rev})
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Copy doc should return 201-Created", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- Couch.post(
- "/#{context[:db_name]}",
- body: %{:_id => "0", :a => 1}
- )
-
- headers = [Destination: "1"]
- resp = Couch.request(:copy, "/#{context[:db_name]}/0", headers: headers)
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
- Couch.delete("/#{db_name}")
- end
-
- @doc_range 1..5
-
- @tag :with_db_name
- test "Bulk docs should return 201-Created", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- docs = create_docs(@doc_range)
- resp = Couch.post("/#{db_name}/_bulk_docs", body: %{docs: docs})
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Bulk docs overriden quorum should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- docs = create_docs(@doc_range)
- resp = Couch.post("/#{db_name}/_bulk_docs", query: %{:w => 3}, body: %{docs: docs})
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Attachments should return 201-Created", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0"})
- rev = resp.body["rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev},
- body: "This is a no bas64 encoded text",
- headers: ["Content-Type": "text/plain;charset=utf-8"]
- )
-
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- rev = resp.body["rev"]
- resp = Couch.delete("/#{context[:db_name]}/0/foo.txt", query: %{:rev => rev})
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Attachments overriden quorum should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0"})
- rev = resp.body["rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev, :w => 3},
- body: "This is a no bas64 encoded text",
- headers: ["Content-Type": "text/plain;charset=utf-8"]
- )
-
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- rev = resp.body["rev"]
-
- resp =
- Couch.delete(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev, :w => 3}
- )
-
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-end
diff --git a/test/elixir/test/cluster_without_quorum_test.exs b/test/elixir/test/cluster_without_quorum_test.exs
deleted file mode 100644
index 63371f1..0000000
--- a/test/elixir/test/cluster_without_quorum_test.exs
+++ /dev/null
@@ -1,185 +0,0 @@
-defmodule WithoutQuorumTest do
- use CouchTestCase
-
- @moduletag :without_quorum_test
- @moduletag kind: :degraded_cluster
-
- @moduledoc """
- Test CouchDB API in a cluster without quorum.
- """
- @tag :with_db_name
- test "Creating/Deleting DB should return 202-Acepted", context do
- db_name = context[:db_name]
- resp = Couch.put("/#{db_name}")
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
- resp = Couch.delete("/#{db_name}")
- assert resp.status_code == 202, msg
- end
-
- @tag :with_db_name
- test "Creating/Updating/Deleting doc should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0", :a => 1})
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
-
- resp =
- Couch.put("/#{context[:db_name]}/0", body: %{:_id => "0", :_rev => rev, :a => 2})
-
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
- resp = Couch.delete("/#{context[:db_name]}/0", query: %{:rev => rev})
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Creating-Updating/Deleting doc with overriden quorum should return 201-Created/200-OK",
- context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- resp =
- Couch.post(
- "/#{context[:db_name]}",
- query: %{:w => 1},
- body: %{:_id => "0", :a => 1}
- )
-
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0",
- query: %{:w => 1},
- body: %{:_id => "0", :_rev => rev, :a => 2}
- )
-
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- resp = Couch.get("/#{context[:db_name]}/0")
- rev = resp.body["_rev"]
- resp = Couch.delete("/#{context[:db_name]}/0", query: %{:w => 1, :rev => rev})
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Copy doc should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
-
- Couch.post(
- "/#{context[:db_name]}",
- body: %{:_id => "0", :a => 1}
- )
-
- headers = [Destination: "1"]
- resp = Couch.request(:copy, "/#{context[:db_name]}/0", headers: headers)
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
- Couch.delete("/#{db_name}")
- end
-
- @doc_range 1..5
-
- @tag :with_db_name
- test "Bulk docs should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- docs = create_docs(@doc_range)
- resp = Couch.post("/#{db_name}/_bulk_docs", body: %{docs: docs})
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Bulk docs overriden quorum should return 201-Created", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- docs = create_docs(@doc_range)
- resp = Couch.post("/#{db_name}/_bulk_docs", query: %{:w => 1}, body: %{docs: docs})
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Attachments should return 202-Acepted", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0"})
- rev = resp.body["rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev},
- body: "This is a no bas64 encoded text",
- headers: ["Content-Type": "text/plain;charset=utf-8"]
- )
-
- msg = "Should return 202-Acepted"
- assert resp.status_code == 202, msg
-
- rev = resp.body["rev"]
- resp = Couch.delete("/#{context[:db_name]}/0/foo.txt", query: %{:rev => rev})
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-
- @tag :with_db_name
- test "Attachments overriden quorum should return 201-Created", context do
- db_name = context[:db_name]
- Couch.put("/#{db_name}")
- resp = Couch.post("/#{context[:db_name]}", body: %{:_id => "0"})
- rev = resp.body["rev"]
-
- resp =
- Couch.put(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev, :w => 1},
- body: "This is a no bas64 encoded text",
- headers: ["Content-Type": "text/plain;charset=utf-8"]
- )
-
- msg = "Should return 201-Created"
- assert resp.status_code in [201, 202], msg
-
- rev = resp.body["rev"]
-
- resp =
- Couch.delete(
- "/#{context[:db_name]}/0/foo.txt",
- query: %{:rev => rev, :w => 1}
- )
-
- msg = "Should return 200-Ok"
- assert resp.status_code == 200, msg
-
- Couch.delete("/#{db_name}")
- end
-end
diff --git a/test/javascript/tests-cluster/with-quorum/attachments.js b/test/javascript/tests-cluster/with-quorum/attachments.js
deleted file mode 100644
index 8186d75..0000000
--- a/test/javascript/tests-cluster/with-quorum/attachments.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.attachments= function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
-
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 201,"Should return 201");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + rev, {
- body:"This is no base64 encoded text-2",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 201,"Should return 201");
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/attachments_delete.js b/test/javascript/tests-cluster/with-quorum/attachments_delete.js
deleted file mode 100644
index 1980c11..0000000
--- a/test/javascript/tests-cluster/with-quorum/attachments_delete.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.attachments_delete= function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 201,"Should return 201 Accepted");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("DELETE", "/" + db_name + "/dummy/foo.txt?rev=" + rev);
- T(xhr.status == 200,"Should return 200 Ok but returns "+xhr.status);
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/attachments_delete_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/attachments_delete_overridden_quorum.js
deleted file mode 100644
index 48c1f34..0000000
--- a/test/javascript/tests-cluster/with-quorum/attachments_delete_overridden_quorum.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.skip = true;
-couchTests.attachments_delete_overridden_quorum= function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("DELETE", "/" + db_name + "/dummy/foo.txt?rev=" + rev);
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 202->"+xhr.status);
- // TODO: Define correct behaviour
- //T(xhr.status == 202,"Should return 202 but returns "+xhr.status);
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/with-quorum/attachments_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/attachments_overridden_quorum.js
deleted file mode 100644
index cbeb985..0000000
--- a/test/javascript/tests-cluster/with-quorum/attachments_overridden_quorum.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-//Test attachments operations with an overridden quorum parameter
-couchTests.skip = true;
-couchTests.attachments_overriden_quorum= function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
-
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- //TODO: Define correct behaviour
- //T(xhr.status == 202,"Should return 202");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + rev, {
- body:"This is no base64 encoded text-2",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 202->"+xhr.status);
- //TODO: Define correct behaviour
- //T(xhr.status == 202,"Should return 202");
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/db_creation.js b/test/javascript/tests-cluster/with-quorum/db_creation.js
deleted file mode 100644
index c8a416d..0000000
--- a/test/javascript/tests-cluster/with-quorum/db_creation.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB creation under cluster with quorum conditions.
-couchTests.db_creation = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
-
- // DB Creation should return 201 - Created
- xhr = CouchDB.request("PUT", "/" + db_name + "/");
- T(xhr.status == 201);
-
- // cleanup
- db.deleteDb();
-};
diff --git a/test/javascript/tests-cluster/with-quorum/db_creation_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/db_creation_overridden_quorum.js
deleted file mode 100644
index af27f95..0000000
--- a/test/javascript/tests-cluster/with-quorum/db_creation_overridden_quorum.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB creation under cluster with quorum conditions but overriding write quorum.
-couchTests.skip = true;
-couchTests.db_creation_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
-
- // DB Creation should return 202 - Accepted
- xhr = CouchDB.request("PUT", "/" + db_name + "/");
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 202->"+xhr.status)
- //T(xhr.status == 202,"Should return 202");
-
- // cleanup
- db.deleteDb();
-};
diff --git a/test/javascript/tests-cluster/with-quorum/db_deletion.js b/test/javascript/tests-cluster/with-quorum/db_deletion.js
deleted file mode 100644
index 70e7034..0000000
--- a/test/javascript/tests-cluster/with-quorum/db_deletion.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB deletion under cluster with quorum conditions.
-couchTests.db_deletion = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
-
- db.createDb();
-
- // DB Deletion should return 202 - Acceted as the custer is not complete
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
- T(xhr.status == 202);
-
-// DB Deletion should return 404 - Not found
- xhr = CouchDB.request("DELETE", "/not-existing-db/");
- T(xhr.status == 404);
-};
diff --git a/test/javascript/tests-cluster/with-quorum/db_deletion_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/db_deletion_overridden_quorum.js
deleted file mode 100644
index 8e9c65e..0000000
--- a/test/javascript/tests-cluster/with-quorum/db_deletion_overridden_quorum.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB deletion in a cluster with quorum conditions.
-couchTests.db_deletion_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- db.deleteDb();
- T(db.last_req.status="202","Should return 202");
-};
diff --git a/test/javascript/tests-cluster/with-quorum/doc_bulk.js b/test/javascript/tests-cluster/with-quorum/doc_bulk.js
deleted file mode 100644
index 1cb8574..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_bulk.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_bulk = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var docs = makeDocs(5);
- // Create the docs
- var results = db.bulkSave(docs);
- T(db.last_req.status="201","Should return 201")
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/doc_bulk_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/doc_bulk_overridden_quorum.js
deleted file mode 100644
index 2a3be06..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_bulk_overridden_quorum.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_bulk_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- if (debug) debugger;
-
- var docs = makeDocs(5);
- // Create the docs
- var results = db.bulkSave(docs);
- T(db.last_req.status="202","Should return 202")
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/doc_copy.js b/test/javascript/tests-cluster/with-quorum/doc_copy.js
deleted file mode 100644
index e79d38c..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_copy.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_copy = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"dummy"});
-
- var xhr = CouchDB.request("COPY", "/" + db_name + "/dummy", {
- headers: {"Destination":"dummy2"}
- });
- T(xhr.status=="201","Should return 201 ");
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/with-quorum/doc_copy_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/doc_copy_overridden_quorum.js
deleted file mode 100644
index a816817..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_copy_overridden_quorum.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.skip = true;
-couchTests.doc_copy_overriden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"dummy"});
-
- var xhr = CouchDB.request("COPY", "/" + db_name + "/dummy", {
- headers: {"Destination":"dummy2"}
- });
- //TODO: Define correct behaviour
- //T(xhr.status=="202","Should return 202");
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 202->"+xhr.status);
-
- db.deleteDb();
-
-}
diff --git a/test/javascript/tests-cluster/with-quorum/doc_crud.js b/test/javascript/tests-cluster/with-quorum/doc_crud.js
deleted file mode 100644
index ab90e60..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_crud.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_crud = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"0",a:1});
- T(db.last_req.status=="201");
-
- var doc = db.open("0");
- db.save(doc);
- T(db.last_req.status=="201");
-
- doc = db.open("0");
- db.deleteDoc(doc);
- T(db.last_req.status="200");
- db.deleteDb();
-
-}
diff --git a/test/javascript/tests-cluster/with-quorum/doc_crud_overridden_quorum.js b/test/javascript/tests-cluster/with-quorum/doc_crud_overridden_quorum.js
deleted file mode 100644
index a351378..0000000
--- a/test/javascript/tests-cluster/with-quorum/doc_crud_overridden_quorum.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_crud_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_with_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":3});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"0",a:1});
- T(db.last_req.status=="202","Should return 202 status");
-
- var doc = db.open("0");
- db.save(doc);
- T(db.last_req.status=="202","Should return 202 status");
-
- doc = db.open("0");
- db.deleteDoc(doc);
- T(db.last_req.status="202","Should return 202 status");
-
- db.deleteDb();
-}
diff --git a/test/javascript/tests-cluster/without-quorum/attachments.js b/test/javascript/tests-cluster/without-quorum/attachments.js
deleted file mode 100644
index 349cc88..0000000
--- a/test/javascript/tests-cluster/without-quorum/attachments.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.attachments= function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 202,"Should return 202 Accepted");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + rev, {
- body:"This is no base64 encoded text-2",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 202,"Should return 202 Accepted");
- rev = JSON.parse(xhr.responseText).rev;
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/attachments_delete.js b/test/javascript/tests-cluster/without-quorum/attachments_delete.js
deleted file mode 100644
index 8b8a2db..0000000
--- a/test/javascript/tests-cluster/without-quorum/attachments_delete.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.skip = true;
-couchTests.attachments_delete= function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- T(xhr.status == 202,"Should return 202 Accepted");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("DELETE", "/" + db_name + "/dummy/foo.txt?rev=" + rev);
- console.log("TODO: Clarify correct behaviour. Is not considering quorum. 202->"+xhr.status);
- //TODO: Define correct behaviour
- //T(xhr.status == 202,"Should return 202 Accepted but returns "+xhr.status);
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/attachments_delete_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/attachments_delete_overridden_quorum.js
deleted file mode 100644
index 48247e0..0000000
--- a/test/javascript/tests-cluster/without-quorum/attachments_delete_overridden_quorum.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.skip = true;
-couchTests.attachments_delete_overridden_quorum= function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("DELETE", "/" + db_name + "/dummy/foo.txt?rev=" + rev);
- console.log("TODO: Clarify correct behaviour. Is not considering quorum. 202->"+xhr.status);
- //TODO: Define correct behaviour
- //T(xhr.status == 200,"Should return 200 but returns "+xhr.status);
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/attachments_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/attachments_overridden_quorum.js
deleted file mode 100644
index 2b8e75f..0000000
--- a/test/javascript/tests-cluster/without-quorum/attachments_overridden_quorum.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-//Test attachments operations with an overridden quorum parameter
-couchTests.attachments_overriden_quorum= function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
- if (debug) debugger;
-
- var doc = db.save({_id:"dummy"});
- T(doc.ok);
-
- var xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + doc.rev, {
- body:"This is no base64 encoded text",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- //TODO: Define correct behaviour
- //T(xhr.status == 201,"Should return 201");
- var rev = JSON.parse(xhr.responseText).rev;
-
- xhr = CouchDB.request("PUT", "/" + db_name + "/dummy/foo.txt?rev=" + rev, {
- body:"This is no base64 encoded text-2",
- headers:{"Content-Type": "text/plain;charset=utf-8"}
- });
- //TODO: Define correct behaviour
- //T(xhr.status == 201,"Should return 201");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/db_creation.js b/test/javascript/tests-cluster/without-quorum/db_creation.js
deleted file mode 100644
index dd9b294..0000000
--- a/test/javascript/tests-cluster/without-quorum/db_creation.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB creation under cluster without quorum conditions.
-couchTests.db_creation = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
-
- // DB Creation should return 202- Accepted
- xhr = CouchDB.request("PUT", "/" + db_name + "/");
- T(xhr.status == 202);
-
- // cleanup
- db.deleteDb();
-};
diff --git a/test/javascript/tests-cluster/without-quorum/db_creation_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/db_creation_overridden_quorum.js
deleted file mode 100644
index 8ed9b44..0000000
--- a/test/javascript/tests-cluster/without-quorum/db_creation_overridden_quorum.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB creation under cluster with quorum conditions but overriding write quorum.
-couchTests.skip = true;
-couchTests.db_creation_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
-
- // DB Creation should return 201 - Created
- xhr = CouchDB.request("PUT", "/" + db_name + "/");
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 201->"+xhr.status)
- //T(xhr.status == 201,"Should return 201");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-};
diff --git a/test/javascript/tests-cluster/without-quorum/db_deletion.js b/test/javascript/tests-cluster/without-quorum/db_deletion.js
deleted file mode 100644
index f156b0e..0000000
--- a/test/javascript/tests-cluster/without-quorum/db_deletion.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB creation under cluster with quorum conditions.
-couchTests.db_deletion = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
-
- db.createDb();
-
- // DB Deletion should return 202 - Acepted
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
- T(xhr.status == 202);
-
- // DB Deletion should return 404 - Not found
- xhr = CouchDB.request("DELETE", "/not-existing-db/");
- T(xhr.status == 404);
-};
diff --git a/test/javascript/tests-cluster/without-quorum/db_deletion_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/db_deletion_overridden_quorum.js
deleted file mode 100644
index 86dea83..0000000
--- a/test/javascript/tests-cluster/without-quorum/db_deletion_overridden_quorum.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Do DB deletion in a cluster with quorum conditions.
-couchTests.db_deletion_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
-
- if (debug) debugger;
-
- var db_name = get_random_db_name()
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
-
- // DB deletions does not consider overriden quorum param.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
- T(db.last_req.status="202","Should return 202");
-};
diff --git a/test/javascript/tests-cluster/without-quorum/doc_bulk.js b/test/javascript/tests-cluster/without-quorum/doc_bulk.js
deleted file mode 100644
index 37f67ec..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_bulk.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_bulk = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- var docs = makeDocs(5);
- // Create the docs
- var results = db.bulkSave(docs);
- T(db.last_req.status="202","Should return 202")
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/doc_bulk_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/doc_bulk_overridden_quorum.js
deleted file mode 100644
index 0f2f364..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_bulk_overridden_quorum.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_bulk_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
- if (debug) debugger;
-
- var docs = makeDocs(5);
- // Create the docs
- var results = db.bulkSave(docs);
- T(db.last_req.status="201","Should return 201")
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/doc_copy.js b/test/javascript/tests-cluster/without-quorum/doc_copy.js
deleted file mode 100644
index 6e7ae45..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_copy.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_copy = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"dummy"});
-
- var xhr = CouchDB.request("COPY", "/" + db_name + "/dummy", {
- headers: {"Destination":"dummy2"}
- });
- T(xhr.status=="202","Should return 202 ");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
diff --git a/test/javascript/tests-cluster/without-quorum/doc_copy_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/doc_copy_overridden_quorum.js
deleted file mode 100644
index 301240e..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_copy_overridden_quorum.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.skip = true;
-couchTests.doc_copy_overriden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"dummy"});
-
- var xhr = CouchDB.request("COPY", "/" + db_name + "/dummy", {
- headers: {"Destination":"dummy2"}
- });
- console.log("TODO: Clarify correct behaviour. Is not considering overridden quorum. 201->"+xhr.status);
- //TODO Defie correct behaviour
- //T(xhr.status=="201","Should return 201");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-
-}
diff --git a/test/javascript/tests-cluster/without-quorum/doc_crud.js b/test/javascript/tests-cluster/without-quorum/doc_crud.js
deleted file mode 100644
index 0a009d5..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_crud.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_crud = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"0",a:1});
- T(db.last_req.status=="202","Should return 202 status");
-
- var doc = db.open("0");
- db.save(doc);
- T(db.last_req.status=="202","Should return 202 status");
-
- doc = db.open("0");
- db.deleteDoc(doc);
- T(db.last_req.status="202","Should return 202 status");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-
-}
diff --git a/test/javascript/tests-cluster/without-quorum/doc_crud_overridden_quorum.js b/test/javascript/tests-cluster/without-quorum/doc_crud_overridden_quorum.js
deleted file mode 100644
index 9eb83bd..0000000
--- a/test/javascript/tests-cluster/without-quorum/doc_crud_overridden_quorum.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-couchTests.doc_crud_overridden_quorum = function(debug) {
- return console.log('done in test/elixir/test/cluster_without_quorum_test.exs');
- var db_name = get_random_db_name();
- var db = new CouchDB(db_name, {"X-Couch-Full-Commit":"false"},{"w":1});
- db.createDb();
- if (debug) debugger;
-
- db.save({_id:"0",a:1});
- T(db.last_req.status=="201","Should return 201 status");
-
- var doc = db.open("0");
- db.save(doc);
- T(db.last_req.status=="201","Should return 201 status");
-
- doc = db.open("0");
- db.deleteDoc(doc);
- T(db.last_req.status="200","Should return 200 status");
-
- //db.deleteDb();
- // cleanup
- // TODO DB deletions fails if the quorum is not met.
- xhr = CouchDB.request("DELETE", "/" + db_name + "/");
-}
[couchdb] 02/02: Re-enable most elixir tests
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch re-enable-most-elixir-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 2e763aea3dcdede5e69cac1a4aa8d3859b6159ed
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Sep 24 15:06:13 2020 -0500
Re-enable most elixir tests
This change tags all tests that are currently failing against main with
a `pending` tag that is then excluded.
---
Makefile | 4 ++--
Makefile.win | 2 +-
test/elixir/test/attachments_multipart_test.exs | 1 +
test/elixir/test/attachments_test.exs | 2 ++
test/elixir/test/changes_async_test.exs | 9 +++++++++
test/elixir/test/changes_test.exs | 1 +
test/elixir/test/coffee_test.exs | 1 +
test/elixir/test/config_test.exs | 1 +
test/elixir/test/cookie_auth_test.exs | 1 +
test/elixir/test/design_docs_test.exs | 4 ++++
test/elixir/test/design_options_test.exs | 1 +
test/elixir/test/design_paths_test.exs | 3 +++
test/elixir/test/erlang_views_test.exs | 3 +++
test/elixir/test/http_test.exs | 2 ++
test/elixir/test/proxyauth_test.exs | 2 ++
test/elixir/test/purge_test.exs | 2 ++
test/elixir/test/reader_acl_test.exs | 5 +++++
test/elixir/test/replicator_db_bad_rep_id_test.exs | 1 +
test/elixir/test/replicator_db_by_doc_id_test.exs | 1 +
test/elixir/test/rev_stemming_test.exs | 1 +
test/elixir/test/rewrite_test.exs | 1 +
test/elixir/test/update_documents_test.exs | 9 +++++++++
test/elixir/test/users_db_test.exs | 1 +
test/elixir/test/view_compaction_test.exs | 5 +++--
test/elixir/test/view_errors_test.exs | 3 +++
test/elixir/test/view_include_docs_test.exs | 1 +
test/elixir/test/view_offsets_test.exs | 2 ++
test/elixir/test/view_pagination_test.exs | 6 ++++++
test/elixir/test/view_update_seq_test.exs | 3 +++
29 files changed, 73 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index b1d9d71..714b9b1 100644
--- a/Makefile
+++ b/Makefile
@@ -244,7 +244,7 @@ elixir: elixir-init elixir-check-formatted elixir-credo devclean
--enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
--erlang-config rel/files/eunit.config \
- --no-eval 'mix test --trace $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace --exclude pending $(EXUNIT_OPTS)'
.PHONY: elixir-only
elixir-only: devclean
@@ -254,7 +254,7 @@ elixir-only: devclean
--enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
--erlang-config rel/files/eunit.config \
- --no-eval 'mix test --trace $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace --exclude pending $(EXUNIT_OPTS)'
.PHONY: elixir-init
elixir-init: MIX_ENV=test
diff --git a/Makefile.win b/Makefile.win
index 6b254e2..84a933c 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -207,7 +207,7 @@ elixir: export COUCHDB_TEST_ADMIN_PARTY_OVERRIDE=1
elixir: elixir-init elixir-check-formatted elixir-credo devclean
@dev\run $(TEST_OPTS) -a adm:pass -n 1 --enable-erlang-views \
--locald-config test/elixir/test/config/test-config.ini \
- --no-eval 'mix test --trace $(EXUNIT_OPTS)'
+ --no-eval 'mix test --trace --exclude pending $(EXUNIT_OPTS)'
.PHONY: elixir-init
elixir-init: MIX_ENV=test
diff --git a/test/elixir/test/attachments_multipart_test.exs b/test/elixir/test/attachments_multipart_test.exs
index f635377..5f387cf 100644
--- a/test/elixir/test/attachments_multipart_test.exs
+++ b/test/elixir/test/attachments_multipart_test.exs
@@ -9,6 +9,7 @@ defmodule AttachmentMultipartTest do
This is a port of the attachments_multipart.js suite
"""
+ @tag :pending # HTTP 500
@tag :with_db
test "manages attachments multipart requests successfully", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/attachments_test.exs b/test/elixir/test/attachments_test.exs
index 8e7f7d3..d608847 100644
--- a/test/elixir/test/attachments_test.exs
+++ b/test/elixir/test/attachments_test.exs
@@ -115,6 +115,7 @@ defmodule AttachmentsTest do
assert resp.headers["location"] == nil
end
+ @tag :pending # Wrong Content-Type
@tag :with_db
test "saves binary", context do
db_name = context[:db_name]
@@ -346,6 +347,7 @@ defmodule AttachmentsTest do
assert resp.status_code == 400
end
+ @tag :pending # HTTP 500
@tag :with_db
test "COUCHDB-809 - stubs should only require the 'stub' field", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/changes_async_test.exs b/test/elixir/test/changes_async_test.exs
index 36876ae..b8f3a99 100644
--- a/test/elixir/test/changes_async_test.exs
+++ b/test/elixir/test/changes_async_test.exs
@@ -8,18 +8,21 @@ defmodule ChangesAsyncTest do
Test CouchDB /{db}/_changes
"""
+ @tag :pending # Function clause String.Unicode.next_grapheme_size/1
@tag :with_db
test "live changes", context do
db_name = context[:db_name]
test_changes(db_name, "live")
end
+ @tag :pending # Function clause String.Unicode.next_grapheme_size/1
@tag :with_db
test "continuous changes", context do
db_name = context[:db_name]
test_changes(db_name, "continuous")
end
+ @tag :pending # Function clause String.Unicode.next_grapheme_size/1
@tag :with_db
test "longpoll changes", context do
db_name = context[:db_name]
@@ -76,6 +79,7 @@ defmodule ChangesAsyncTest do
assert last_seq_prefix == "3-", "seq must start with 3-"
end
+ @tag :pending # Function clause String.Unicode.next_grapheme_size/1
@tag :with_db
test "eventsource changes", context do
db_name = context[:db_name]
@@ -104,6 +108,7 @@ defmodule ChangesAsyncTest do
HTTPotion.stop_worker_process(worker_pid)
end
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "eventsource heartbeat", context do
db_name = context[:db_name]
@@ -122,6 +127,7 @@ defmodule ChangesAsyncTest do
HTTPotion.stop_worker_process(worker_pid)
end
+ @tag :pending # Invalid last_seq_prefix
@tag :with_db
test "longpoll filtered changes", context do
db_name = context[:db_name]
@@ -166,6 +172,7 @@ defmodule ChangesAsyncTest do
assert Enum.at(changes["results"], 0)["id"] == "bingo"
end
+ @tag :pending # Function clause Couch.process_url
@tag :with_db
test "continuous filtered changes", context do
db_name = context[:db_name]
@@ -198,6 +205,7 @@ defmodule ChangesAsyncTest do
assert length(changes_ids) == 2
end
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "continuous filtered changes with doc ids", context do
db_name = context[:db_name]
@@ -232,6 +240,7 @@ defmodule ChangesAsyncTest do
assert length(changes_ids) == 2
end
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "COUCHDB-1852", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/changes_test.exs b/test/elixir/test/changes_test.exs
index ad579a9..752b33a 100644
--- a/test/elixir/test/changes_test.exs
+++ b/test/elixir/test/changes_test.exs
@@ -216,6 +216,7 @@ defmodule ChangesTest do
assert Enum.member?(changes_ids, "doc3")
end
+ @tag :pending # Argument error `length/1`
@tag :with_db
test "changes filtering on design docs", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/coffee_test.exs b/test/elixir/test/coffee_test.exs
index 3c7a105..b3c597e 100644
--- a/test/elixir/test/coffee_test.exs
+++ b/test/elixir/test/coffee_test.exs
@@ -9,6 +9,7 @@ defmodule CoffeeTest do
This is a port of the coffee.js test suite.
"""
+ @tag :pending # Timeout, check couch_eval config
@tag :with_db
test "CoffeeScript basic functionality", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/config_test.exs b/test/elixir/test/config_test.exs
index bb89d86..55da322 100644
--- a/test/elixir/test/config_test.exs
+++ b/test/elixir/test/config_test.exs
@@ -176,6 +176,7 @@ defmodule ConfigTest do
end)
end
+ @tag :pending # Causes unrelated tests to fail
test "Reload config", context do
url = "#{context[:config_url]}/_reload"
resp = Couch.post(url)
diff --git a/test/elixir/test/cookie_auth_test.exs b/test/elixir/test/cookie_auth_test.exs
index 87de1ab..e769e66 100644
--- a/test/elixir/test/cookie_auth_test.exs
+++ b/test/elixir/test/cookie_auth_test.exs
@@ -205,6 +205,7 @@ defmodule CookieAuthTest do
logout(sess)
end
+ @tag :pending # Error length(nil)
test "cookie auth" do
# test that the users db is born with the auth ddoc
ddoc = open_as(@users_db, "_design/_auth", user: "jan")
diff --git a/test/elixir/test/design_docs_test.exs b/test/elixir/test/design_docs_test.exs
index 86bdd5a..f2bd3bd 100644
--- a/test/elixir/test/design_docs_test.exs
+++ b/test/elixir/test/design_docs_test.exs
@@ -211,6 +211,7 @@ defmodule DesignDocsTest do
assert first_db_rev == resp2.body["rev"]
end
+ @tag :pending # HTTP 410
test "commonjs require", context do
db_name = context[:db_name]
resp = Couch.get("/#{db_name}/_design/test/_show/requirey")
@@ -228,6 +229,7 @@ defmodule DesignDocsTest do
assert result["language"] == "javascript"
end
+ @tag :pending # HTTP 410
test "circular commonjs dependencies", context do
db_name = context[:db_name]
resp = Couch.get("/#{db_name}/_design/test/_show/circular_require")
@@ -235,6 +237,7 @@ defmodule DesignDocsTest do
assert resp.body == "One"
end
+ @tag :pending # HTTP 410
test "module id values are as expected", context do
db_name = context[:db_name]
@@ -251,6 +254,7 @@ defmodule DesignDocsTest do
assert resp.body == expected
end
+ @tag :pending # No compact_running key
@tag :with_db
test "test that we get correct design doc info back", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/design_options_test.exs b/test/elixir/test/design_options_test.exs
index feb4771..a68b794 100644
--- a/test/elixir/test/design_options_test.exs
+++ b/test/elixir/test/design_options_test.exs
@@ -19,6 +19,7 @@ defmodule DesignOptionsTest do
assert Enum.at(resp.body["rows"], 0)["value"] == "_design/fu"
end
+ @tag :pending # Design doc returned
@tag :with_db
test "design doc options - include_desing=false", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/design_paths_test.exs b/test/elixir/test/design_paths_test.exs
index f90172a..785f3b6 100644
--- a/test/elixir/test/design_paths_test.exs
+++ b/test/elixir/test/design_paths_test.exs
@@ -7,12 +7,15 @@ defmodule DesignPathTest do
@moduledoc """
Test CouchDB design documents path
"""
+
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "design doc path", context do
db_name = context[:db_name]
ddoc_path_test(db_name)
end
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db_name
test "design doc path with slash in db name", context do
db_name = URI.encode_www_form(context[:db_name] <> "/with_slashes")
diff --git a/test/elixir/test/erlang_views_test.exs b/test/elixir/test/erlang_views_test.exs
index afe9d6c..4d2666a 100644
--- a/test/elixir/test/erlang_views_test.exs
+++ b/test/elixir/test/erlang_views_test.exs
@@ -42,6 +42,7 @@ defmodule ErlangViewsTest do
@word_list ["foo", "bar", "abc", "def", "baz", "xxyz"]
+ @tag :pending # Timeout, add couch_eval.languages config
@tag :with_db
test "Erlang map function", context do
db_name = context[:db_name]
@@ -62,6 +63,7 @@ defmodule ErlangViewsTest do
assert List.first(results["rows"])["value"] == "str1"
end
+ @tag :pending # Timeout, add couch_eval.languages config
@tag :with_db
test "Erlang reduce function", context do
db_name = context[:db_name]
@@ -82,6 +84,7 @@ defmodule ErlangViewsTest do
assert List.first(results["rows"])["value"] == 2
end
+ @tag :pending # Timeout, add couch_eval.languages config
@tag :with_db
test "Erlang reduce function larger dataset", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/http_test.exs b/test/elixir/test/http_test.exs
index 14cecfe..5cc45b5 100644
--- a/test/elixir/test/http_test.exs
+++ b/test/elixir/test/http_test.exs
@@ -4,6 +4,7 @@ defmodule HttpTest do
@moduletag :http
@moduletag kind: :single_node
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "location header", context do
db_name = context[:db_name]
@@ -48,6 +49,7 @@ defmodule HttpTest do
end)
end
+ @tag :pending # Function clause Couch.process_url/1
@tag :with_db
test "COUCHDB-708: newlines document names", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/proxyauth_test.exs b/test/elixir/test/proxyauth_test.exs
index b152e9b..84eb9af 100644
--- a/test/elixir/test/proxyauth_test.exs
+++ b/test/elixir/test/proxyauth_test.exs
@@ -4,6 +4,7 @@ defmodule ProxyAuthTest do
@moduletag :authentication
@moduletag kind: :single_node
+ @tag :pending # Not supported on 4.x
@tag :with_db
test "proxy auth with secret", context do
db_name = context[:db_name]
@@ -92,6 +93,7 @@ defmodule ProxyAuthTest do
assert resp.body == "test"
end
+ @tag :pending # Not supported on 4.x
@tag :with_db
test "proxy auth without secret", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/purge_test.exs b/test/elixir/test/purge_test.exs
index 1a06908..0df7ffd 100644
--- a/test/elixir/test/purge_test.exs
+++ b/test/elixir/test/purge_test.exs
@@ -4,6 +4,7 @@ defmodule PurgeTest do
@moduletag :purge
@moduletag kind: :single_node
+ @tag :pending # HTTP 501
@tag :with_db
test "purge documents", context do
db_name = context[:db_name]
@@ -82,6 +83,7 @@ defmodule PurgeTest do
test_all_docs_twice(db_name, num_docs, 0, 4)
end
+ @tag :pending # HTTP 501
@tag :with_db
test "COUCHDB-1065", context do
db_name_a = context[:db_name]
diff --git a/test/elixir/test/reader_acl_test.exs b/test/elixir/test/reader_acl_test.exs
index 3cbd5c8..ff835e6 100644
--- a/test/elixir/test/reader_acl_test.exs
+++ b/test/elixir/test/reader_acl_test.exs
@@ -93,6 +93,7 @@ defmodule ReaderACLTest do
assert resp.status_code == expect_response
end
+ @tag :pending # Timeout
@tag :with_db
test "unrestricted db can be read", context do
db_name = context[:db_name]
@@ -105,6 +106,7 @@ defmodule ReaderACLTest do
open_as(db_name, "baz", user: "bond@apache.org")
end
+ @tag :pending # HTTP 404 in on_exit
@tag :with_db
test "restricted db can be read by authorized users", context do
db_name = context[:db_name]
@@ -164,6 +166,7 @@ defmodule ReaderACLTest do
open_as(db_name, "baz", user: "bond@apache.org")
end
+ @tag :pending # Timeout
@tag :with_db
test "works with readers (backwards compat with 1.0)", context do
db_name = context[:db_name]
@@ -186,6 +189,7 @@ defmodule ReaderACLTest do
open_as(db_name, "baz", user: "bond@apache.org")
end
+ @tag :pending # Timeout
@tag :with_db
test "can't set non string reader names or roles", context do
db_name = context[:db_name]
@@ -218,6 +222,7 @@ defmodule ReaderACLTest do
set_security(db_name, security, 500)
end
+ @tag :pending # Timeout
@tag :with_db
test "members can query views", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/replicator_db_bad_rep_id_test.exs b/test/elixir/test/replicator_db_bad_rep_id_test.exs
index 9477eb1..706eb5c 100644
--- a/test/elixir/test/replicator_db_bad_rep_id_test.exs
+++ b/test/elixir/test/replicator_db_bad_rep_id_test.exs
@@ -23,6 +23,7 @@ defmodule ReplicationBadIdTest do
}
]
+ @tag :pending # Function clause Couch.process_url/1
test "replication doc with bad rep id" do
name = random_db_name()
src_db_name = name <> "_src"
diff --git a/test/elixir/test/replicator_db_by_doc_id_test.exs b/test/elixir/test/replicator_db_by_doc_id_test.exs
index 681ed02..80333ea 100644
--- a/test/elixir/test/replicator_db_by_doc_id_test.exs
+++ b/test/elixir/test/replicator_db_by_doc_id_test.exs
@@ -23,6 +23,7 @@ defmodule ReplicatorDBByDocIdTest do
}
]
+ @tag :pending # Function clause Couch.process_url/1
test "replicatior db by doc id" do
name = random_db_name()
src_db_name = name <> "_src"
diff --git a/test/elixir/test/rev_stemming_test.exs b/test/elixir/test/rev_stemming_test.exs
index 1fb745e..4cb325e 100644
--- a/test/elixir/test/rev_stemming_test.exs
+++ b/test/elixir/test/rev_stemming_test.exs
@@ -84,6 +84,7 @@ defmodule RevStemmingTest do
assert conflicted_rev == prev_conflicted_rev
end
+ @tag :pending # Assertion failed
@tag :with_db
test "revs limit is kept after compaction", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/rewrite_test.exs b/test/elixir/test/rewrite_test.exs
index daa2a80..69b03c5 100644
--- a/test/elixir/test/rewrite_test.exs
+++ b/test/elixir/test/rewrite_test.exs
@@ -12,6 +12,7 @@ defmodule RewriteTest do
Enum.each(
["test_rewrite_suite_db", "test_rewrite_suite_db%2Fwith_slashes"],
fn db_name ->
+ @tag :pending # Not supported on 4.x
@tag with_random_db: db_name
@tag config: [
{"httpd", "authentication_handlers",
diff --git a/test/elixir/test/update_documents_test.exs b/test/elixir/test/update_documents_test.exs
index fcbdbea..2b78f87 100644
--- a/test/elixir/test/update_documents_test.exs
+++ b/test/elixir/test/update_documents_test.exs
@@ -117,6 +117,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["reason"] == "Invalid path."
end
+ @tag :pending # HTTP 500
@tag :with_db
test "update document", context do
db_name = context[:db_name]
@@ -151,6 +152,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["error"] == "method_not_allowed"
end
+ @tag :pending # HTTP 500
@tag :with_db
test "doc can be created", context do
db_name = context[:db_name]
@@ -167,6 +169,7 @@ defmodule UpdateDocumentsTest do
assert resp.status_code == 200
end
+ @tag :pending # HTTP 500
@tag :with_db
test "in place update", context do
db_name = context[:db_name]
@@ -187,6 +190,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["title"] == "test"
end
+ @tag :pending # HTTP 500
@tag :with_db
test "form update via application/x-www-form-urlencoded", context do
db_name = context[:db_name]
@@ -211,6 +215,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["formbar"] == "foo"
end
+ @tag :pending # HTTP 500
@tag :with_db
test "bump counter", context do
db_name = context[:db_name]
@@ -253,6 +258,7 @@ defmodule UpdateDocumentsTest do
assert String.length(resp.body) == 32
end
+ @tag :pending # HTTP 500
@tag :with_db
test "COUCHDB-1229 - allow slashes in doc ids for update handlers", context do
db_name = context[:db_name]
@@ -269,6 +275,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["counter"] == 2
end
+ @tag :pending # HTTP 500
@tag :with_db
test "COUCHDB-648 - the code in the JSON response should be honored", context do
db_name = context[:db_name]
@@ -296,6 +303,7 @@ defmodule UpdateDocumentsTest do
assert resp.body["ok"] == true
end
+ @tag :pending # HTTP 500
@tag :with_db
test "base64 response", context do
db_name = context[:db_name]
@@ -314,6 +322,7 @@ defmodule UpdateDocumentsTest do
assert String.contains?(resp.headers["Content-Type"], "application/octet-stream")
end
+ @tag :pending # HTTP 500
@tag :with_db
test "Insert doc with empty id", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/users_db_test.exs b/test/elixir/test/users_db_test.exs
index db86b27..4822fd4 100644
--- a/test/elixir/test/users_db_test.exs
+++ b/test/elixir/test/users_db_test.exs
@@ -101,6 +101,7 @@ defmodule UsersDbTest do
assert Couch.Session.logout(session).body["ok"]
end
+ @tag :pending # Timeout
@tag :with_db
test "users db", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/view_compaction_test.exs b/test/elixir/test/view_compaction_test.exs
index 5bdd2ea..9b6b8cc 100644
--- a/test/elixir/test/view_compaction_test.exs
+++ b/test/elixir/test/view_compaction_test.exs
@@ -5,9 +5,9 @@ defmodule ViewCompactionTest do
Test CouchDB View Compaction Behavior
This is a port of the view_compaction.js suite
"""
-
+
@moduletag kind: :single_node
-
+
@num_docs 1000
@ddoc %{
@@ -38,6 +38,7 @@ defmodule ViewCompactionTest do
end)
end
+ @tag :pending # Failed assertion. Also no compaction
@tag :with_db
test "view compaction", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/view_errors_test.exs b/test/elixir/test/view_errors_test.exs
index 80067ec..7b9eea4 100644
--- a/test/elixir/test/view_errors_test.exs
+++ b/test/elixir/test/view_errors_test.exs
@@ -165,6 +165,7 @@ defmodule ViewErrorsTest do
assert resp.body["error"] == "query_parse_error"
end
+ @tag :pending # Test timed out
@tag :with_db
test "infinite loop", context do
db_name = context[:db_name]
@@ -230,6 +231,7 @@ defmodule ViewErrorsTest do
assert resp.body["reason"] == "`keys` member must be an array."
end
+ @tag :pending # Assertion error
@tag :with_db
test "reduce overflow error", context do
db_name = context[:db_name]
@@ -255,6 +257,7 @@ defmodule ViewErrorsTest do
assert Enum.at(resp.body["rows"], 0)["error"] == "reduce_overflow_error"
end
+ @tag :pending # Error string mismatch
@tag :with_db
test "temporary view should give error message", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/view_include_docs_test.exs b/test/elixir/test/view_include_docs_test.exs
index a777530..c864129 100644
--- a/test/elixir/test/view_include_docs_test.exs
+++ b/test/elixir/test/view_include_docs_test.exs
@@ -163,6 +163,7 @@ defmodule ViewIncludeDocsTest do
assert row0["doc"]["_id"] == "10"
end
+ @tag :pending # Argument error
@tag :with_db
test "emitted _rev controls things", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/view_offsets_test.exs b/test/elixir/test/view_offsets_test.exs
index 9361a54..a4f254e 100644
--- a/test/elixir/test/view_offsets_test.exs
+++ b/test/elixir/test/view_offsets_test.exs
@@ -31,6 +31,7 @@ defmodule ViewOffsetTest do
}
}
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "basic view offsets", context do
db_name = context[:db_name]
@@ -60,6 +61,7 @@ defmodule ViewOffsetTest do
end)
end
+ @tag :pending # Offsets are always null on 4.x
test "repeated view offsets" do
0..14 |> Enum.each(fn _ -> repeated_view_offset_test_fun end)
end
diff --git a/test/elixir/test/view_pagination_test.exs b/test/elixir/test/view_pagination_test.exs
index 5aa1cd7..e82860e 100644
--- a/test/elixir/test/view_pagination_test.exs
+++ b/test/elixir/test/view_pagination_test.exs
@@ -9,6 +9,7 @@ defmodule ViewPaginationTest do
This is a port of the view_pagination.js test suite.
"""
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "basic view pagination", context do
db_name = context[:db_name]
@@ -30,6 +31,7 @@ defmodule ViewPaginationTest do
end)
end
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "aliases start_key and start_key_doc_id should work", context do
db_name = context[:db_name]
@@ -51,6 +53,7 @@ defmodule ViewPaginationTest do
end)
end
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "descending view pagination", context do
db_name = context[:db_name]
@@ -80,6 +83,7 @@ defmodule ViewPaginationTest do
end)
end
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "descending=false parameter should just be ignored", context do
db_name = context[:db_name]
@@ -107,6 +111,7 @@ defmodule ViewPaginationTest do
end)
end
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "endkey document id", context do
db_name = context[:db_name]
@@ -127,6 +132,7 @@ defmodule ViewPaginationTest do
test_end_key_doc_id(result, docs)
end
+ @tag :pending # Offsets are always null on 4.x
@tag :with_db
test "endkey document id, but with end_key_doc_id alias", context do
db_name = context[:db_name]
diff --git a/test/elixir/test/view_update_seq_test.exs b/test/elixir/test/view_update_seq_test.exs
index d1eca40..1449b54 100644
--- a/test/elixir/test/view_update_seq_test.exs
+++ b/test/elixir/test/view_update_seq_test.exs
@@ -34,6 +34,7 @@ defmodule ViewUpdateSeqTest do
int
end
+ @tag :pending # Update seq format changed
@tag :with_db
test "db info update seq", context do
db_name = context[:db_name]
@@ -47,6 +48,7 @@ defmodule ViewUpdateSeqTest do
assert seq_int(info["update_seq"]) == 1
end
+ @tag :pending # Update seq format changed
@tag :with_db
test "_all_docs update seq", context do
db_name = context[:db_name]
@@ -72,6 +74,7 @@ defmodule ViewUpdateSeqTest do
assert seq_int(resp.body["update_seq"]) == 101
end
+ @tag :pending # Update seq format changed
@tag :with_db
test "view update seq", context do
db_name = context[:db_name]