{"action":"created","issue":{"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/34","repository_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs","labels_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/34/comments","events_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/34/events","html_url":"https://github.com/taskcluster/taskcluster-lib-docs/pull/34","id":305094936,"number":34,"title":"Refactor downloader function to remove unecessary call to aws service","user":{"login":"MynahMarie","id":24983802,"avatar_url":"https://avatars3.githubusercontent.com/u/24983802?v=4","gravatar_id":"","url":"https://api.github.com/users/MynahMarie","html_url":"https://github.com/MynahMarie","followers_url":"https://api.github.com/users/MynahMarie/followers","following_url":"https://api.github.com/users/MynahMarie/following{/other_user}","gists_url":"https://api.github.com/users/MynahMarie/gists{/gist_id}","starred_url":"https://api.github.com/users/MynahMarie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MynahMarie/subscriptions","organizations_url":"https://api.github.com/users/MynahMarie/orgs","repos_url":"https://api.github.com/users/MynahMarie/repos","events_url":"https://api.github.com/users/MynahMarie/events{/privacy}","received_events_url":"https://api.github.com/users/MynahMarie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-14T10:10:35Z","updated_at":"2018-03-15T09:33:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/pulls/34","html_url":"https://github.com/taskcluster/taskcluster-lib-docs/pull/34","diff_url":"https://github.com/taskcluster/taskcluster-lib-docs/pull/34.diff","patch_url":"https://github.com/taskcluster/taskcluster-lib-docs/pull/34.patch"},"body":"In this PR I have:\r\n\r\n- Refactored the downloader function in docs.js to fake the call to S3 in case the option `testing` is true.\r\n- Created a test tarball to be read by the downloader function when running the tests.\r\n\r\nRelates Bugzilla 1443019"},"comment":{"url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/comments/373314844","html_url":"https://github.com/taskcluster/taskcluster-lib-docs/pull/34#issuecomment-373314844","issue_url":"https://api.github.com/repos/taskcluster/taskcluster-lib-docs/issues/34","id":373314844,"user":{"login":"MynahMarie","id":24983802,"avatar_url":"https://avatars3.githubusercontent.com/u/24983802?v=4","gravatar_id":"","url":"https://api.github.com/users/MynahMarie","html_url":"https://github.com/MynahMarie","followers_url":"https://api.github.com/users/MynahMarie/followers","following_url":"https://api.github.com/users/MynahMarie/following{/other_user}","gists_url":"https://api.github.com/users/MynahMarie/gists{/gist_id}","starred_url":"https://api.github.com/users/MynahMarie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MynahMarie/subscriptions","organizations_url":"https://api.github.com/users/MynahMarie/orgs","repos_url":"https://api.github.com/users/MynahMarie/repos","events_url":"https://api.github.com/users/MynahMarie/events{/privacy}","received_events_url":"https://api.github.com/users/MynahMarie/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T09:33:40Z","updated_at":"2018-03-15T09:33:40Z","author_association":"CONTRIBUTOR","body":"@djmitche Yes that is precisely what I was unsure about... So what I tried at first was to mock the function like this:\r\n\r\n```\r\nreadStream = awsMock.mock('S3', 'getObject', fs.createReadStream(file))\r\n\r\n```\r\nIt does return a readable stream but then I get an error when the program hits the readStream.pipe function (`readStream.pipe(...) is not a function`). I will try again and see if I can make it work, in the meantime if you have any more suggestions I would be happy to hear them :)"}}
{"actor":{"display_login":"MynahMarie"}}