From 1847f8935c4a73b28360967e9bb52505622d03d8 Mon Sep 17 00:00:00 2001 From: Setu Shah Date: Mon, 24 Jan 2022 21:46:52 -0800 Subject: [PATCH] test: add test to pacify CI --- .../aws-lambda-python/test/bundling.test.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts index 4af556b3b9a62..f972eb1917082 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts @@ -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({ @@ -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, + }), + })); + });