Skip to content
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

Allure steps for bucket_list tests. #54

Closed
wants to merge 1 commit into from

Conversation

MaxGelbakhiani
Copy link

Part of #39

A set of bucket_list S3 tests wrapped with allure steps.

Part of #39

Signed-off-by: Maksim Gelbakhiani <[email protected]>
status, error_code = _get_status_and_error_code(e.response)
assert status == 409
assert error_code == "BucketNotEmpty"


@allure.step("Do set bucket canned ACL")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Do //?

@@ -1869,6 +2106,7 @@ def _do_set_bucket_canned_acl_concurrent(client, bucket_name, canned_acl, num, r
return t


@allure.step("Do wait completion")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait for completion?



@allure.step("Do set ACL concurrent")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Do //?

@@ -905,7 +986,10 @@ def test_bucket_listv2_prefix_basic():
bucket_name = _create_objects(keys=key_names)
client = get_client()

response = client.list_objects_v2(Bucket=bucket_name, Prefix="foo/")
req_params = dict(Bucket=bucket_name, Prefix="foo/")
with allure.step(f"Request list_objects: {req_params}"):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to wrap client.list_objects_v2 and similar methods with an allure specific code, cause too many duplicates here

Copy link

@evgeniiz321 evgeniiz321 Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps it is even worth to just create a wrapper for a client class with getattribute overridden, and intercept there every call to methods and log input params and output from them to allure. In this case we won't have too many changes here, but just in a single place in a single wrapper.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a new PR #57 with client class methods overridden.
Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants