|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Unit tests for health monitoring functionality. More...
#include <gtest/gtest.h>#include <atomic>#include <chrono>#include <memory>#include <mutex>#include <thread>#include <kcenon/monitoring/health/health_monitor.h>
Go to the source code of this file.
Classes | |
| class | test_health_check |
| class | HealthMonitoringTest |
Functions | |
| TEST_F (HealthMonitoringTest, HealthCheckResultStaticFactories) | |
| TEST_F (HealthMonitoringTest, FunctionalHealthCheck) | |
| TEST_F (HealthMonitoringTest, CompositeHealthCheckAllRequired) | |
| TEST_F (HealthMonitoringTest, CompositeHealthCheckAnyRequired) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphAddNode) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphAddDependency) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphCycleDetection) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphTopologicalSort) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphCheckWithDependencies) | |
| TEST_F (HealthMonitoringTest, HealthDependencyGraphFailureImpact) | |
| TEST_F (HealthMonitoringTest, HealthMonitorRegisterUnregister) | |
| TEST_F (HealthMonitoringTest, HealthMonitorStartStop) | |
| TEST_F (HealthMonitoringTest, HealthMonitorCheckSpecific) | |
| TEST_F (HealthMonitoringTest, HealthMonitorCheckAll) | |
| TEST_F (HealthMonitoringTest, HealthMonitorOverallStatus) | |
| TEST_F (HealthMonitoringTest, HealthMonitorDependencies) | |
| TEST_F (HealthMonitoringTest, HealthMonitorRecoveryHandler) | |
| TEST_F (HealthMonitoringTest, HealthMonitorStats) | |
| TEST_F (HealthMonitoringTest, HealthCheckBuilder) | |
| TEST_F (HealthMonitoringTest, GlobalHealthMonitor) | |
| TEST_F (HealthMonitoringTest, HealthMonitorReport) | |
| TEST_F (HealthMonitoringTest, ConcurrentHealthChecks) | |
Unit tests for health monitoring functionality.
Definition in file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| CompositeHealthCheckAllRequired | ) |
Definition at line 110 of file test_health_monitoring.cpp.
References kcenon::monitoring::composite_health_check::add_check(), and kcenon::monitoring::composite_health_check::check().

| TEST_F | ( | HealthMonitoringTest | , |
| CompositeHealthCheckAnyRequired | ) |
Definition at line 136 of file test_health_monitoring.cpp.
References kcenon::monitoring::composite_health_check::add_check(), and kcenon::monitoring::composite_health_check::check().

| TEST_F | ( | HealthMonitoringTest | , |
| ConcurrentHealthChecks | ) |
Definition at line 565 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| FunctionalHealthCheck | ) |
Definition at line 91 of file test_health_monitoring.cpp.
References kcenon::monitoring::functional_health_check::check(), kcenon::monitoring::functional_health_check::get_name(), kcenon::monitoring::functional_health_check::get_type(), and kcenon::monitoring::health_check_result::healthy().

| TEST_F | ( | HealthMonitoringTest | , |
| GlobalHealthMonitor | ) |
Definition at line 527 of file test_health_monitoring.cpp.
References kcenon::monitoring::global_health_monitor().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthCheckBuilder | ) |
Definition at line 506 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_check_builder::build(), kcenon::monitoring::health_check_builder::critical(), kcenon::monitoring::health_check_result::healthy(), kcenon::monitoring::health_check_builder::with_check(), kcenon::monitoring::health_check_builder::with_name(), and kcenon::monitoring::health_check_builder::with_type().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthCheckResultStaticFactories | ) |
Definition at line 71 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_check_result::degraded(), kcenon::monitoring::degraded, kcenon::monitoring::health_check_result::healthy(), kcenon::monitoring::healthy, kcenon::monitoring::health_check_result::unhealthy(), and kcenon::monitoring::unhealthy.

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphAddDependency | ) |
Definition at line 175 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_dependency(), kcenon::monitoring::health_dependency_graph::add_node(), kcenon::monitoring::health_dependency_graph::get_dependencies(), and kcenon::monitoring::health_dependency_graph::get_dependents().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphAddNode | ) |
Definition at line 160 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_node().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphCheckWithDependencies | ) |
Definition at line 256 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_dependency(), kcenon::monitoring::health_dependency_graph::add_node(), and kcenon::monitoring::health_dependency_graph::check_with_dependencies().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphCycleDetection | ) |
Definition at line 198 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_dependency(), kcenon::monitoring::health_dependency_graph::add_node(), and kcenon::monitoring::health_dependency_graph::would_create_cycle().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphFailureImpact | ) |
Definition at line 288 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_dependency(), kcenon::monitoring::health_dependency_graph::add_node(), and kcenon::monitoring::health_dependency_graph::get_failure_impact().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthDependencyGraphTopologicalSort | ) |
Definition at line 222 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_dependency_graph::add_dependency(), kcenon::monitoring::health_dependency_graph::add_node(), and kcenon::monitoring::health_dependency_graph::topological_sort().

| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorCheckAll | ) |
Definition at line 384 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorCheckSpecific | ) |
Definition at line 363 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorDependencies | ) |
Definition at line 437 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorOverallStatus | ) |
Definition at line 404 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorRecoveryHandler | ) |
Definition at line 456 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_monitor_config::check_interval, and kcenon::monitoring::health_monitor_config::enable_auto_recovery.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorRegisterUnregister | ) |
Definition at line 320 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorReport | ) |
Definition at line 538 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorStartStop | ) |
Definition at line 344 of file test_health_monitoring.cpp.
| TEST_F | ( | HealthMonitoringTest | , |
| HealthMonitorStats | ) |
Definition at line 482 of file test_health_monitoring.cpp.