You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2023/02/14 22:51:33 UTC

[couchdb] 01/01: Move elixir search tests with other elixir tests

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

jaydoane pushed a commit to branch consolidate-elixir-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit f011248c895c0b7719652caf077817684754cc81
Author: Jay Doane <ja...@apache.org>
AuthorDate: Tue Feb 14 14:51:20 2023 -0800

    Move elixir search tests with other elixir tests
    
    Now that dreyfus is integrated into CouchDB, its elixir tests can be
    moved to the other elixir integration tests, while removing some extra
    configuration.
---
 Makefile                                           | 15 +++++------
 src/dreyfus/test/elixir/mix.exs                    | 30 ----------------------
 src/dreyfus/test/elixir/mix.lock                   |  5 ----
 .../test/elixir/test/config/test-config.ini        |  2 --
 src/dreyfus/test/elixir/test/test_helper.exs       |  6 -----
 test/elixir/test/config/test-config.ini            |  3 +++
 .../elixir/test/partition_search_test.exs          |  0
 .../test => test}/elixir/test/search_test.exs      |  0
 8 files changed, 9 insertions(+), 52 deletions(-)

diff --git a/Makefile b/Makefile
index cdaaeadad..ef4ba6172 100644
--- a/Makefile
+++ b/Makefile
@@ -271,16 +271,13 @@ elixir-suite: elixir-init devclean
 		--erlang-config rel/files/eunit.config \
 		--no-eval 'mix test --trace --include test/elixir/test/config/suite.elixir --exclude test/elixir/test/config/skip.elixir'
 
-src/dreyfus/test/elixir/deps:
-	@cd src/dreyfus/test/elixir && mix deps.get
-
-.PHONY: dreyfus-test
-# target: dreyfus-test - Run Dreyfus tests, requires a running Clouseau instance
-dreyfus-test: export MIX_ENV=integration
-dreyfus-test: elixir-init devclean src/dreyfus/test/elixir/deps
-	@cd src/dreyfus/test/elixir && $(ROOT)/dev/run -n 1 -q -a adm:pass \
+.PHONY: elixir-search
+# target: Run search tests, requires a running Clouseau instance
+elixir-search: export MIX_ENV=integration
+elixir-search: elixir-init devclean
+	@dev/run -n 1 -q -a adm:pass \
 		--locald-config test/config/test-config.ini \
-		--no-eval 'mix test --trace $(EXUNIT_OPTS)'
+		--no-eval 'mix test --trace --include search $(EXUNIT_OPTS)'
 
 .PHONY: elixir-source-checks
 elixir-source-checks: export MIX_ENV=integration
diff --git a/src/dreyfus/test/elixir/mix.exs b/src/dreyfus/test/elixir/mix.exs
deleted file mode 100644
index f77d9d6a3..000000000
--- a/src/dreyfus/test/elixir/mix.exs
+++ /dev/null
@@ -1,30 +0,0 @@
-defmodule Foo.Mixfile do
-  use Mix.Project
-
-  def project do
-    [
-      app: :foo,
-      version: "0.1.0",
-      elixir: "~> 1.5",
-      start_permanent: Mix.env == :prod,
-      deps: deps()
-    ]
-  end
-
-  # Run "mix help compile.app" to learn about applications.
-  def application do
-    [
-      extra_applications: [:logger]
-    ]
-  end
-
-  # Run "mix help deps" to learn about dependencies.
-  defp deps do
-    [
-      # {:dep_from_hexpm, "~> 0.3.0"},
-      {:httpotion, "~> 3.0"},
-      {:jiffy, path: Path.expand("../../../jiffy", __DIR__)}
-      # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
-    ]
-  end
-end
diff --git a/src/dreyfus/test/elixir/mix.lock b/src/dreyfus/test/elixir/mix.lock
deleted file mode 100644
index 51d765b15..000000000
--- a/src/dreyfus/test/elixir/mix.lock
+++ /dev/null
@@ -1,5 +0,0 @@
-%{
-  "httpotion": {:hex, :httpotion, "3.1.0", "14d20d9b0ce4e86e253eb91e4af79e469ad949f57a5d23c0a51b2f86559f6589", [:mix], [{:ibrowse, "~> 4.4", [hex: :ibrowse, repo: "hexpm", optional: false]}], "hexpm", "2e1f3da5398258f67be9522793c2ccef157d3c9f7a4f69ec8e87184393efe9e0"},
-  "ibrowse": {:hex, :ibrowse, "4.4.1", "2b7d0637b0f8b9b4182de4bd0f2e826a4da2c9b04898b6e15659ba921a8d6ec2", [:rebar3], [], "hexpm", "1e86c591dbc6d270632625534986beca30813af7ce784e742e5fc38e342c29b3"},
-  "jiffy": {:hex, :jiffy, "0.14.13", "225a9a35e26417832c611526567194b4d3adc4f0dfa5f2f7008f4684076f2a01", [:rebar3], [], "hexpm", "be5f0b124d03284b79fa90e07c3cf7a04be1a6111e97e0c9059e3cc0c7aac11a"},
-}
diff --git a/src/dreyfus/test/elixir/test/config/test-config.ini b/src/dreyfus/test/elixir/test/config/test-config.ini
deleted file mode 100644
index 8ceff6fd1..000000000
--- a/src/dreyfus/test/elixir/test/config/test-config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[dreyfus]
-name = clouseau@127.0.0.1
diff --git a/src/dreyfus/test/elixir/test/test_helper.exs b/src/dreyfus/test/elixir/test/test_helper.exs
deleted file mode 100644
index 81083e910..000000000
--- a/src/dreyfus/test/elixir/test/test_helper.exs
+++ /dev/null
@@ -1,6 +0,0 @@
-Code.require_file "../../../../../test/elixir/lib/couch.ex", __DIR__
-Code.require_file "../../../../../test/elixir/lib/couch/dbtest.ex", __DIR__
-Code.require_file "../../../../../test/elixir/test/support/couch_test_case.ex", __DIR__
-Code.require_file "../../../../../test/elixir/lib/suite.ex", __DIR__
-Code.require_file "../../../../../test/elixir/test/test_helper.exs", __DIR__
-Couch.Test.Suite.start()
diff --git a/test/elixir/test/config/test-config.ini b/test/elixir/test/config/test-config.ini
index 1980139d1..190067643 100644
--- a/test/elixir/test/config/test-config.ini
+++ b/test/elixir/test/config/test-config.ini
@@ -1,2 +1,5 @@
 [chttpd]
 authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, proxy_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
+
+[dreyfus]
+name = clouseau@127.0.0.1
diff --git a/src/dreyfus/test/elixir/test/partition_search_test.exs b/test/elixir/test/partition_search_test.exs
similarity index 100%
rename from src/dreyfus/test/elixir/test/partition_search_test.exs
rename to test/elixir/test/partition_search_test.exs
diff --git a/src/dreyfus/test/elixir/test/search_test.exs b/test/elixir/test/search_test.exs
similarity index 100%
rename from src/dreyfus/test/elixir/test/search_test.exs
rename to test/elixir/test/search_test.exs