Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix test skips #797

Merged
merged 1 commit into from
Oct 30, 2023
Merged
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
103 changes: 57 additions & 46 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1373,30 +1373,36 @@ test(
{ skip: !canUseDocker() || process.platform === 'win32' }
);

test.skip('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 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.skip('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 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 with dockerizePip option',
Expand All @@ -1412,10 +1418,11 @@ test(
);
t.end();
},
{ skip: !canUseDocker() || brokenOn('win32') }
// { skip: !canUseDocker() || brokenOn('win32') }
{ skip: true }
);

test.skip(
test(
'py3.7 uses download cache with dockerizePip by default option',
async (t) => {
process.chdir('tests/base');
Expand All @@ -1430,29 +1437,33 @@ test.skip(
);
t.end();
},
{ skip: !canUseDocker() || brokenOn('win32') }
// { skip: !canUseDocker() || brokenOn('win32') }
{ skip: true }
);

test.skip('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',
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 with dockerizePip option',
Expand Down
Loading