File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
v03_pipeline/lib/tasks/dataproc Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def test_spinup_cluster_already_exists_failed(
50
50
mock_client = mock_cluster_controller .return_value
51
51
mock_client .get_cluster .return_value = SimpleNamespace (
52
52
status = SimpleNamespace (
53
- state = google .cloud .dataproc_v1 .types .clusters .ClusterStatus .State .ERROR
53
+ state = google .cloud .dataproc_v1 .types .clusters .ClusterStatus .State .ERROR ,
54
54
),
55
55
cluster_name = 'abc' ,
56
56
)
@@ -75,7 +75,7 @@ def test_spinup_cluster_already_exists_success(
75
75
mock_client = mock_cluster_controller .return_value
76
76
mock_client .get_cluster .return_value = SimpleNamespace (
77
77
status = SimpleNamespace (
78
- state = google .cloud .dataproc_v1 .types .clusters .ClusterStatus .State .RUNNING
78
+ state = google .cloud .dataproc_v1 .types .clusters .ClusterStatus .State .RUNNING ,
79
79
),
80
80
)
81
81
mock_client .create_cluster .side_effect = (
Original file line number Diff line number Diff line change @@ -68,7 +68,9 @@ def test_job_already_exists_success(
68
68
mock_create_dataproc_cluster .return_value = MockCompleteTask ()
69
69
mock_client = mock_job_controller_client .return_value
70
70
mock_client .get_job .return_value = SimpleNamespace (
71
- status = SimpleNamespace (state = google .cloud .dataproc_v1 .types .jobs .JobStatus .State .DONE ),
71
+ status = SimpleNamespace (
72
+ state = google .cloud .dataproc_v1 .types .jobs .JobStatus .State .DONE
73
+ ),
72
74
)
73
75
worker = luigi .worker .Worker ()
74
76
task = RunPipelineOnDataprocTask (
@@ -136,7 +138,9 @@ def test_job_success(
136
138
'job not found' ,
137
139
),
138
140
SimpleNamespace (
139
- status = SimpleNamespace (state = google .cloud .dataproc_v1 .types .jobs .JobStatus .State .DONE ),
141
+ status = SimpleNamespace (
142
+ state = google .cloud .dataproc_v1 .types .jobs .JobStatus .State .DONE
143
+ ),
140
144
),
141
145
]
142
146
operation = mock_client .submit_job_as_operation .return_value
You can’t perform that action at this time.
0 commit comments