chore(custom-resources): running Python tests from Lerna#28860
chore(custom-resources): running Python tests from Lerna#28860sakurai-ryo wants to merge 3 commits intoaws:mainfrom
Conversation
| }, expected_status="FAILED") | ||
|
|
||
| self.assertEqual(update_resp['Reason'], "invalid request: request type is 'Update' but 'PhysicalResourceId' is not defined") | ||
| self.assertEqual(update_resp['Reason'], "invalid request: request type is '{'Update'}' but 'PhysicalResourceId' is not defined") |
There was a problem hiding this comment.
Changed in this PR, but the test code did not.
#28057
| @@ -62,10 +62,7 @@ def make_eventbridge_configuration(): | |||
| return { EVENTBRIDGE_CONFIGURATION: {} } | |||
There was a problem hiding this comment.
This PR changed this file, but the test code did not.
#28132
|
|
||
| class ManagedBucketTest(unittest.TestCase): | ||
| @patch("index.put_bucket_notification_configuration") | ||
| @patch('index.s3') |
There was a problem hiding this comment.
There was a function that executes the put_bucket_notification_configuration method of boto3, but it has been removed.
https://github.com/aws/aws-cdk/pull/28132/files#diff-00d1f29e73955f487795d4a9873bcff824e70d6268e7926e44b7defb31b4ecb1
…fix-build-process
TheRealAmazonKendra
left a comment
There was a problem hiding this comment.
Oh, wow. This is a very very long term oversight on our part. We shouldn't have unit tests that aren't jest anymore, but taking this change is obviously much better than having tests that don't run. Thanks for catching this.
|
@Mergifyio update |
❌ Mergify doesn't have permission to updateDetailsFor security reasons, Mergify can't update this pull request. Try updating locally. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Looks like some of the test updates caused a failure. Can you please take a look? |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
2 similar comments
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
Currently, the Python test code used in
custom-resource-handlersis not included in the execution target of thelerna run testcommand and is not executed by CI.This PR fixes the build process and the broken tests.
To run Python tests from Lerna, we need to run the shell script to run the Python tests in the
testsection of npm scripts.It was originally executed using the post script of npm scripts.
https://github.com/aws/aws-cdk/pull/971/files#diff-a683107cab7bc3ac616d2db6e4e02c4f2aa677c56e45f0d8f822d82929a83d7dR41
The
testsection ofnpm scriptsin the@aws-cdk/custom-resource-handlerspackage currently runs thejestcommand, which is used to run all tests in the package and specific tests.I created a new shell script and branched out for these two use cases.
I am unfamiliar with Lerna or the CDK build process, so I would appreciate feedback from anyone who sees this PR.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license