diff options
author | Joan Touzet <wohali@users.noreply.github.com> | 2020-01-28 12:27:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 12:27:56 -0500 |
commit | 2623379012d7a6849b4ee660a8b4027097ac81b7 (patch) | |
tree | 3599855fea5b7eb9c70e9bc214568d896c2b33f3 | |
parent | 8684da4451c982830fc757e4e2a376835e1309f2 (diff) | |
parent | d59d84ac78e596a97d8ae014d7d84e7b306495d0 (diff) | |
download | couchdb-bump-revs-3.0.0.tar.gz |
Merge branch 'master' into bump-revs-3.0.0bump-revs-3.0.0
-rw-r--r-- | build-aux/Jenkinsfile.full | 26 | ||||
-rw-r--r-- | build-aux/Jenkinsfile.pr | 10 | ||||
-rw-r--r-- | src/mango/src/mango_selector_text.erl | 3 | ||||
-rw-r--r-- | src/mango/test/06-basic-text-test.py | 18 | ||||
-rw-r--r-- | src/mango/test/user_docs.py | 1 |
5 files changed, 39 insertions, 19 deletions
diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full index b9067a192..b1d46e846 100644 --- a/build-aux/Jenkinsfile.full +++ b/build-aux/Jenkinsfile.full @@ -81,7 +81,7 @@ pipeline { agent { docker { label 'docker' - image 'couchdbdev/debian-stretch-erlang-20.3.8.24-1:latest' + image 'couchdbdev/debian-stretch-erlang-20.3.8.25-1:latest' args "${DOCKER_ARGS}" alwaysPull true } @@ -161,7 +161,7 @@ pipeline { stage('CentOS 6') { agent { docker { - image 'couchdbdev/centos-6-erlang-20.3.8.24-1:latest' + image 'couchdbdev/centos-6-erlang-20.3.8.25-1:latest' label 'docker' args "${DOCKER_ARGS}" alwaysPull true @@ -205,7 +205,7 @@ pipeline { stage('CentOS 7') { agent { docker { - image 'couchdbdev/centos-7-erlang-20.3.8.24-1:latest' + image 'couchdbdev/centos-7-erlang-20.3.8.25-1:latest' label 'docker' args "${DOCKER_ARGS}" alwaysPull true @@ -250,7 +250,7 @@ pipeline { stage('CentOS 8') { agent { docker { - image 'couchdbdev/centos-8-erlang-20.3.8.24-1:latest' + image 'couchdbdev/centos-8-erlang-20.3.8.25-1:latest' label 'docker' args "${DOCKER_ARGS}" alwaysPull true @@ -295,7 +295,7 @@ pipeline { stage('Ubuntu Xenial') { agent { docker { - image 'couchdbdev/ubuntu-xenial-erlang-20.3.8.24-1:latest' + image 'couchdbdev/ubuntu-xenial-erlang-20.3.8.25-1:latest' label 'docker' args "${DOCKER_ARGS}" alwaysPull true @@ -339,7 +339,7 @@ pipeline { stage('Ubuntu Bionic') { agent { docker { - image 'couchdbdev/ubuntu-bionic-erlang-20.3.8.24-1:latest' + image 'couchdbdev/ubuntu-bionic-erlang-20.3.8.25-1:latest' label 'docker' alwaysPull true args "${DOCKER_ARGS}" @@ -383,7 +383,7 @@ pipeline { stage('Debian Stretch') { agent { docker { - image 'couchdbdev/debian-stretch-erlang-20.3.8.24-1:latest' + image 'couchdbdev/debian-stretch-erlang-20.3.8.25-1:latest' label 'docker' alwaysPull true args "${DOCKER_ARGS}" @@ -427,7 +427,7 @@ pipeline { stage('Debian Buster amd64') { agent { docker { - image 'couchdbdev/debian-buster-erlang-20.3.8.24-1:latest' + image 'couchdbdev/debian-buster-erlang-20.3.8.25-1:latest' label 'docker' alwaysPull true args "${DOCKER_ARGS}" @@ -471,7 +471,7 @@ pipeline { stage('Debian Buster arm64v8') { agent { docker { - image 'couchdbdev/arm64v8-debian-buster-erlang-20.3.8.24-1:latest' + image 'couchdbdev/arm64v8-debian-buster-erlang-20.3.8.25-1:latest' label 'arm64v8' alwaysPull true args "${DOCKER_ARGS}" @@ -515,7 +515,7 @@ pipeline { stage('Debian Buster ppc64le') { agent { docker { - image 'couchdbdev/ppc64le-debian-buster-erlang-20.3.8.24-1:latest' + image 'couchdbdev/ppc64le-debian-buster-erlang-20.3.8.25-1:latest' label 'ppc64le' alwaysPull true args "${DOCKER_ARGS}" @@ -584,12 +584,12 @@ pipeline { } stage('Pull latest docker image') { steps { - sh "docker pull couchdbdev/arm64v8-debian-buster-erlang-20.3.8.24-1:latest" + sh "docker pull couchdbdev/arm64v8-debian-buster-erlang-20.3.8.25-1:latest" } } stage('Build from tarball & test & packages') { steps { - withDockerContainer(image: "couchdbdev/arm64v8-debian-buster-erlang-20.3.8.24-1:latest", args: "${DOCKER_ARGS}") { + withDockerContainer(image: "couchdbdev/arm64v8-debian-buster-erlang-20.3.8.25-1:latest", args: "${DOCKER_ARGS}") { unstash 'tarball' withEnv(['MIX_HOME='+pwd(), 'HEX_HOME='+pwd()]) { sh( script: build_and_test ) @@ -629,7 +629,7 @@ pipeline { agent { docker { - image 'couchdbdev/debian-buster-erlang-20.3.8.24-1:latest' + image 'couchdbdev/debian-buster-erlang-20.3.8.25-1:latest' label 'docker' alwaysPull true args "${DOCKER_ARGS}" diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr index cf287b225..8c9cbd930 100644 --- a/build-aux/Jenkinsfile.pr +++ b/build-aux/Jenkinsfile.pr @@ -12,7 +12,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. - build_and_test = ''' mkdir -p ${COUCHDB_IO_LOG_DIR} ${ERLANG_VERSION} cd ${ERLANG_VERSION} @@ -46,11 +45,12 @@ pipeline { // npm config cache below deals with /home/jenkins not mapping correctly // inside the image DOCKER_ARGS = '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group' - // Also be sure to change these values in the matrix below... + // *** BE SURE TO CHANGE THE ERLANG VERSION FARTHER DOWN S WELL *** + // Search for ERLANG_VERSION // see https://issues.jenkins-ci.org/browse/JENKINS-40986 LOW_ERLANG_VER = '20.3.8.11' - MID_ERLANG_VER = '20.3.8.24' - HIGH_ERLANG_VER = '22.2' + MID_ERLANG_VER = '20.3.8.25' + HIGH_ERLANG_VER = '22.2.3' } options { @@ -106,7 +106,7 @@ pipeline { axes { axis { name 'ERLANG_VERSION' - values "20.3.8.11", "20.3.8.24", "22.2" + values "20.3.8.11", "20.3.8.25", "22.2.3" } } diff --git a/src/mango/src/mango_selector_text.erl b/src/mango/src/mango_selector_text.erl index 9e1116de6..b3b61ff26 100644 --- a/src/mango/src/mango_selector_text.erl +++ b/src/mango/src/mango_selector_text.erl @@ -366,7 +366,8 @@ value_str(Value) when is_binary(Value) -> true -> <<"\"", Value/binary, "\"">>; false -> - mango_util:lucene_escape_query_value(Value) + Escaped = mango_util:lucene_escape_query_value(Value), + <<"\"", Escaped/binary, "\"">> end; value_str(Value) when is_integer(Value) -> list_to_binary(integer_to_list(Value)); diff --git a/src/mango/test/06-basic-text-test.py b/src/mango/test/06-basic-text-test.py index db7cf32cb..a3fe383d6 100644 --- a/src/mango/test/06-basic-text-test.py +++ b/src/mango/test/06-basic-text-test.py @@ -95,6 +95,9 @@ class BasicTextTests(mango.UserDocsTextTests): assert len(docs) == 1 assert docs[0]["company"] == "Affluex" + docs = self.db.find({"foo": {"$lt": "bar car apple"}}) + assert len(docs) == 0 + def test_lte(self): docs = self.db.find({"age": {"$lte": 21}}) assert len(docs) == 0 @@ -113,6 +116,10 @@ class BasicTextTests(mango.UserDocsTextTests): for d in docs: assert d["user_id"] in (0, 11) + docs = self.db.find({"foo": {"$lte": "bar car apple"}}) + assert len(docs) == 1 + assert docs[0]["user_id"] == 14 + def test_eq(self): docs = self.db.find({"age": 21}) assert len(docs) == 0 @@ -156,6 +163,13 @@ class BasicTextTests(mango.UserDocsTextTests): docs = self.db.find({"company": {"$gt": "Zialactic"}}) assert len(docs) == 0 + docs = self.db.find({"foo": {"$gt": "bar car apple"}}) + assert len(docs) == 0 + + docs = self.db.find({"foo": {"$gt": "bar car"}}) + assert len(docs) == 1 + assert docs[0]["user_id"] == 14 + def test_gte(self): docs = self.db.find({"age": {"$gte": 77}}) assert len(docs) == 2 @@ -178,6 +192,10 @@ class BasicTextTests(mango.UserDocsTextTests): assert len(docs) == 1 assert docs[0]["company"] == "Zialactic" + docs = self.db.find({"foo": {"$gte": "bar car apple"}}) + assert len(docs) == 1 + assert docs[0]["user_id"] == 14 + def test_and(self): docs = self.db.find({"age": 22, "manager": True}) assert len(docs) == 1 diff --git a/src/mango/test/user_docs.py b/src/mango/test/user_docs.py index e0495353b..f6a33960e 100644 --- a/src/mango/test/user_docs.py +++ b/src/mango/test/user_docs.py @@ -343,6 +343,7 @@ DOCS = [ "city": "Axis", "address": {"street": "Brightwater Avenue", "number": 1106}, }, + "foo" : "bar car apple", "company": "Pharmex", "email": "faithhess@pharmex.com", "favorites": ["Erlang", "Python", "Lisp"], |