Skip to content

Commit 71a750a

Browse files
committed
Update OpenAPI validation tests
1 parent 4adf7a5 commit 71a750a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/suite/test_v_s_route_upstream_tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_validation_flow(self, kube_apis, ingress_controller_prerequisites,
9797
f"{TEST_DATA}/virtual-server-route-upstream-tls/route-single-invalid.yaml",
9898
v_s_route_setup.route_s.namespace)
9999
except ApiException as ex:
100-
assert ex.status == 422 and "spec.upstreams.tls.enable: Invalid value" in ex.body
100+
assert ex.status == 422 and "spec.upstreams.tls.enable" in ex.body
101101
except Exception as ex:
102102
pytest.fail(f"An unexpected exception is raised: {ex}")
103103
else:

tests/suite/test_virtual_server_tls_redirect.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ def test_tls_redirect_openapi_validation_flow(self, kube_apis, ingress_controlle
199199
virtual_server_setup.namespace)
200200
except ApiException as ex:
201201
assert ex.status == 422 \
202-
and "spec.tls.redirect.enable: Invalid value" in ex.body \
203-
and "spec.tls.redirect.code: Invalid value" in ex.body \
204-
and "spec.tls.redirect.basedOn: Invalid value" in ex.body \
205-
and "spec.tls.secret: Invalid value" in ex.body
202+
and "spec.tls.redirect.enable" in ex.body \
203+
and "spec.tls.redirect.code" in ex.body \
204+
and "spec.tls.redirect.basedOn" in ex.body \
205+
and "spec.tls.secret" in ex.body
206206
except Exception as ex:
207207
pytest.fail(f"An unexpected exception is raised: {ex}")
208208
else:

tests/suite/test_virtual_server_upstream_tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_validation_flow(self, kube_apis, ingress_controller_prerequisites,
5050
f"{TEST_DATA}/virtual-server-upstream-tls/virtual-server-invalid.yaml",
5151
virtual_server_setup.namespace)
5252
except ApiException as ex:
53-
assert ex.status == 422 and "spec.upstreams.tls.enable: Invalid value" in ex.body
53+
assert ex.status == 422 and "spec.upstreams.tls.enable" in ex.body
5454
except Exception as ex:
5555
pytest.fail(f"An unexpected exception is raised: {ex}")
5656
else:

0 commit comments

Comments
 (0)