Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 45 additions & 56 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1373,36 +1373,30 @@ test(
{ skip: !canUseDocker() || process.platform === 'win32' }
);

test('py3.7 uses download cache by default option',
async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: {} });
const cachepath = getUserCachePath();
t.true(
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
'cache directory exists'
);
t.end();
},
{ skip: true }
);
test('py3.7 uses download cache by default option', async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: {} });
const cachepath = getUserCachePath();
t.true(
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
'cache directory exists'
);
t.end();
});

test('py3.7 uses download cache by default',
async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: { cacheLocation: '.requirements-cache' } });
t.true(
pathExistsSync(`.requirements-cache${sep}downloadCacheslspyc${sep}http`),
'cache directory exists'
);
t.end();
},
{ skip: true }
);
test('py3.7 uses download cache by default', async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: { cacheLocation: '.requirements-cache' } });
t.true(
pathExistsSync(`.requirements-cache${sep}downloadCacheslspyc${sep}http`),
'cache directory exists'
);
t.end();
});

test(
'py3.7 uses download cache with dockerizePip option',
Expand All @@ -1418,8 +1412,7 @@ test(
);
t.end();
},
// { skip: !canUseDocker() || brokenOn('win32') }
{ skip: true }
{ skip: !canUseDocker() || brokenOn('win32') }
);

test(
Expand All @@ -1437,33 +1430,29 @@ test(
);
t.end();
},
// { skip: !canUseDocker() || brokenOn('win32') }
{ skip: true }
{ skip: !canUseDocker() || brokenOn('win32') }
);

test('py3.7 uses static and download cache',
async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: {} });
const cachepath = getUserCachePath();
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
const arch = 'x86_64';
t.true(
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
'http exists in download-cache'
);
t.true(
pathExistsSync(
`${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
),
'flask exists in static-cache'
);
t.end();
},
{ skip: true }
);
test('py3.7 uses static and download cache', async (t) => {
process.chdir('tests/base');
const path = npm(['pack', '../..']);
npm(['i', path]);
sls(['package'], { env: {} });
const cachepath = getUserCachePath();
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
const arch = 'x86_64';
t.true(
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
'http exists in download-cache'
);
t.true(
pathExistsSync(
`${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
),
'flask exists in static-cache'
);
t.end();
});

test(
'py3.7 uses static and download cache with dockerizePip option',
Expand Down