Skip to content

Commit 72202b8

Browse files
author
bweigel
committed
fix file permission test on appveyor ci?
1 parent d591e42 commit 72202b8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ test(
243243
'pyc files are packaged'
244244
);
245245
t.deepEqual(
246-
zipfiles.filter(filename => filename.includes('.egg-infooo')),
246+
zipfiles.filter(filename => filename.includes('.egg-info')),
247247
[],
248248
'.egg-info folders are NOT packaged'
249249
);
@@ -619,16 +619,17 @@ test("Don't nuke execute perms when using individually", t => {
619619
process.chdir('tests/individually');
620620
const path = npm(['pack', '../..']);
621621
const perm = '775';
622-
writeFileSync('module1/foobar', '', { mode: perm });
622+
writeFileSync(`module1${sep}foobar`, '', { mode: perm });
623623

624624
npm(['i', path]);
625625
sls(['package']);
626626

627627
const zipfiles_hello = listZipFilesWithMetaData('.serverless/hello1.zip');
628628

629629
t.true(
630-
zipfiles_hello['module1/foobar'].unixPermissions.toString(8).slice(3, 6) ===
631-
perm,
630+
zipfiles_hello[`module1${sep}foobar`].unixPermissions
631+
.toString(8)
632+
.slice(3, 6) === perm,
632633
'foobar has retained its executable file permissions'
633634
);
634635

@@ -641,15 +642,15 @@ test(
641642
process.chdir('tests/individually');
642643
const path = npm(['pack', '../..']);
643644
const perm = '775';
644-
writeFileSync('module1/foobar', '', { mode: perm });
645+
writeFileSync(`module1${sep}foobar`, '', { mode: perm });
645646

646647
npm(['i', path]);
647648
sls(['--dockerizePip=true', 'package']);
648649

649650
const zipfiles_hello = listZipFilesWithMetaData('.serverless/hello1.zip');
650651

651652
t.true(
652-
zipfiles_hello['module1/foobar'].unixPermissions
653+
zipfiles_hello[`module1${sep}foobar`].unixPermissions
653654
.toString(8)
654655
.slice(3, 6) === perm,
655656
'foobar has retained its executable file permissions'

0 commit comments

Comments
 (0)