diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index ee183d39322..418f515dc4a 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -154,8 +154,12 @@ add_contrib (idna-cmake idna) add_contrib (datasketches-cpp-cmake datasketches-cpp) add_contrib (incbin-cmake incbin) add_contrib (sqids-cpp-cmake sqids-cpp) -add_contrib (mongo-c-driver-cmake mongo-c-driver) # requires: zlib -add_contrib (mongo-cxx-driver-cmake mongo-cxx-driver) # requires: libmongoc, libbson + +option(ENABLE_MONGODB "Enable MongoDB support" ${ENABLE_LIBRARIES}) +if (ENABLE_MONGODB) + add_contrib (mongo-c-driver-cmake mongo-c-driver) # requires: zlib + add_contrib (mongo-cxx-driver-cmake mongo-cxx-driver) # requires: libmongoc, libbson +endif() option(ENABLE_NLP "Enable NLP functions support" ${ENABLE_LIBRARIES}) if (ENABLE_NLP) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index e236c40a38b..a2d92a108c9 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -1445,9 +1445,9 @@ class ClickHouseCluster: def setup_azurite_cmd(self, instance, env_variables, docker_compose_yml_dir): self.with_azurite = True env_variables["AZURITE_PORT"] = str(self.azurite_port) - env_variables[ - "AZURITE_STORAGE_ACCOUNT_URL" - ] = f"http://azurite1:{env_variables['AZURITE_PORT']}/devstoreaccount1" + env_variables["AZURITE_STORAGE_ACCOUNT_URL"] = ( + f"http://azurite1:{env_variables['AZURITE_PORT']}/devstoreaccount1" + ) env_variables["AZURITE_CONNECTION_STRING"] = ( f"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;" f"AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" @@ -1643,9 +1643,9 @@ class ClickHouseCluster: # Code coverage files will be placed in database directory # (affect only WITH_COVERAGE=1 build) - env_variables[ - "LLVM_PROFILE_FILE" - ] = "/var/lib/clickhouse/server_%h_%p_%m.profraw" + env_variables["LLVM_PROFILE_FILE"] = ( + "/var/lib/clickhouse/server_%h_%p_%m.profraw" + ) clickhouse_start_command = CLICKHOUSE_START_COMMAND if clickhouse_log_file: diff --git a/tests/integration/test_storage_mongodb_new/test.py b/tests/integration/test_storage_mongodb_new/test.py index 949b4be9cbc..950938304d4 100644 --- a/tests/integration/test_storage_mongodb_new/test.py +++ b/tests/integration/test_storage_mongodb_new/test.py @@ -522,7 +522,8 @@ def test_auth_source(started_cluster): mongo_connection = get_mongo_connection(started_cluster, with_credentials=False) admin_db = mongo_connection["admin"] admin_db.command("dropAllUsersFromDatabase") - admin_db.command("createUser", + admin_db.command( + "createUser", "root", pwd="clickhouse", roles=[{"role": "userAdminAnyDatabase", "db": "admin"}, "readWriteAnyDatabase"],