def test_docker_run_arango_random_root_password():
    """
    Test ArangoDB container with ARANGO_RANDOM_ROOT_PASSWORD var set.
    """
    image = f"{ARANGODB_IMAGE_NAME}:{IMAGE_VERSION}"
    arango_root_password = "passwd"

    with ArangoDbContainer(image, arango_random_root_password=True) as arango:
        client = ArangoClient(hosts=arango.get_connection_url())

        # Test invalid auth (we don't know the password in random mode)
        sys_db = client.db("_system", username="root", password=arango_root_password)
        with pytest.raises(ServerVersionError):
            assert sys_db.version() == IMAGE_VERSION

    Test ArangoDB container with ARANGO_RANDOM_ROOT_PASSWORD var set.
    
modules/arangodb/tests/test_arangodb.py