Ejemplo n.º 1
0
def test_kubernetes_resource_get_label_missing(
        sas_kubernetes_resource_obj: KubernetesResource) -> None:
    """
    This test verifies that KubernetesResource.get_label() returns None for an undefined label on a defined resource.

    :param sas_kubernetes_resource_obj: The pre-loaded SAS KubernetesResource object fixture for testing.
    """
    assert sas_kubernetes_resource_obj.get_label("foo") is None
Ejemplo n.º 2
0
def test_kubernetes_resource_get_label(
        sas_kubernetes_resource_obj: KubernetesResource) -> None:
    """
    This test verifies that KubernetesResource.get_label() returns the correct value for a defined resource.

    :param sas_kubernetes_resource_obj: The pre-loaded SAS KubernetesResource object fixture for testing.
    """
    assert sas_kubernetes_resource_obj.get_label(
        "sas.com/admin") == "namespace"