| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
1) Fix sorting on strings and numbers
2) use 'string' type for string fields
3) use 'text' type for the default field
|
|
|
|
| |
Part of a series of changes to expunge MD5 entirely.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Nouveau - a new (experimental) full-text indexing feature for Apache CouchDB, using Lucene 9. Requires Java 11 or higher (19 is preferred).
|
|
|
|
|
|
|
|
| |
This fails more often on MacOS CI workers [1] but it seems to be a general
flaky test as the users auth ddoc is not guaranteed to be inserted
synchronously.
[1] https://github.com/apache/couchdb/issues/4397#issue-1551336429
|
|
|
|
| |
Now it is possible to define a JWT roles claim as a comma-seperated
list or as a JSON array of strings (the only allowed old behavior).
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Most of them have been ported to Elixir except the two replication tests.
Add the two replication tests to couch_replicator and remove the whole javascript subfolder.
For the "replication_id" got a bit further and test that other fields are
correctly replaced or ignored.
|
| |
|
|
|
|
|
|
|
|
| |
eventsource events should only ever contain data, id, event
or empty lines
adding a test to ensure that new code/changes
will not break this rule
|
| |
|
|
|
|
| |
After reverting #4094, bringing this back as a seperate fix.
|
|
|
|
|
| |
Migrate deprecated config option variable to new config option for :logger application.
Fixed `warning: :compile_time_purge_level option for the :logger application is deprecated,
use :compile_time_purge_matching instead`.
|
|
|
|
| |
This reverts commit daff65d8c8772c637eb60365d6e672543163a740.
|
|
|
|
| |
Add `retry_until()` to `create_doc()` to remove unstable tests.
|
|
|
|
|
| |
* Replace Sha-1 with Sha-256 for cookie authentication
* Fix proxyauth_test and remove it from skipping tests
|
|
|
|
|
|
|
|
| |
We saw it fail quite a few times already so adding a retry around it.
Unfortunately it could now fail with a timeout instead of an assert but since
we're updating a document there is no idempotent way to testing it (retry
until, then do the actual assert again below).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Elixir 13 is the only one which seems to work with Erlang 25.
But we can't use Elixir 13 because of a few compatibility issues so have to fix
this. That involves upgrading credo. However, as soon as credo was upgraded it
noticed a bunch of issues which also had to be fixed. Some of those were:
* Enum.map + join should be Enum.map_join
* Invalid module name in teardown `%___MODULE__` -> `%__MODULE__`
* `Mix.Config` is deprecated, use `Config`
* `db_test.ex` looks like a test module to credo, so renamed it, otherwise it has to have an .exs extension
* ibrowse had to be compiled so it could be properly analysed
Tested on macos (intel) with asdf installed elixir and erlang:
```
25.0.1 / 1.13.4-otp-25
24.3.4.1 / 1.13.4-otp-24
23.3.4.14 / 1.10.4-otp-23
```
|
|
|
|
|
| |
Cherry-picked commits from 0156a55012b76adb652c11032596d9801c71665e
Thx @kianmeng
|
|
|
|
|
|
|
|
| |
We forgot to transform the JOSE signature format to DER when verifying
ES signatures (and the reverse when signing).
Co-authored-by: Nick Vatamaniuc <vatamane@apache.org>
Co-authored-by: Jay Doane <jaydoane@apache.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If workers drop after when new_edits=false and revisions are already present,
attachment parser will go into `mp_abort_parse_atts` state but still keep
consuming the request data, draining the uploaded attachment data, which helps
ensure the connection process will be in a consistent state and ready to
process the next HTTP request.
Add a test to PUT the same attachment multiple times with new_edits=false and
check that those requests all succeed.
|
|
|
|
|
|
| |
This doesn't actually work as you'd expect. The response for the
new_edits=false request does return quickly, but the request body
is never consumed and so the _next_ request on the wire will hang.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking a few scenarios:
* _design/*/_info returns collation versions
* A 2.x view can upgraded to have a view info map
* A 3.2.1 view can be upgraded to have a view info map
* A view with multiple collator versions:
- Can be opened and tagged with the current libicu version
- Can be queried, written to and then queried again
- Will be submitted for compaction when open and on updates
- After compaction the view will have only one collator version
Includes two new fixture views:
* Version 3.2.1 view without the view info map field
* A view with a bogus (old) libicu version "1.1.1.1"
The bogus libicu version view is generated by overriding the collation
version API to return `[1, 1, 1, 1]` [1]. And it can be re-created
with this snippet [2]
[1]
```
update_collator_versions(#{} = ViewInfo) ->
Versions = maps:get(ucol_vs, ViewInfo, []),
- Ver = tuple_to_list(couch_ejson_compare:get_collator_version()),
+ % Ver = tuple_to_list(couch_ejson_compare:get_collator_version()),
+ Ver = [1, 1, 1, 1],
```
[2] `http` is the `httpie` command line HTTP client
```
http delete $DB/colltest1 && http put $DB/colltest1'?q=1' && http put $DB/colltest1/_design/colltest1ddoc views:='{"colltest1view":{"map":"function(doc){emit(doc.id, null);}"}}' && http put $DB/colltest1/d1 a=b && http put $DB/colltest1/d2 c=d
```
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code that generates suite.elixir will repreatedly strip the "test "
from the name of the test when writing the file, resulting in a mismatch
between the actual test name and what's in suite.elixir. You can see
this by searching for e.g. COUCHDB-497 in the suite file.
I tried using String.replace_prefix instead of String.replace_leading in
test_name() but that function seems to get called multiple times during
the test grouping. Simpler to just avoid naming the tests that way for
now.
|
|
|
|
|
|
|
|
|
| |
The `skip.elixir` file was ported [1] from FDB-based main branch but
contains more exclusions than necessary for 3.x.
This removes tests from `skip.elixir` that pass on 3.x.
[1] https://github.com/apache/couchdb/commit/65fbc6cfdb29bab1072a42f4d6005da452a7fa65#diff-d9485d6f3162015017bc09c9db3f87df0ca489d961c44347241a035854eb8044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminates the following:
warning: variable "epoch" is unused (if the variable is not meant to be used, prefix it with an underscore)
src/couchdb/test/elixir/test/replication_test.exs:1756: ReplicationTest.seq_to_shards/1
warning: variable "uuid" is unused (if the variable is not meant to be used, prefix it with an underscore)
src/couchdb/test/elixir/test/replication_test.exs:1756: ReplicationTest.seq_to_shards/1
warning: variable "string" is unused (if the variable is not meant to be used, prefix it with an underscore)
src/couchdb/test/elixir/test/utf8_test.exs:32: UTF8Test."test UTF8 support"/1
warning: variable "repeated_view_offset_test_fun" does not exist and is being expanded to "repeated_view_offset_test_fun()", please use parentheses to remove the ambiguity or change the variable name
src/couchdb/test/elixir/test/view_offsets_test.exs:63: ViewOffsetTest."test repeated view offsets"/1
|
|
|
|
|
|
|
|
|
| |
This fixes issue: https://github.com/apache/couchdb/issues/3786
In addition, add few _all_dbs limit tests since we didn't seem to have
any previously to catch such issues. Plus, test some of the corner
cases which should be caught by the BDU and should return a 403 error
code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means `update_seq` values from `GET $db` `last_seq` returned from ` GET
$db/_changes?since=now&limit=` will be more resilient to change feed rewinds.
Besides, those sequences will now be more consistent and users won't have to
wonder why one opaque sequence works slightly differently than another opaque
update sequence.
Previously, when the sequences were returned only as numeric values, it was
impossible to calculate replacements and change feeds had to always rewind back
to 0 for those ranges. With uuids and epochs in play, it is possible to figure
out that some shards might have moved to new nodes or find internal replication
checkpoints to avoid streaming changes feeds from 0 on those ranges.
Some replication Elixir tests decode update sequences, so those were updated to
handle the new uuid and epoch format as well.
Fixes: https://github.com/apache/couchdb/issues/3787
Co-author: Adam Kocoloski kocolosk@apache.org
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Results should now be returned in descending {key, doc_id} order.
The idea is to reverse the key list before sending it to the workers, so they
will emit rows in reverse order. Also, we are using the same reversed list when
building the KeyDict structure on the coordinator. That way the order of the
sent rows and the expected coordinator sorting order will match.
For testing, enhance an existing multi-key Elixir view test to test both
ascending and descending cases and actually check that the rows are in the
correct order each time.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New `elixir-suite` Makefile target is added. It runs a predefined set of elixir
integration tests.
The feature is controlled by two files:
- test/elixir/test/config/suite.elixir - contains list of all available tests
- test/elixir/test/config/skip.elixir - contains list of tests to skip
In order to update the `test/elixir/test/config/suite.elixir` when new tests
are added. The one would need to run the following command:
```
MIX_ENV=integration mix suite > test/elixir/test/config/suite.elixir
```
|
|
|
|
|
|
|
|
|
|
|
| |
While including a payload within a DELETE request is not forbidden by RFC7231
its presence on a delete attachment request leaves a mochiweb acceptor
in a semi-opened state since mochiweb's using lazy load for the request bodies.
This makes a next immediate request to the same acceptor to hung
until previous request's receive timeout.
This PR adds a step to explicitly "drain" and discard an entity body on a
delete attachment request to prevent that.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The main fix is to switch crypto functions to use the new versions for
22+ while keeping Erlang 20 still working.
```
crypto:hmac(Alg, Key, Message) -> crypto:mac(hmac, Alg, Key, Message)
```
|
|
|
|
|
| |
`fabric.get_doc_info/3` requires three arguments, but this line was
only using one.
|