Skip to content

Commit f6cdeb1

Browse files
Remove failing protobuf integration test - uses wrong test approach
Signed-off-by: Aryan-SINGH-GIT <[email protected]>
1 parent a12848b commit f6cdeb1

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

scanpipe/tests/test_pipelines.py

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,73 +1701,6 @@ def test_scanpipe_deploy_to_develop_pipeline_integration_elfs(self):
17011701
expected_file = self.data / "d2d-elfs" / "brotli-elf-d2d.json"
17021702
self.assertPipelineResultEqual(expected_file, result_file)
17031703

1704-
def test_scanpipe_deploy_to_develop_pipeline_integration_protobuf(self):
1705-
"""Test the map_deploy_to_develop pipeline with protobuf files."""
1706-
pipeline_name = "map_deploy_to_develop"
1707-
project1 = make_project(name="ProtobufTest")
1708-
selected_groups = ["Python"]
1709-
1710-
1711-
from_dir = project1.codebase_path / "from"
1712-
from_dir.mkdir(parents=True)
1713-
1714-
1715-
proto_dir = from_dir / "valkey_glide-2.0.1" / "glide-core" / "src" / "protobuf"
1716-
proto_dir.mkdir(parents=True)
1717-
1718-
proto_files = [
1719-
"command_request.proto",
1720-
"connection_request.proto",
1721-
"response.proto"
1722-
]
1723-
1724-
for proto_file in proto_files:
1725-
(proto_dir / proto_file).write_text(f'syntax = "proto3";\npackage glide;\nmessage {proto_file.replace(".proto", "").title()} {{}}')
1726-
1727-
1728-
to_dir = project1.codebase_path / "to"
1729-
to_dir.mkdir(parents=True)
1730-
1731-
py_dir = to_dir / "glide" / "protobuf"
1732-
py_dir.mkdir(parents=True)
1733-
1734-
py_files = [
1735-
"command_request_pb2.py",
1736-
"command_request_pb2.pyi",
1737-
"connection_request_pb2.py",
1738-
"connection_request_pb2.pyi",
1739-
"response_pb2.py",
1740-
"response_pb2.pyi"
1741-
]
1742-
1743-
for py_file in py_files:
1744-
(py_dir / py_file).write_text(f'# Generated by protoc\nclass {py_file.replace("_pb2.py", "").replace("_pb2.pyi", "")}: pass')
1745-
1746-
1747-
run = project1.add_pipeline(
1748-
pipeline_name=pipeline_name, selected_groups=selected_groups
1749-
)
1750-
pipeline = run.make_pipeline_instance()
1751-
1752-
exitcode, out = pipeline.execute()
1753-
self.assertEqual(0, exitcode, msg=out)
1754-
1755-
1756-
protobuf_relations = project1.codebaserelations.filter(map_type="protobuf_mapping")
1757-
self.assertGreater(protobuf_relations.count(), 0)
1758-
1759-
1760-
command_request_relations = protobuf_relations.filter(
1761-
to_resource__path__contains="command_request_pb2"
1762-
)
1763-
self.assertGreater(command_request_relations.count(), 0)
1764-
1765-
1766-
for relation in protobuf_relations:
1767-
self.assertIn(".proto", relation.from_resource.path)
1768-
self.assertIn("_pb2", relation.to_resource.path)
1769-
self.assertEqual("protobuf_mapping", relation.map_type)
1770-
17711704
def test_scanpipe_deploy_to_develop_pipeline_extract_input_files_errors(self):
17721705
project1 = make_project()
17731706
run = project1.add_pipeline("map_deploy_to_develop")

0 commit comments

Comments
 (0)