1212)
1313from airbyte_protocol_dataclasses .models import Type as AirbyteMessageType
1414
15- from airbyte_cdk .manifest_runner .manifest_runner . runner import ManifestRunner
15+ from airbyte_cdk .manifest_runner .command_processor . processor import ManifestCommandProcessor
1616
1717
18- class TestManifestRunner :
19- """Test cases for the ManifestRunner class."""
18+ class TestManifestCommandProcessor :
19+ """Test cases for the ManifestCommandProcessor class."""
2020
2121 @pytest .fixture
2222 def mock_source (self ):
@@ -25,8 +25,8 @@ def mock_source(self):
2525
2626 @pytest .fixture
2727 def manifest_runner (self , mock_source ):
28- """Create a ManifestRunner instance with mocked source."""
29- return ManifestRunner (mock_source )
28+ """Create a ManifestCommandProcessor instance with mocked source."""
29+ return ManifestCommandProcessor (mock_source )
3030
3131 @pytest .fixture
3232 def sample_config (self ):
@@ -63,7 +63,7 @@ def sample_state(self):
6363 """Sample state messages for testing."""
6464 return []
6565
66- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .TestReader" )
66+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .TestReader" )
6767 def test_test_read_success (
6868 self , mock_test_reader_class , manifest_runner , sample_config , sample_catalog
6969 ):
@@ -124,7 +124,7 @@ def test_test_read_success(
124124 # Verify the result is returned correctly
125125 assert result == mock_stream_read
126126
127- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .TestReader" )
127+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .TestReader" )
128128 def test_test_read_exception_handling (
129129 self ,
130130 mock_test_reader_class ,
@@ -151,7 +151,7 @@ def test_test_read_exception_handling(
151151 slice_limit = 10 ,
152152 )
153153
154- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
154+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
155155 def test_check_connection_success (self , mock_entrypoint_class , manifest_runner , sample_config ):
156156 """Test successful check_connection execution."""
157157
@@ -185,7 +185,7 @@ def test_check_connection_success(self, mock_entrypoint_class, manifest_runner,
185185 mock_entrypoint_class .assert_called_once_with (source = manifest_runner ._source )
186186 mock_entrypoint_instance .check .assert_called_once ()
187187
188- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
188+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
189189 def test_check_connection_failure (self , mock_entrypoint_class , manifest_runner , sample_config ):
190190 """Test check_connection with failed status."""
191191
@@ -210,7 +210,7 @@ def test_check_connection_failure(self, mock_entrypoint_class, manifest_runner,
210210 assert success is False
211211 assert message == "Invalid API key"
212212
213- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
213+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
214214 def test_check_connection_no_status_message (
215215 self , mock_entrypoint_class , manifest_runner , sample_config
216216 ):
@@ -232,7 +232,7 @@ def test_check_connection_no_status_message(
232232 assert success is False
233233 assert message == "Connection check failed"
234234
235- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
235+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
236236 def test_check_connection_with_trace_error (
237237 self , mock_entrypoint_class , manifest_runner , sample_config
238238 ):
@@ -256,7 +256,7 @@ def test_check_connection_with_trace_error(
256256 with pytest .raises (Exception , match = "Authentication failed" ):
257257 manifest_runner .check_connection (sample_config )
258258
259- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
259+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
260260 def test_discover_success (self , mock_entrypoint_class , manifest_runner , sample_config ):
261261 """Test successful discover execution."""
262262
@@ -295,7 +295,7 @@ def test_discover_success(self, mock_entrypoint_class, manifest_runner, sample_c
295295 mock_entrypoint_class .assert_called_once_with (source = manifest_runner ._source )
296296 mock_entrypoint_instance .discover .assert_called_once ()
297297
298- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
298+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
299299 def test_discover_no_catalog_message (
300300 self , mock_entrypoint_class , manifest_runner , sample_config
301301 ):
@@ -316,7 +316,7 @@ def test_discover_no_catalog_message(
316316 # Verify the result is None
317317 assert result is None
318318
319- @patch ("airbyte_cdk.manifest_runner.manifest_runner.runner .AirbyteEntrypoint" )
319+ @patch ("airbyte_cdk.manifest_runner.command_processor.processor .AirbyteEntrypoint" )
320320 def test_discover_with_trace_error (self , mock_entrypoint_class , manifest_runner , sample_config ):
321321 """Test discover raises exception when trace error is present."""
322322
0 commit comments