def test_get_task_artifacts(LINUX_TASK_ID, LINUX_TASK_ARTIFACTS): responses.add(responses.GET, 'https://queue.taskcluster.net/v1/task/{}/artifacts'.format( LINUX_TASK_ID), json=LINUX_TASK_ARTIFACTS, status=200) assert taskcluster.get_task_artifacts( LINUX_TASK_ID) == LINUX_TASK_ARTIFACTS['artifacts']
def test_get_task_artifacts(mock_taskcluster, LINUX_TASK_ID, LINUX_TASK_ARTIFACTS): responses.add( responses.GET, f"http://taskcluster.test/api/queue/v1/task/{LINUX_TASK_ID}/artifacts", json=LINUX_TASK_ARTIFACTS, status=200, ) assert (taskcluster.get_task_artifacts(LINUX_TASK_ID) == LINUX_TASK_ARTIFACTS["artifacts"])
def download(self, test_task): chunk_name = taskcluster.get_chunk(test_task['task']['metadata']['name']) platform_name = taskcluster.get_platform(test_task['task']['metadata']['name']) test_task_id = test_task['status']['taskId'] for artifact in taskcluster.get_task_artifacts(test_task_id): if not any(n in artifact['name'] for n in ['code-coverage-grcov.zip', 'code-coverage-jsvm.zip']): continue artifact_path = self.generate_path(platform_name, chunk_name, artifact) taskcluster.download_artifact(artifact_path, test_task_id, artifact['name']) logger.info('%s artifact downloaded' % artifact_path)
def download(self, test_task): chunk_name = taskcluster.get_chunk( test_task["task"]["metadata"]["name"]) platform_name = taskcluster.get_platform( test_task["task"]["metadata"]["name"]) test_task_id = test_task["status"]["taskId"] for artifact in taskcluster.get_task_artifacts(test_task_id): if not any(n in artifact["name"] for n in ["code-coverage-grcov.zip", "code-coverage-jsvm.zip"]): continue artifact_path = self.generate_path(platform_name, chunk_name, artifact) taskcluster.download_artifact(artifact_path, test_task_id, artifact["name"]) logger.info("%s artifact downloaded" % artifact_path)
def test_get_task_artifacts(LINUX_TASK_ID, LINUX_TASK_ARTIFACTS): responses.add(responses.GET, 'https://queue.taskcluster.net/v1/task/{}/artifacts'.format(LINUX_TASK_ID), json=LINUX_TASK_ARTIFACTS, status=200) assert taskcluster.get_task_artifacts(LINUX_TASK_ID) == LINUX_TASK_ARTIFACTS['artifacts']