From c225934f98516355a0bc3a5058bf6a1197deea5e Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 21 Jan 2016 15:01:08 +0100 Subject: [PATCH 1/2] added --enable-boost-tests in case the boost libraries are not available --- UnitTests/Makefile.unittests | 4 ++-- configure.ac | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/UnitTests/Makefile.unittests b/UnitTests/Makefile.unittests index ba3a490120..6fa4b0e02a 100755 --- a/UnitTests/Makefile.unittests +++ b/UnitTests/Makefile.unittests @@ -340,7 +340,7 @@ unittests-config: .PHONY: unittests-boost -if ENABLE_MAINTAINER_MODE +if ENABLE_BOOST_TESTS unittests-boost: UnitTests/basics_suite UnitTests/geo_suite @echo @@ -420,7 +420,7 @@ unittests-boost: @echo "================================================================================" @echo - @echo "to enable boost unit-tests, install Boost test and configure with --enable-maintainer-mode" + @echo "to enable boost unit-tests, install Boost test and configure with --enable-boost-tests" @echo endif diff --git a/configure.ac b/configure.ac index b3fb368134..d507dc2b6e 100644 --- a/configure.ac +++ b/configure.ac @@ -422,13 +422,21 @@ dnl ---------------------------------------------------------------------------- BOOST_VERSION="1.58.0" BOOST_CPPFLAGS="-I${srcdir}/3rdParty/boost/${BOOST_VERSION}" +AC_ARG_ENABLE(boost-tests, + AS_HELP_STRING([--enable-boost-tests], [generate the unittests based on boost (default: $USE_MAINTAINER_MODE)]), + [tr_BOOST_TESTS="${enableval:-yes}"], + [tr_BOOST_TESTS="$USE_MAINTAINER_MODE"] +) + +AM_CONDITIONAL(ENABLE_BOOST_TESTS, test "x$tr_BOOST_TESTS" = xyes) + AC_SUBST(BOOST_VERSION) AC_SUBST(BOOST_CPPFLAGS) LIB_INFO="$LIB_INFO|BOOST: 3rdParty version" LIB_INFO="$LIB_INFO|BOOST VERSION: ${BOOST_VERSION}" - LIB_INFO="$LIB_INFO|BOOST_CPPFLAGS: ${BOOST_CPPFLAGS}" +LIB_INFO="$LIB_INFO|BOOST_TESTS: ${tr_BOOST_TESTS}" LIB_INFO="$LIB_INFO|." dnl ---------------------------------------------------------------------------- From 594f48c630de99bd6a64a4c67ae4606160cbc590 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 21 Jan 2016 15:03:20 +0100 Subject: [PATCH 2/2] Add missing return code if uniq constraints are violated. --- .../DocuBlocks/Rest/Documents/REST_DOCUMENT_CREATE.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/DocuBlocks/Rest/Documents/REST_DOCUMENT_CREATE.md b/Documentation/DocuBlocks/Rest/Documents/REST_DOCUMENT_CREATE.md index 897d74148f..b88fd7142e 100644 --- a/Documentation/DocuBlocks/Rest/Documents/REST_DOCUMENT_CREATE.md +++ b/Documentation/DocuBlocks/Rest/Documents/REST_DOCUMENT_CREATE.md @@ -71,6 +71,12 @@ /// is returned if the collection specified by *collection* is unknown. The /// response body contains an error document in this case. /// +/// @RESTRETURNCODE{409} +/// is returned if a document with the same qualifiers in +/// an indexed attribute conflicts with an already existing document +/// and thus violating that uniq constraint. +/// The response body contains an error document in this case. +/// /// @EXAMPLES /// /// Create a document in a collection named *products*. Note that the @@ -180,4 +186,4 @@ /// logJsonResponse(response); /// @END_EXAMPLE_ARANGOSH_RUN /// @endDocuBlock -//////////////////////////////////////////////////////////////////////////////// \ No newline at end of file +////////////////////////////////////////////////////////////////////////////////