def test_update_fcv_log_minimum_version(
        self, mock_logger, mock_client, mock_db_service
    ):
        """Tests an edge case where the both the FCV and server
        version are the oldest supported version. No actions should
        take place, only logs.
        """

        server_version = Version(f"{foc.MONGODB_MIN_VERSION.major}.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.return_value = {
            "featureCompatibilityVersion": {"version": str(fc_version)}
        }

        _update_fc_version(mock_client)

        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"
        )

        with self.assertRaises(AssertionError):
            # Check that this log wasn't shown.
            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"
            )

        with self.assertRaises(AssertionError):
            # Check that no update occurred.
            expected_call = self._get_expected_update_call(
                Version(f"{server_version.major}.0")
            )
            mock_admin.command.assert_any_call(expected_call)
Tests an edge case where the both the FCV and server
        version are the oldest supported version. No actions should
        take place, only logs.
        
tests/unittests/fcv_tests.py