def test_update_fc_version_operation_failure(
        self, mock_logger, mock_client, mock_db_service
    ):
        """Tests the error that's generated in the event that
        the feature compatability version update failed.
        """

        server_version = Version(f"{foc.MONGODB_MIN_VERSION.major + 1}.0.0")
        fc_version = Version(f"{foc.MONGODB_MIN_VERSION.major}.0.0")
        mock_admin = MagicMock()
        mock_client.admin = mock_admin
        mock_client.server_info.return_value = {"version": str(server_version)}

        mock_admin.command.side_effect = [
            {"featureCompatibilityVersion": {"version": str(fc_version)}},
            OperationFailure("Could not update FCV", 100),
        ]

        _update_fc_version(mock_client)

        # Check that the warning is triggered for the oldest supported version
        mock_logger.error.assert_any_call(
            "Operation failed while updating database's feature "
            "compatibility version - Could not update FCV. "
            f"Please manually set it to {foc.MONGODB_MIN_VERSION.major + 1}.0. "
            "You can suppress this exception by setting your "
            "`database_validation` config parameter to `False`. See "
            "https://docs.voxel51.com/user_guide/config.html#configuring-a-mongodb-connection "
            "for more information"
        )
Tests the error that's generated in the event that
        the feature compatability version update failed.
        
tests/unittests/fcv_tests.py