1
0
Fork 0
mirror of https://github.com/actions/toolkit synced 2025-05-09 00:22:56 +00:00

crc: update headers & digest stream

This commit is contained in:
Rob Herley 2022-04-26 22:59:56 +00:00 committed by GitHub
parent fccc5ee6e6
commit 3f95e2ea4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View file

@ -97,7 +97,7 @@ describe('Utils', () => {
expect(headers['x-tfs-filelength']).toEqual(uncompressedLength)
expect(headers['Content-Length']).toEqual(size)
expect(headers['Content-Range']).toEqual(range)
expect(headers['X-Digest']).toEqual(`sha-256=${digest}`)
expect(headers['X-GH-Actions-CRC64']).toEqual(digest)
})
it('Test constructing upload headers with only required parameter', () => {
@ -230,8 +230,6 @@ describe('Utils', () => {
const stream = Readable.from(data)
const digest = await utils.digestForStream(stream)
expect(digest).toBe(
'5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269'
)
expect(digest).toBe('FFFCD6894DC82C6D')
})
})