You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpytest@pytest.mark.namespace(create=True, name='test')@pytest.mark.applymanifests('.', files=['ingress.yaml'])deftest_ingress(kube):
"""An example test against an tangodb deployment."""# wait for the manifests loaded by the 'applymanifests' marker# to be ready on the clusterkube.wait_for_registered(timeout=30)
ingresses=kube.get_ingresses()
tango_ingress=ingresses.get('rest-api-ska-tango-base-RELEASE-NAME')
asserttango_ingressisnotNoneasserttango_ingress.is_ready()
The error that I get when I run pytest -s test_ingress.py --kube-config=~/.kube/config:
> f"Unable to determine object type for manifest: {manifest}", )E ValueError: Unable to determine object type for manifest: {'apiVersion': 'networking.k8s.io/v1', 'kind': 'Ingress', 'metadata': {'name': 'rest-api-ska-tango-base', 'namespace': 'default', 'labels': {'app': 'ska-tango-images', 'component': 'tango-rest', 'function': 'tango-http-interface', 'domain': 'tango-configuration', 'intent': 'enabling'}, 'annotations': {'kubernetes.io/ingress.class': 'nginx', 'nginx.ingress.kubernetes.io/rewrite-target': '/$1', 'app.gitlab.com/app': 'CI_PROJECT_PATH_SLUG', 'app.gitlab.com/env': 'CI_ENVIRONMENT_SLUG'}}, 'spec': {'rules': [{'http': {'paths': [{'path': '/default/(tango/rest/.*)', 'pathType': 'Prefix', 'backend': {'service': {'name': 'ska-tango-base-tango-rest', 'port': {'number': 8080}}}}]}}]}}../../../../../.local/lib/python3.6/site-packages/kubetest/manifest.py:108: ValueError================================================================================= short test summary info ==================================================================================ERROR test_ingress.py::test_ingress - ValueError: Unable to determine object type for manifest: {'apiVersion': 'networking.k8s.io/v1', 'kind': 'Ingress', 'metadata': {'name': 'rest-api-...===================================================================================== 1 error in 0.19s =====================================================================================
I'm using kubernetes==17.17.0.
The text was updated successfully, but these errors were encountered:
I get an error when I try to create a
Ingress
resource in my test.Sample
ingress.yaml
file:Sample
test_ingress.py
test:The error that I get when I run
pytest -s test_ingress.py --kube-config=~/.kube/config
:I'm using
kubernetes==17.17.0
.The text was updated successfully, but these errors were encountered: