Exemplo n.º 1
0
def test_get_sas_component_bad_param(report: ViyaDeploymentReport) -> None:
    """
    This test verifies that a None value is returned when a request is made for an undefined SAS component in a
    completed report.

    :param report: The populated ViyaDeploymentReport returned by the report() fixture.
    """
    # make sure None is returned
    assert report.get_sas_component("sas-foo") is None
Exemplo n.º 2
0
def test_get_sas_component(report: ViyaDeploymentReport) -> None:
    """
    This test verifies that an existing SAS component is correctly returned from the gathered components.

    :param report: The populated ViyaDeploymentReport returned by the report() fixture.
    """
    # get SAS component information
    component: Dict = report.get_sas_component(
        KubectlTest.Values.COMPONENT_SAS_ANNOTATIONS_NAME)

    # check for expected attributes
    assert len(component) == 5
    assert KubernetesResource.Kinds.DEPLOYMENT in component
    assert KubernetesResource.Kinds.INGRESS in component
    assert KubernetesResource.Kinds.POD in component
    assert KubernetesResource.Kinds.REPLICA_SET in component
    assert KubernetesResource.Kinds.SERVICE in component