(context)
| 178 | |
| 179 | |
| 180 | def test_jobs_stream(context): |
| 181 | raw = { |
| 182 | 'previousAttempts': [], |
| 183 | 'id': 'cfa20e98-6997-523c-4233-f0a7302c929f', |
| 184 | 'parentId': '9ecf18fe-987d-5811-7c63-300aecae35da', |
| 185 | 'type': 'Job', |
| 186 | 'name': 'deploy production', |
| 187 | 'build_id': 'azuredevops:Build:1:12', # Added by collector, |
| 188 | 'start_time': '2023-02-25T06:22:36.8066667Z', |
| 189 | 'finish_time': '2023-02-25T06:22:43.2333333Z', |
| 190 | 'currentOperation': None, |
| 191 | 'percentComplete': None, |
| 192 | 'state': 'completed', |
| 193 | 'result': 'succeeded', |
| 194 | 'resultCode': None, |
| 195 | 'changeId': 18, |
| 196 | 'lastModified': '0001-01-01T00:00:00', |
| 197 | 'workerName': 'Hosted Agent', |
| 198 | 'queueId': 9, |
| 199 | 'order': 1, |
| 200 | 'details': None, |
| 201 | 'errorCount': 0, |
| 202 | 'warningCount': 0, |
| 203 | 'url': None, |
| 204 | 'log': { |
| 205 | 'id': 10, |
| 206 | 'type': 'Container', |
| 207 | 'url': 'https://dev.azure.com/johndoe/7a3fd40e-2aed-4fac-bac9-511bf1a70206/_apis/build/builds/12/logs/10' |
| 208 | }, |
| 209 | 'task': None, |
| 210 | 'attempt': 1, |
| 211 | 'identifier': 'job_2.__default' |
| 212 | } |
| 213 | |
| 214 | expected = devops.CICDTask( |
| 215 | id='cfa20e98-6997-523c-4233-f0a7302c929f', |
| 216 | name='deploy production', |
| 217 | pipeline_id='azuredevops:Build:1:12', |
| 218 | status=devops.CICDStatus.DONE, |
| 219 | original_status='Completed', |
| 220 | original_result='Succeeded', |
| 221 | created_date='2023-02-25T06:22:36.8066667Z', |
| 222 | started_date='2023-02-25T06:22:36.8066667Z', |
| 223 | finished_date='2023-02-25T06:22:43.2333333Z', |
| 224 | result=devops.CICDResult.SUCCESS, |
| 225 | type=devops.CICDType.DEPLOYMENT, |
| 226 | duration_sec=6.426667213439941, |
| 227 | environment=devops.CICDEnvironment.PRODUCTION, |
| 228 | cicd_scope_id=context.scope.domain_id() |
| 229 | ) |
| 230 | assert_stream_convert(AzureDevOpsPlugin, 'jobs', raw, expected, context) |
| 231 | |
| 232 | |
| 233 | def test_pull_requests_stream(context): |
nothing calls this directly
no test coverage detected