forked from serverless/serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurated-plugins-python.test.js
More file actions
34 lines (28 loc) · 1.14 KB
/
curated-plugins-python.test.js
File metadata and controls
34 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
const { expect } = require('chai');
const path = require('path');
const spawn = require('child-process-ext/spawn');
const fixturesEngine = require('../fixtures/programmatic');
const { listZipFiles } = require('../utils/fs');
const serverlessExec = require('../serverless-binary');
describe('test/integration/curated-plugins-python.test.js', function () {
this.timeout(1000 * 60 * 10); // Involves time-taking npm install
let serviceDir;
let updateConfig;
let serviceConfig;
before(async () => {
({
servicePath: serviceDir,
updateConfig,
serviceConfig,
} = await fixturesEngine.setup('curated-plugins-python'));
});
afterEach(async () => updateConfig({ plugins: null }));
it('should be extended by "serverless-python-requirements"', async () => {
await updateConfig({ plugins: ['serverless-python-requirements'] });
await spawn(serverlessExec, ['package'], { cwd: serviceDir });
const packagePath = path.resolve(serviceDir, '.serverless', `${serviceConfig.service}.zip`);
const filesInZip = await listZipFiles(packagePath);
expect(filesInZip).to.include('requests/__init__.py');
});
});