|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Phase 3.2 - Adapter Functionality Verification Tests. More...
#include <gtest/gtest.h>#include <kcenon/monitoring/adapters/logger_adapters.h>#include <kcenon/monitoring/core/event_bus.h>#include <kcenon/common/interfaces/logger_interface.h>#include <memory>#include <atomic>#include <kcenon/monitoring/adapters/performance_monitor_adapter.h>
Go to the source code of this file.
Classes | |
| class | mock_logger |
| Mock logger for testing (does not depend on logger_system) More... | |
Functions | |
| TEST (AdapterFunctionalityTest, WorksWithoutLogger) | |
| Test Scenario 1: Adapter with NULL logger. | |
| TEST (AdapterFunctionalityTest, WorksWithMockLogger) | |
| Test Scenario 2: Adapter with mock logger. | |
| TEST (AdapterFunctionalityTest, RuntimeLoggerInjection) | |
| Test Scenario 3: Runtime logger injection. | |
| TEST (AdapterFunctionalityTest, WorksWithMonitorableLogger) | |
| Test Scenario 4: Adapter with IMonitorable logger. | |
| TEST (AdapterFunctionalityTest, MultipleAdaptersIndependent) | |
| Test Scenario 5: Multiple adapters with different loggers. | |
| TEST (PerformanceMonitorAdapterFactoryTest, CreateWithValidMonitor) | |
| TEST (PerformanceMonitorAdapterFactoryTest, CreateWithNullMonitor) | |
| TEST (PerformanceMonitorAdapterFactoryTest, MakeMonitorAdapterWithValidMonitor) | |
| TEST (PerformanceMonitorAdapterFactoryTest, MakeMonitorAdapterWithNullMonitor) | |
Phase 3.2 - Adapter Functionality Verification Tests.
Tests verify that adapters work correctly with:
Definition in file test_adapter_functionality.cpp.
| TEST | ( | AdapterFunctionalityTest | , |
| MultipleAdaptersIndependent | ) |
Test Scenario 5: Multiple adapters with different loggers.
Definition at line 197 of file test_adapter_functionality.cpp.
| TEST | ( | AdapterFunctionalityTest | , |
| RuntimeLoggerInjection | ) |
Test Scenario 3: Runtime logger injection.
Definition at line 109 of file test_adapter_functionality.cpp.
| TEST | ( | AdapterFunctionalityTest | , |
| WorksWithMockLogger | ) |
Test Scenario 2: Adapter with mock logger.
Definition at line 88 of file test_adapter_functionality.cpp.
| TEST | ( | AdapterFunctionalityTest | , |
| WorksWithMonitorableLogger | ) |
Test Scenario 4: Adapter with IMonitorable logger.
This test demonstrates that the adapter can work with any ILogger that also implements IMonitorable, without requiring the concrete logger_system classes.
Definition at line 139 of file test_adapter_functionality.cpp.
References kcenon::monitoring::metrics_snapshot::add_metric(), kcenon::monitoring::health_check_result::message, kcenon::monitoring::metrics_snapshot::source_id, and kcenon::monitoring::health_check_result::status.

| TEST | ( | AdapterFunctionalityTest | , |
| WorksWithoutLogger | ) |
Test Scenario 1: Adapter with NULL logger.
Definition at line 70 of file test_adapter_functionality.cpp.
| TEST | ( | PerformanceMonitorAdapterFactoryTest | , |
| CreateWithNullMonitor | ) |
Definition at line 223 of file test_adapter_functionality.cpp.
References kcenon::monitoring::performance_monitor_adapter::create().

| TEST | ( | PerformanceMonitorAdapterFactoryTest | , |
| CreateWithValidMonitor | ) |
Definition at line 216 of file test_adapter_functionality.cpp.
References kcenon::monitoring::performance_monitor_adapter::create().

| TEST | ( | PerformanceMonitorAdapterFactoryTest | , |
| MakeMonitorAdapterWithNullMonitor | ) |
Definition at line 235 of file test_adapter_functionality.cpp.
References kcenon::monitoring::make_monitor_adapter().

| TEST | ( | PerformanceMonitorAdapterFactoryTest | , |
| MakeMonitorAdapterWithValidMonitor | ) |
Definition at line 228 of file test_adapter_functionality.cpp.
References kcenon::monitoring::make_monitor_adapter().
