Skip to content

Commit

Permalink
Test that symlinked files in chalicelib are included
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebrennan committed Jan 25, 2022
1 parent 61f4345 commit fb75a7a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/functional/test_deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,20 @@ def test_subsequent_deploy_replaces_vendor_dir(tmpdir, chalice_deployer):
_assert_in_zip('mypackage/__init__.py', b'# v2', f)


@slow
def test_chalicelib_symlink_included(tmpdir, chalice_deployer):
appdir = _create_app_structure(tmpdir)
extra_package = tmpdir.mkdir('mypackage')
extra_package.join('__init__.py').write('# Test package')
chalicelib = appdir.mkdir('chalicelib')
os.symlink(str(extra_package), str(chalicelib.join('otherpackage')))
name = chalice_deployer.create_deployment_package(
str(appdir), 'python2.7')
with zipfile.ZipFile(name) as f:
_assert_in_zip('chalicelib/otherpackage/__init__.py',
b'# Test package', f)


@slow
def test_vendor_symlink_included(tmpdir, chalice_deployer):
appdir = _create_app_structure(tmpdir)
Expand Down

0 comments on commit fb75a7a

Please sign in to comment.