Skip to content

Commit

Permalink
test: add test to pacify CI
Browse files Browse the repository at this point in the history
  • Loading branch information
setu4993 committed Jan 25, 2022
1 parent a67ac74 commit 1847f89
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ test('Bundling a function with custom bundling image', () => {
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(entry));
});

test('Bundling with custom build args', () => {
test('Bundling with custom build arg for `PIP_INDEX_URL`', () => {
const entry = path.join(__dirname, 'lambda-handler');
const testPypi = 'https://test.pypi.org/simple/';
Bundling.bundle({
Expand All @@ -229,3 +229,19 @@ test('Bundling with custom build args', () => {
}),
}));
});

test('Bundling with custom build arg for `PIP_EXTRA_INDEX_URL`', () => {
const entry = path.join(__dirname, 'lambda-handler');
const testPypi = 'https://test.pypi.org/simple/';
Bundling.bundle({
entry: entry,
runtime: Runtime.PYTHON_3_7,
buildArgs: { PIP_EXTRA_INDEX_URL: testPypi },
});

expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(path.join(__dirname, '../lib')), expect.objectContaining({
buildArgs: expect.objectContaining({
PIP_EXTRA_INDEX_URL: testPypi,
}),
}));
});

0 comments on commit 1847f89

Please sign in to comment.