1
0
Fork 0

Update tests

pull/767/head
Dave Hadka 2021-04-09 14:10:36 -05:00
parent ac7b0e436e
commit 74236358e6
1 changed files with 12 additions and 7 deletions

View File

@ -11,6 +11,7 @@ jest.mock('@actions/exec')
jest.mock('@actions/io') jest.mock('@actions/io')
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
const IS_MAC = process.platform === 'darwin'
const defaultTarPath = process.platform === 'darwin' ? 'gtar' : 'tar' const defaultTarPath = process.platform === 'darwin' ? 'gtar' : 'tar'
@ -55,7 +56,8 @@ test('zstd extract tar', async () => {
'-P', '-P',
'-C', '-C',
IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace
].concat(IS_WINDOWS ? ['--force-local'] : []), ].concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : []),
{cwd: undefined} {cwd: undefined}
) )
}) })
@ -84,7 +86,7 @@ test('gzip extract tar', async () => {
'-P', '-P',
'-C', '-C',
IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace
], ].concat(IS_MAC ? ['--delay-directory-restore'] : []),
{cwd: undefined} {cwd: undefined}
) )
}) })
@ -145,7 +147,8 @@ test('zstd create tar', async () => {
IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace, IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace,
'--files-from', '--files-from',
'manifest.txt' 'manifest.txt'
].concat(IS_WINDOWS ? ['--force-local'] : []), ].concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : []),
{ {
cwd: archiveFolder cwd: archiveFolder
} }
@ -180,7 +183,7 @@ test('gzip create tar', async () => {
IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace, IS_WINDOWS ? workspace?.replace(/\\/g, '/') : workspace,
'--files-from', '--files-from',
'manifest.txt' 'manifest.txt'
], ].concat(IS_MAC ? ['--delay-directory-restore'] : []),
{ {
cwd: archiveFolder cwd: archiveFolder
} }
@ -205,7 +208,8 @@ test('zstd list tar', async () => {
'-tf', '-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath, IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P' '-P'
].concat(IS_WINDOWS ? ['--force-local'] : []), ].concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : []),
{cwd: undefined} {cwd: undefined}
) )
}) })
@ -228,7 +232,8 @@ test('zstdWithoutLong list tar', async () => {
'-tf', '-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath, IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P' '-P'
].concat(IS_WINDOWS ? ['--force-local'] : []), ].concat(IS_WINDOWS ? ['--force-local'] : [])
.concat(IS_MAC ? ['--delay-directory-restore'] : []),
{cwd: undefined} {cwd: undefined}
) )
}) })
@ -252,7 +257,7 @@ test('gzip list tar', async () => {
'-tf', '-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath, IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P' '-P'
], ].concat(IS_MAC ? ['--delay-directory-restore'] : []),
{cwd: undefined} {cwd: undefined}
) )
}) })