Skip to content

Remove spyon, use readable stream to test pipeResponseToFile - #651

Merged
hashtagchris merged 2 commits into
mainfrom
hashtagchris-test-pipeResponseToFile
Nov 30, 2020
Merged

hashtagchris merged 2 commits into
mainfrom
hashtagchris-test-pipeResponseToFile

Conversation

@hashtagchris

@hashtagchris hashtagchris commented Nov 26, 2020 •

Copy link
Copy Markdown
Contributor

Removing jest.spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile') from the download artifact tests, and using a readable stream object to test pipeResponseToFile. Also verifying the destination file size on disk.

This is set up for a follow-up PR with new test cases for truncated responses, #652.

@hashtagchris
hashtagchris force-pushed the hashtagchris-test-pipeResponseToFile branch from 0c4524a to 6ccf139 Compare November 26, 2020 03:51

@yacaovsnc yacaovsnc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding the check for file length.

@hashtagchris
hashtagchris merged commit ff43080 into main Nov 30, 2020
@hashtagchris
hashtagchris deleted the hashtagchris-test-pipeResponseToFile branch November 30, 2020 17:12
at-wat pushed a commit to at-wat/actions-toolkit that referenced this pull request Aug 31, 2023
…#651)

* Remove spyon, use readable stream to test pipeResponseToFile

* Check file contents
Derrick-MUGISHA pushed a commit to Derrick-MUGISHA/toolkit that referenced this pull request Oct 12, 2026
…#651)

* Remove spyon, use readable stream to test pipeResponseToFile

* Check file contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants