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)); }
public async void CheckStatusAsync_WhenHealthy_ReturnsOk() { (await _store.CheckStatusAsync()).Should().Be(HealthCheckResponse.StatusOk); }