Skip to content

Commit 8abf922

Browse files
committed
test: Bring back skipped cache tests
1 parent e33b02d commit 8abf922

File tree

1 file changed

+45
-56
lines changed

1 file changed

+45
-56
lines changed

test.js

+45-56
Original file line numberDiff line numberDiff line change
@@ -1373,36 +1373,30 @@ test(
13731373
{ skip: !canUseDocker() || process.platform === 'win32' }
13741374
);
13751375

1376-
test('py3.7 uses download cache by default option',
1377-
async (t) => {
1378-
process.chdir('tests/base');
1379-
const path = npm(['pack', '../..']);
1380-
npm(['i', path]);
1381-
sls(['package'], { env: {} });
1382-
const cachepath = getUserCachePath();
1383-
t.true(
1384-
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
1385-
'cache directory exists'
1386-
);
1387-
t.end();
1388-
},
1389-
{ skip: true }
1390-
);
1376+
test('py3.7 uses download cache by default option', async (t) => {
1377+
process.chdir('tests/base');
1378+
const path = npm(['pack', '../..']);
1379+
npm(['i', path]);
1380+
sls(['package'], { env: {} });
1381+
const cachepath = getUserCachePath();
1382+
t.true(
1383+
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
1384+
'cache directory exists'
1385+
);
1386+
t.end();
1387+
});
13911388

1392-
test('py3.7 uses download cache by default',
1393-
async (t) => {
1394-
process.chdir('tests/base');
1395-
const path = npm(['pack', '../..']);
1396-
npm(['i', path]);
1397-
sls(['package'], { env: { cacheLocation: '.requirements-cache' } });
1398-
t.true(
1399-
pathExistsSync(`.requirements-cache${sep}downloadCacheslspyc${sep}http`),
1400-
'cache directory exists'
1401-
);
1402-
t.end();
1403-
},
1404-
{ skip: true }
1405-
);
1389+
test('py3.7 uses download cache by default', async (t) => {
1390+
process.chdir('tests/base');
1391+
const path = npm(['pack', '../..']);
1392+
npm(['i', path]);
1393+
sls(['package'], { env: { cacheLocation: '.requirements-cache' } });
1394+
t.true(
1395+
pathExistsSync(`.requirements-cache${sep}downloadCacheslspyc${sep}http`),
1396+
'cache directory exists'
1397+
);
1398+
t.end();
1399+
});
14061400

14071401
test(
14081402
'py3.7 uses download cache with dockerizePip option',
@@ -1418,8 +1412,7 @@ test(
14181412
);
14191413
t.end();
14201414
},
1421-
// { skip: !canUseDocker() || brokenOn('win32') }
1422-
{ skip: true }
1415+
{ skip: !canUseDocker() || brokenOn('win32') }
14231416
);
14241417

14251418
test(
@@ -1437,33 +1430,29 @@ test(
14371430
);
14381431
t.end();
14391432
},
1440-
// { skip: !canUseDocker() || brokenOn('win32') }
1441-
{ skip: true }
1433+
{ skip: !canUseDocker() || brokenOn('win32') }
14421434
);
14431435

1444-
test('py3.7 uses static and download cache',
1445-
async (t) => {
1446-
process.chdir('tests/base');
1447-
const path = npm(['pack', '../..']);
1448-
npm(['i', path]);
1449-
sls(['package'], { env: {} });
1450-
const cachepath = getUserCachePath();
1451-
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
1452-
const arch = 'x86_64';
1453-
t.true(
1454-
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
1455-
'http exists in download-cache'
1456-
);
1457-
t.true(
1458-
pathExistsSync(
1459-
`${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
1460-
),
1461-
'flask exists in static-cache'
1462-
);
1463-
t.end();
1464-
},
1465-
{ skip: true }
1466-
);
1436+
test('py3.7 uses static and download cache', async (t) => {
1437+
process.chdir('tests/base');
1438+
const path = npm(['pack', '../..']);
1439+
npm(['i', path]);
1440+
sls(['package'], { env: {} });
1441+
const cachepath = getUserCachePath();
1442+
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
1443+
const arch = 'x86_64';
1444+
t.true(
1445+
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
1446+
'http exists in download-cache'
1447+
);
1448+
t.true(
1449+
pathExistsSync(
1450+
`${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
1451+
),
1452+
'flask exists in static-cache'
1453+
);
1454+
t.end();
1455+
});
14671456

14681457
test(
14691458
'py3.7 uses static and download cache with dockerizePip option',

0 commit comments

Comments
 (0)