예제 #1
0
            def _check_two_ingresses():
                assert Ingress.get(name)
                assert Ingress.get("{}-1".format(name))

                for ingress_name, expected_dict in expected.items():
                    actual = Ingress.get(ingress_name)
                    assert_k8s_resource_matches(actual, expected_dict, IMAGE1, None, DEPLOYMENT_ID1, None, app_uid)
def deploy_successful(name, namespace, expected):
    for kind, expected_result in expected.items():
        if expected_result == SHOULD_NOT_EXIST:
            with pytest.raises(NotFound):
                kind.get(name, namespace=namespace)
        else:
            actual = kind.get(name, namespace=namespace)
            assert_k8s_resource_matches(actual, expected_result, IMAGE, "ClusterIP", DEPLOYMENT_ID, [])
예제 #3
0
    def action():
        for kind in kinds:
            assert kind.get(name)
        dep = Deployment.get(name)
        assert dep.spec.template.spec.containers[0].image == image
        svc = Service.get(name)
        assert svc.spec.type == service_type

        for kind, expected_dict in expected.items():
            actual = kind.get(name)
            assert_k8s_resource_matches(actual, expected_dict, image, service_type, deployment_id, strongbox_groups)