def test_update_fcv_success_minor_and_patch_versions(
        self, mock_logger, mock_client, mock_db_service
    ):
        """Tests that minor and patch mongoDB versions are upgraded
        as expected.
        """

        server_version = Version(f"{foc.MONGODB_MIN_VERSION.major + 1}.7.6")
        fc_version = Version(f"{foc.MONGODB_MIN_VERSION.major}.2.3")

        mock_admin = MagicMock()
        mock_client.admin = mock_admin
        mock_client.server_info.return_value = {"version": str(server_version)}

        mock_admin.command.return_value = {
            "featureCompatibilityVersion": {"version": str(fc_version)}
        }

        _update_fc_version(mock_client)

        # Check that the FCV update attempt was made with the correct version
        expected_call = self._get_expected_update_call(
            Version(f"{server_version.major}.0")
        )
        mock_admin.command.assert_any_call(expected_call)

        mock_logger.warning.assert_any_call(
            "You are running the oldest supported major version of MongoDB. "
            "Please refer to https://deprecation.voxel51.com "
            "for deprecation notices. "
            "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"
        )

        mock_logger.warning.assert_any_call(
            "Your MongoDB server version is newer than your feature "
            "compatibility version. "
            "Upgrading the feature compatibility version now. "
            "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 that minor and patch mongoDB versions are upgraded
        as expected.
        
tests/unittests/fcv_tests.py