aws-solutions / network-orchestration-for-aws-transit-gateway

The Network Orchestration for AWS Transit Gateway solution automates the process of setting up and managing transit networks in distributed AWS environments. It creates a web interface to help control, audit, and approve (transit) network changes.
https://aws.amazon.com/solutions/implementations/serverless-transit-network-orchestrator/
Apache License 2.0
113 stars 48 forks source link

Failing Unit tests - missing lib.s3 #2

Closed rjlupinek closed 3 years ago

rjlupinek commented 4 years ago

Hey guys. Love the project, but I noticed a few of the unit tests are failing because of the missing lib.s3:

_______________ ERROR collecting tests/test_cfn_cr_secure_ssm.py _______________
ImportError while importing test module '/home/circleci/project/source/tests/test_cfn_cr_secure_ssm.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_cfn_cr_secure_ssm.py:3: in <module>
    import lambda_custom_resource
lambda_custom_resource.py:18: in <module>
    from custom_resource_handler import StepFunctions, SecureSSMParameters, CWEventPermissions, S3ConsoleDeploy, CFNMetrics
custom_resource_handler.py:24: in <module>
    from lib.s3 import S3
E   ModuleNotFoundError: No module named 'lib.s3'
______________ ERROR collecting tests/test_cfn_cr_sm_execution.py ______________
ImportError while importing test module '/home/circleci/project/source/tests/test_cfn_cr_sm_execution.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_cfn_cr_sm_execution.py:1: in <module>
    import lambda_custom_resource
lambda_custom_resource.py:18: in <module>
    from custom_resource_handler import StepFunctions, SecureSSMParameters, CWEventPermissions, S3ConsoleDeploy, CFNMetrics
custom_resource_handler.py:24: in <module>
    from lib.s3 import S3
E   ModuleNotFoundError: No module named 'lib.s3'

It doesn't break any functionality it seems, but I thought I would let you guys know.

It looks like lib.s3 is used by custom_resource_handler.py for class S3ConsoleDeploy.

groverlalit commented 4 years ago

Thanks for reporting this issue. We have added to our backlog.

seyedk commented 4 years ago

for now, i could borrow from the installed solution in my account, and download the function pakcage. the deployed version (dist from S3) has s3 in lib.

maykays commented 3 years ago

Resolved in v2.0. Please let us know if the issue persists.