Skip to content

Commit e41df13

Browse files
committed
remove other chain_of_trust.log references
1 parent 6eaa71e commit e41df13

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

scriptworker/test/test_integration.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,8 @@ async def test_shutdown():
272272
async with get_context(partial_config) as context:
273273
result = await create_task(context, task_id, task_id)
274274
assert result['status']['state'] == 'pending'
275-
fake_cot_log = os.path.join(context.config['artifact_dir'], 'public', 'logs', 'chain_of_trust.log')
276275
fake_other_artifact = os.path.join(context.config['artifact_dir'], 'public', 'artifact.apk')
277276

278-
with open(fake_cot_log, 'w') as file:
279-
file.write('CoT logs')
280277
with open(fake_other_artifact, 'w') as file:
281278
file.write('unrelated artifact')
282279
cancel_fut = asyncio.ensure_future(do_shutdown(context))
@@ -289,28 +286,19 @@ async def test_shutdown():
289286
log_url = context.queue.buildUrl(
290287
'getArtifact', task_id, 0, 'public/logs/live_backing.log'
291288
)
292-
cot_log_url = context.queue.buildUrl(
293-
'getArtifact', task_id, 0, 'public/logs/chain_of_trust.log'
294-
)
295289
other_artifact_url = context.queue.buildUrl(
296290
'getArtifact', task_id, 0, 'public/artifact.apk'
297291
)
298292
log_path = os.path.join(context.config['work_dir'], 'log')
299-
cot_log_path = os.path.join(context.config['work_dir'], 'cot_log')
300293
other_artifact_path = os.path.join(context.config['work_dir'], 'artifact.apk')
301294
await utils.download_file(context, log_url, log_path)
302-
await utils.download_file(context, cot_log_url, cot_log_path)
303295
with pytest.raises(Download404):
304296
await utils.download_file(context, other_artifact_url, other_artifact_path)
305297

306298
with open(log_path) as fh:
307299
contents = fh.read()
308300
assert contents.rstrip() == "running task script\nAutomation Error: python exited with signal -15"
309301

310-
with open(cot_log_path) as fh:
311-
contents = fh.read()
312-
assert contents.rstrip() == "CoT logs"
313-
314302

315303
# empty_queue {{{1
316304
@pytest.mark.skipif(os.environ.get("NO_TESTS_OVER_WIRE"), reason=SKIP_REASON)

scriptworker/test/test_worker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ async def test_run_tasks_cancel_cot(context, mocker):
405405

406406
mock_prepare_task.assert_called_once()
407407
mock_complete_task.assert_called_once_with(mock.ANY, STATUSES['worker-shutdown'])
408-
mock_do_upload.assert_called_once_with(context, ['public/logs/chain_of_trust.log', 'public/logs/live_backing.log'])
408+
mock_do_upload.assert_called_once_with(context, ['public/logs/live_backing.log'])
409409

410410

411411
@pytest.mark.asyncio
@@ -445,7 +445,7 @@ async def mock_run_task(_, to_cancellable_process):
445445
assert task_process.stopped_due_to_worker_shutdown
446446
mock_prepare_task.assert_called_once()
447447
mock_complete_task.assert_called_once_with(mock.ANY, STATUSES['worker-shutdown'])
448-
mock_do_upload.assert_called_once_with(context, ['public/logs/chain_of_trust.log', 'public/logs/live_backing.log'])
448+
mock_do_upload.assert_called_once_with(context, ['public/logs/live_backing.log'])
449449

450450

451451
@pytest.mark.asyncio
@@ -527,7 +527,7 @@ async def mock_do_run_task(_, __, to_cancellable_process):
527527

528528
mock_prepare_task.assert_called_once()
529529
mock_complete_task.assert_called_once_with(mock.ANY, STATUSES['worker-shutdown'])
530-
mock_do_upload.assert_called_once_with(context, ['public/logs/chain_of_trust.log', 'public/logs/live_backing.log'])
530+
mock_do_upload.assert_called_once_with(context, ['public/logs/live_backing.log'])
531531

532532

533533
@pytest.mark.asyncio

scriptworker/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def invoke(self, context):
137137
artifacts_paths = filepaths_in_dir(context.config['artifact_dir'])
138138
except WorkerShutdownDuringTask:
139139
shutdown_artifact_paths = [os.path.join('public', 'logs', log_file)
140-
for log_file in ['chain_of_trust.log', 'live_backing.log']]
140+
for log_file in ['live_backing.log']]
141141
artifacts_paths = [path for path in shutdown_artifact_paths
142142
if os.path.isfile(os.path.join(context.config['artifact_dir'], path))]
143143
status = STATUSES['worker-shutdown']

0 commit comments

Comments
 (0)