Skip to content

Commit

Permalink
Move elixir search tests to be with other elixir tests
Browse files Browse the repository at this point in the history
Now that dreyfus is integrated into CouchDB, its elixir tests can be
moved to be with the other elixir integration tests. As a bonus,
remove some unnecessary configuration.
  • Loading branch information
jaydoane committed Feb 16, 2023
1 parent 97fdac3 commit 395c083
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 64 deletions.
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ include version.mk

REBAR?=$(shell echo `pwd`/bin/rebar)
ERLFMT?=$(shell echo `pwd`/bin/erlfmt)
ROOT=$(shell pwd)

# Handle the following scenarios:
# 1. When building from a tarball, use version.mk.
Expand Down Expand Up @@ -271,16 +270,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: elixir-search - 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 test/elixir/test/config/search.elixir'

.PHONY: elixir-source-checks
elixir-source-checks: export MIX_ENV=integration
Expand Down
18 changes: 7 additions & 11 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ PYTHON=python.exe
ERLFMT?=$(CURDIR)\bin\erlfmt.cmd
MAKE=make -f Makefile.win
# REBAR?=$(shell where rebar.cmd)
ROOT=$(CURDIR)

# Handle the following scenarios:
# 1. When building from a tarball, use version.mk.
Expand Down Expand Up @@ -242,16 +241,13 @@ elixir-suite: elixir-init elixir-check-formatted elixir-credo 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 \
--locald-config test\config\test-config.ini \
--no-eval 'mix test --trace $(EXUNIT_OPTS)'
.PHONY: elixir-search
# target: elixir-search - 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 --include test/elixir/test/config/search.elixir'

.PHONY: elixir-check-formatted
elixir-check-formatted: elixir-init
Expand Down
30 changes: 0 additions & 30 deletions src/dreyfus/test/elixir/mix.exs

This file was deleted.

5 changes: 0 additions & 5 deletions src/dreyfus/test/elixir/mix.lock

This file was deleted.

2 changes: 0 additions & 2 deletions src/dreyfus/test/elixir/test/config/test-config.ini

This file was deleted.

6 changes: 0 additions & 6 deletions src/dreyfus/test/elixir/test/test_helper.exs

This file was deleted.

32 changes: 32 additions & 0 deletions test/elixir/test/config/search.elixir
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
%{
"PartitionSearchTest": [
"Cannot do global query with partition view",
"Cannot do partition query with global search ddoc",
"Only returns docs in partition not those in shard",
"Simple query returns partitioned search results",
"Works with bookmarks and limit",
"Works with limit using POST for on non-partitioned db",
"Works with limit using POST for partitioned db",
"normal search on non-partitioned dbs still work",
"normal search on non-partitioned dbs with limit",
"normal search on non-partitioned dbs with over limit",
"normal search on non-partitioned dbs without limit",
"rejects conflicting partition values",
"restricted parameters are not allowed in query or body"
],
"SearchTest": [
"clean up search index with invalid design document",
"drilldown multiple keys multiple values for POST",
"drilldown multiple keys single values for GET",
"drilldown multiple keys single values for POST",
"drilldown multiple query definitions for GET",
"drilldown multiple query definitions for POST",
"drilldown single key multiple values for GET",
"drilldown single key multiple values for POST",
"drilldown single key single value for GET",
"drilldown single key single value for POST",
"drilldown three keys single values for POST",
"search returns all items for GET",
"search returns all items for POST"
]
}
3 changes: 3 additions & 0 deletions test/elixir/test/config/test-config.ini
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.

0 comments on commit 395c083

Please sign in to comment.