Skip to content

Flaky test_ssl_cert_authentication/test.py::test_native_wrong_cert #66117

@pamarcos

Description

@pamarcos

Report: https://s3.amazonaws.com/clickhouse-test-reports/65838/13f4d0d7cfda499e44cbcabcdfda0557270fde04/integration_tests__aarch64__[6_6].html

=================================== FAILURES ===================================
____________________________ test_native_wrong_cert ____________________________
[gw3] linux -- Python 3.10.12 /usr/bin/python3

    def test_native_wrong_cert():
        # Wrong certificate: different user's certificate
        with pytest.raises(Exception) as err:
            execute_query_native(
                instance, "SELECT currentUser()", user="john", cert_name="client2"
            )
        assert "AUTHENTICATION_FAILED" in str(err.value)
    
        # Wrong certificate: self-signed certificate.
        # In this case clickhouse-client itself will throw an error
        with pytest.raises(Exception) as err:
            execute_query_native(
                instance, "SELECT currentUser()", user="john", cert_name="wrong"
            )
>       assert "unknown ca" in str(err.value)
E       AssertionError: assert 'unknown ca' in 'Client failed! Return code: 210, stderr: Code: 210. DB::NetException: Net Exception: Socket is not connected (172.16.1.2:9440). (NETWORK_ERROR)\n\n'
E        +  where 'Client failed! Return code: 210, stderr: Code: 210. DB::NetException: Net Exception: Socket is not connected (172.16.1.2:9440). (NETWORK_ERROR)\n\n' = str(QueryRuntimeException('Client failed! Return code: 210, stderr: Code: 210. DB::NetException: Net Exception: Socket is not connected (172.16.1.2:9440). (NETWORK_ERROR)\n\n'))
E        +    where QueryRuntimeException('Client failed! Return code: 210, stderr: Code: 210. DB::NetException: Net Exception: Socket is not connected (172.16.1.2:9440). (NETWORK_ERROR)\n\n') = <ExceptionInfo QueryRuntimeException('Client failed! Return code: 210, stderr: Code: 210. DB::NetException: Net Exception: Socket is not connected (172.16.1.2:9440). (NETWORK_ERROR)\n\n') tblen=5>.value

test_ssl_cert_authentication/test.py:125: AssertionError
=============================== warnings summary ===============================
test_table_function_mongodb/test.py::test_auth_source[False]
test_table_function_mongodb/test.py::test_secure_connection[True]
test_table_function_mongodb/test.py::test_simple_select[False]
  /ClickHouse/tests/integration/helpers/cluster.py:2495: DeprecationWarning: database_names is deprecated. Use list_database_names instead.
    logging.debug(f"Connected to Mongo dbs: {connection.database_names()}")

test_table_function_mongodb/test.py::test_auth_source[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:227: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    admin_db.add_user(

test_table_function_mongodb/test.py::test_complex_data_type[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:89: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

test_table_function_mongodb/test.py::test_complex_data_type[False]
test_table_function_mongodb/test.py::test_secure_connection[True]
test_table_function_mongodb/test.py::test_simple_select[False]
  /usr/local/lib/python3.10/dist-packages/pymongo/database.py:1247: DeprecationWarning: Creating a user with the read_only option or without roles is deprecated in MongoDB >= 2.6
    warnings.warn("Creating a user with the read_only option "

test_table_function_mongodb/test.py::test_incorrect_data_type[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:124: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

test_table_function_mongodb/test.py::test_missing_columns[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:263: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

test_table_function_mongodb/test.py::test_predefined_connection_configuration[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:186: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

test_table_function_mongodb/test.py::test_secure_connection[True]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:145: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

test_table_function_mongodb/test.py::test_simple_select[False]
  /ClickHouse/tests/integration/test_table_function_mongodb/test.py:47: DeprecationWarning: add_user is deprecated and will be removed in PyMongo 4.0. Use db.command with createUser or updateUser instead
    db.add_user("root", "clickhouse")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Metadata

Metadata

Assignees

Labels

flaky testflaky test found by CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions