9
9
readFileSync,
10
10
copySync,
11
11
writeFileSync,
12
+ statSync,
12
13
pathExistsSync
13
14
} = require ( 'fs-extra' ) ;
14
15
const { quote } = require ( 'shell-quote' ) ;
@@ -875,6 +876,12 @@ test(
875
876
'foobar has retained its executable file permissions'
876
877
) ;
877
878
879
+ const flaskPerm = statSync ( '.serverless/requirements/bin/flask' ) . mode ;
880
+ t . true (
881
+ zipfiles_with_metadata [ 'bin/flask' ] . unixPermissions === flaskPerm ,
882
+ 'bin/flask has retained its executable file permissions'
883
+ ) ;
884
+
878
885
t . end ( ) ;
879
886
} ,
880
887
{ skip : process . platform === 'win32' }
@@ -1566,15 +1573,23 @@ test(
1566
1573
npm ( [ 'i' , path ] ) ;
1567
1574
sls ( [ 'package' ] ) ;
1568
1575
1569
- const zipfiles_hello = listZipFilesWithMetaData ( '.serverless/hello1.zip' ) ;
1576
+ const zipfiles_hello1 = listZipFilesWithMetaData ( '.serverless/hello1.zip' ) ;
1570
1577
1571
1578
t . true (
1572
- zipfiles_hello [ 'module1/foobar' ] . unixPermissions
1579
+ zipfiles_hello1 [ 'module1/foobar' ] . unixPermissions
1573
1580
. toString ( 8 )
1574
1581
. slice ( 3 , 6 ) === perm ,
1575
1582
'foobar has retained its executable file permissions'
1576
1583
) ;
1577
1584
1585
+ const zipfiles_hello2 = listZipFilesWithMetaData ( '.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip' ) ;
1586
+ const flaskPerm = statSync ( '.serverless/module2/requirements/bin/flask' ) . mode ;
1587
+
1588
+ t . true (
1589
+ zipfiles_hello2 [ 'bin/flask' ] . unixPermissions === flaskPerm ,
1590
+ 'bin/flask has retained its executable file permissions'
1591
+ ) ;
1592
+
1578
1593
t . end ( ) ;
1579
1594
} ,
1580
1595
{ skip : process . platform === 'win32' }
@@ -1601,6 +1616,14 @@ test(
1601
1616
'foobar has retained its executable file permissions'
1602
1617
) ;
1603
1618
1619
+ const zipfiles_hello2 = listZipFilesWithMetaData ( '.serverless/module2-sls-py-req-test-indiv-dev-hello2.zip' ) ;
1620
+ const flaskPerm = statSync ( '.serverless/module2/requirements/bin/flask' ) . mode ;
1621
+
1622
+ t . true (
1623
+ zipfiles_hello2 [ 'bin/flask' ] . unixPermissions === flaskPerm ,
1624
+ 'bin/flask has retained its executable file permissions'
1625
+ ) ;
1626
+
1604
1627
t . end ( ) ;
1605
1628
} ,
1606
1629
{ skip : ! canUseDocker ( ) || process . platform === 'win32' }
0 commit comments