public void CheckStatus_WhenHealthy_ReturnsOk()
        {
            _mockAppSettings.Setup(m => m.IsCrmIntegrationPaused).Returns(false);
            _mockService.Setup(m => m.CheckStatus()).Returns(HealthCheckResponse.StatusOk);

            _crm.CheckStatus().Should().Be(HealthCheckResponse.StatusOk);
        }
        public async Task <IActionResult> HealthCheck()
        {
            var response = new HealthCheckResponse()
            {
                GitCommitSha = _env.GitCommitSha,
                Environment  = _env.EnvironmentName,
                Hangfire     = _hangfire.CheckStatus(),
                Database     = await _store.CheckStatusAsync(),
                Crm          = _crm.CheckStatus(),
                Notify       = await _notifyService.CheckStatusAsync(),
                Redis        = await _redis.CheckStatusAsync(),
            };

            return(Ok(response));
        }
Example #3
0
        public void CheckStatus_WhenHealthy_ReturnsOk()
        {
            _mockService.Setup(mock => mock.CheckStatus()).Returns(HealthCheckResponse.StatusOk);

            _crm.CheckStatus().Should().Be(HealthCheckResponse.StatusOk);
        }