-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(custom-resources): running Python tests from Lerna #28860
Conversation
@@ -576,7 +576,7 @@ def test_fails_when_physical_id_not_present_in_update(self): | |||
"DestinationBucketName": "<dest-bucket-name>", | |||
}, 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR changed this file, but the test code did not.
#28132
@@ -86,337 +83,330 @@ def merge_notification_configurations(conf1: Dict, conf2: Dict): | |||
|
|||
|
|||
class ManagedBucketTest(unittest.TestCase): | |||
@patch("index.put_bucket_notification_configuration") | |||
@patch('index.s3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 updateFor 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-handlers
is not included in the execution target of thelerna run test
command 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
test
section 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
test
section ofnpm scripts
in the@aws-cdk/custom-resource-handlers
package currently runs thejest
command, 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