From 687681db284247e8f79c7099e01cf7b95f9f70e5 Mon Sep 17 00:00:00 2001 From: Elia Migliore Date: Wed, 18 Oct 2023 11:27:15 +0200 Subject: [PATCH] test: add test that checks new message addition are valid --- ...est_dependencies_compatibility_protobuf.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/integration/test_dependencies_compatibility_protobuf.py b/tests/integration/test_dependencies_compatibility_protobuf.py index a783c5aa3..8e5f11a1d 100644 --- a/tests/integration/test_dependencies_compatibility_protobuf.py +++ b/tests/integration/test_dependencies_compatibility_protobuf.py @@ -674,23 +674,23 @@ async def test_protobuf_customer_update_when_having_references(registry_async_cl async def test_protobuf_schema_compatibility_full_path_renaming(): dependency = """\ - package "my.awesome.customer.delivery"; + package "my.awesome.customer.request"; message RequestId { string request_id = 1; }\ """ original_full_path = """\ - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - my.awesome.customer.delivery.v1beta1.RequestId request_id = 1; + my.awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """ evolved_partial_path = """\ - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - awesome.customer.delivery.v1beta1.RequestId request_id = 1; + awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """ @@ -700,23 +700,23 @@ async def test_protobuf_schema_compatibility_full_path_renaming(): async def test_protobuf_schema_compatibility_partial_path_renaming(): dependency = """\ - package "my.awesome.customer.delivery"; + package "my.awesome.customer.request"; message RequestId { string request_id = 1; }\ """ original_partial_path = """\ - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - my.awesome.customer.delivery.v1beta1.RequestId request_id = 1; + my.awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """ evolved_full_path = """\ - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - awesome.customer.delivery.v1beta1.RequestId request_id = 1; + awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """ @@ -726,34 +726,34 @@ async def test_protobuf_schema_compatibility_partial_path_renaming(): async def test_protobuf_schema_compatibility_import_renaming_should_fail(): dependency = """\ - package "my.awesome.customer.delivery"; + package "my.awesome.customer.request"; message RequestId { string request_id = 1; }\ """ updated_dependency = """\ - package "awesome.customer.delivery"; + package "awesome.customer.request"; message RequestId { string request_id = 1; }\ """ original_partial_path = """\ - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; - import "awesome/customer/delivery/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; + import "awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - awesome.customer.delivery.v1beta1.RequestId request_id = 1; + awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """ evolved_partial_path = """\ - import "awesome/customer/delivery/v1beta1/request_id.proto"; - import "my/awesome/customer/delivery/v1beta1/request_id.proto"; + import "awesome/customer/request/v1beta1/request_id.proto"; + import "my/awesome/customer/request/v1beta1/request_id.proto"; message MessageRequest { - awesome.customer.delivery.v1beta1.RequestId request_id = 1; + awesome.customer.request.v1beta1.RequestId request_id = 1; }\ """