def test_kubernetes_metrics_get_memory_bytes( kubernetes_metrics_obj: KubernetesMetrics) -> None: """ This test verifies that KubernetesMetrics.get_memory_bytes() returns the correct value for defined metrics. :param kubernetes_metrics_obj: The pre-loaded KubernetesMetrics fixture object for testing. """ assert kubernetes_metrics_obj.get_memory_bytes("node") == "2255Mi" assert kubernetes_metrics_obj.get_memory_bytes("pod") == "50Mi"
def test_kubernetes_metrics_get_memory_bytes_missing( kubernetes_metrics_obj: KubernetesMetrics) -> None: """ This test verifies that KubernetesMetrics.get_memory_bytes() returns None for undefined metrics. :param kubernetes_metrics_obj: The pre-loaded KubernetesMetrics fixture object for testing. """ assert kubernetes_metrics_obj.get_memory_bytes("foo") is None