Skip to content

Commit

Permalink
ci: Fix test skips (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik authored Oct 30, 2023
1 parent 4b93513 commit 2bd9263
Showing 1 changed file with 57 additions and 46 deletions.
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

0 comments on commit 2bd9263

Please sign in to comment.