Skip to content

Commit 7338a08

Browse files
author
bweigel
committed
when win32 skip tests where we check file permission retention
1 parent 72202b8 commit 7338a08

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

test.js

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -615,26 +615,30 @@ test('py3.6 can package lambda-decorators using vendor and invidiually option',
615615
t.end();
616616
});
617617

618-
test("Don't nuke execute perms when using individually", t => {
619-
process.chdir('tests/individually');
620-
const path = npm(['pack', '../..']);
621-
const perm = '775';
622-
writeFileSync(`module1${sep}foobar`, '', { mode: perm });
618+
test(
619+
"Don't nuke execute perms when using individually",
620+
t => {
621+
process.chdir('tests/individually');
622+
const path = npm(['pack', '../..']);
623+
const perm = '775';
624+
writeFileSync(`module1${sep}foobar`, '', { mode: perm });
623625

624-
npm(['i', path]);
625-
sls(['package']);
626+
npm(['i', path]);
627+
sls(['package']);
626628

627-
const zipfiles_hello = listZipFilesWithMetaData('.serverless/hello1.zip');
629+
const zipfiles_hello = listZipFilesWithMetaData('.serverless/hello1.zip');
628630

629-
t.true(
630-
zipfiles_hello[`module1${sep}foobar`].unixPermissions
631-
.toString(8)
632-
.slice(3, 6) === perm,
633-
'foobar has retained its executable file permissions'
634-
);
631+
t.true(
632+
zipfiles_hello['module1$/foobar'].unixPermissions
633+
.toString(8)
634+
.slice(3, 6) === perm,
635+
'foobar has retained its executable file permissions'
636+
);
635637

636-
t.end();
637-
});
638+
t.end();
639+
},
640+
{ skip: process.platform === 'win32' }
641+
);
638642

639643
test(
640644
"Don't nuke execute perms when using individually w/docker",
@@ -650,15 +654,15 @@ test(
650654
const zipfiles_hello = listZipFilesWithMetaData('.serverless/hello1.zip');
651655

652656
t.true(
653-
zipfiles_hello[`module1${sep}foobar`].unixPermissions
657+
zipfiles_hello['module1$/foobar'].unixPermissions
654658
.toString(8)
655659
.slice(3, 6) === perm,
656660
'foobar has retained its executable file permissions'
657661
);
658662

659663
t.end();
660664
},
661-
{ skip: !canUseDocker() }
665+
{ skip: !canUseDocker() || process.platform === 'win32' }
662666
);
663667

664668
test('py3.6 uses download cache with useDownloadCache option', t => {

0 commit comments

Comments
 (0)