-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
S3: Days
must not be provided for select request when restoring object
#7468
S3: Days
must not be provided for select request when restoring object
#7468
Conversation
moto/s3/responses.py
Outdated
@@ -2272,10 +2272,19 @@ def _key_response_post( | |||
) | |||
|
|||
elif "restore" in query: | |||
es = minidom.parseString(body).getElementsByTagName("Days") | |||
days = es[0].childNodes[0].wholeText | |||
params = minidom.parseString(body) |
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.
Is there any value in using xmltodict
here? We use it somewhere else in this file as well.
I don't know what the output for that would look like, but maybe it's easier than parsing the XML manually.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7468 +/- ##
==========================================
- Coverage 95.88% 95.81% -0.08%
==========================================
Files 843 854 +11
Lines 82578 84012 +1434
==========================================
+ Hits 79178 80492 +1314
- Misses 3400 3520 +120
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Nice one - thank you!
This is now part of moto >= 5.0.4.dev16 |
Days
andType
parameters exist in restore object request.https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/restore_object.html
related: #7467