コード例 #1
0
        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));
        }
コード例 #2
0
 public async void CheckStatusAsync_WhenHealthy_ReturnsOk()
 {
     (await _store.CheckStatusAsync()).Should().Be(HealthCheckResponse.StatusOk);
 }