-
Notifications
You must be signed in to change notification settings - Fork 80
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
Multiple Fixes Following Failed S3 Tests #7270
Conversation
Hi @nadavMiz, |
Regarding Q2, since the changed were small I suggested a single PR with 3 commits |
@nimrod-becker I understood t after the code review. |
a179062
to
d9d14b7
Compare
d9d14b7
to
2d4278a
Compare
regarding test_lifecycle_transition_set_invalid_date, it looks like it never really passed. it checks if set date returns and exception using prefix and not filter. since we didn't allow to have prefix in the request we sent an error, when fixing this for set date, test_lifecycle_transition_set_invalid_date passed that point and the test failed. I added this test to the pending list |
2d4278a
to
cf2869a
Compare
src/test/system_tests/ceph_s3_tests/s3-tests-lists/s3_tests_pending_list.txt
Show resolved
Hide resolved
cf2869a
to
e5d1382
Compare
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.
@baum, would you please also review the changes in this file?
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.
Great job on the update! 🖖
It would be beneficial to include a positive test case for the Rule with prefix and a negative test case for the Rule with both prefix and filter. Currently, there is a recipe that involves
- adding lifecycle configuration instance see here (
noobaa-core/src/test/lifecycle/common.js
Lines 359 to 376 in 57b0dde
function id_lifecycle_configuration(Bucket, Key) { const ID = 'rule_id'; return { Bucket, LifecycleConfiguration: { Rules: [{ ID, Expiration: { Days: 17, }, Filter: { Prefix: Key, }, Status: 'Enabled', }, ], }, }; } - defining a common test function (
noobaa-core/src/test/lifecycle/common.js
Lines 497 to 506 in 57b0dde
exports.test_rule_id = async function(Bucket, Key, s3) { const putLifecycleParams = id_lifecycle_configuration(Bucket, Key); const getLifecycleResult = await put_get_lifecycle_configuration(Bucket, putLifecycleParams, s3); const actualId = getLifecycleResult.Rules[0].ID; const expectedId = putLifecycleParams.LifecycleConfiguration.Rules[0].ID; console.log('get rule id:', actualId, ' expected:', expectedId); assert.deepEqual(actualId, expectedId, 'rule id'); }; - adding it to the list of unit tests (
noobaa-core/src/test/unit_tests/test_lifecycle.js
Lines 75 to 77 in 57b0dde
mocha.it('test rule id', async () => { await commonTests.test_rule_id(Bucket, Key, s3); }); - and system tests (
await commonTests.test_rule_id(Bucket, Key, s3);
It is recommended to run the system lifecycle test manually to compare the lifecycle configuration behavior of AWS S3 and NooBaa endpoints.
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.
@baum I made the tests as requested: lifecycle commit. can you please review them
@nadavMiz in the CI I see it runs 388 passed tests instead of 389 tests (387 we have today + 3 you inserted - 1 you removed is 389 but it is written 388): |
e5d1382
to
827b25b
Compare
827b25b
to
82cd977
Compare
82cd977
to
433612f
Compare
src/test/system_tests/ceph_s3_tests/s3-tests-lists/s3_tests_pending_list.txt
Show resolved
Hide resolved
b33f539
to
41015a8
Compare
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.
LGTM
Great fixes!
I didn't review the added unit tests @baum asked for.
41015a8
to
df7510f
Compare
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.
Thank you, lgtm 🖖
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.
please squash
@liranmauda, those are different fixes and could be in different PRs. |
Ack on Shira's comment. 3 different fixes |
I'll add that the 4th commit is a fix for an issue we found during this PR in the script running all tests (not a specific test). |
df7510f
to
c872c19
Compare
Signed-off-by: nadav mizrahi <[email protected]>
Signed-off-by: nadav mizrahi <[email protected]>
Signed-off-by: nadav mizrahi <[email protected]>
…_date to tests pending list Signed-off-by: nadav mizrahi <[email protected]>
c872c19
to
aecb4f7
Compare
Explain the Changes
small fixes for s3 tests.
since all the changes are small. the are are in the same pull request but different commits. there are three commits. one for each change:
Issues:
no related issues
Testing Instructions:
run ceph s3 tests using the following instructions:
https://github.com/noobaa/noobaa-core/blob/master/docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md
run the following s3 tests: