def test_kubernetes_metrics_get_cpu_cores( kubernetes_metrics_obj: KubernetesMetrics) -> None: """ This test verifies that KubernetesMetrics.get_cpu_cores() returns the correct value for defined metrics. :param kubernetes_metrics_obj: The pre-loaded KubernetesMetrics fixture object for testing. """ assert kubernetes_metrics_obj.get_cpu_cores("node") == "398m" assert kubernetes_metrics_obj.get_cpu_cores("pod") == "13m"
def test_kubernetes_metrics_get_cpu_cores_missing( kubernetes_metrics_obj: KubernetesMetrics) -> None: """ This test verifies that KubernetesMetrics.get_cpu_cores() returns None for undefined metrics. :param kubernetes_metrics_obj: The pre-loaded KubernetesMetrics fixture object for testing. """ assert kubernetes_metrics_obj.get_cpu_cores("foo") is None