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

tests: actualize skips, fix asserts #51

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 18 additions & 28 deletions s3tests_boto3/functional/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14046,7 +14046,7 @@ def test_put_obj_enc_conflict_s3_kms():


@pytest.mark.encryption
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/850")
def test_put_obj_enc_conflict_bad_enc_kms():
kms_keyid = get_main_kms_keyid()
if kms_keyid is None:
Expand Down Expand Up @@ -14132,7 +14132,7 @@ def test_bucket_policy_put_obj_s3_noenc():
@pytest.mark.encryption
@pytest.mark.bucket_policy
@pytest.mark.sse_s3
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/850")
def test_bucket_policy_put_obj_s3_kms():
kms_keyid = get_main_kms_keyid()
if kms_keyid is None:
Expand Down Expand Up @@ -14239,7 +14239,7 @@ def test_bucket_policy_put_obj_kms_noenc():

@pytest.mark.encryption
@pytest.mark.bucket_policy
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/850")
def test_bucket_policy_put_obj_kms_s3():
bucket_name = get_new_bucket()
client = get_v2_client()
Expand Down Expand Up @@ -14284,7 +14284,7 @@ def test_bucket_policy_put_obj_kms_s3():
@pytest.mark.bucket_policy
# TODO: remove this fails_on_rgw when I fix it
@pytest.mark.fails_on_rgw
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/863")
def test_bucket_policy_put_obj_request_obj_tag():
bucket_name = get_new_bucket()
client = get_client()
Expand Down Expand Up @@ -14428,8 +14428,7 @@ def test_object_lock_put_obj_lock_invalid_bucket():
assert error_code == "InvalidBucketState"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/869")
def test_object_lock_put_obj_lock_with_days_and_years():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -14449,8 +14448,7 @@ def test_object_lock_put_obj_lock_with_days_and_years():
assert error_code == "MalformedXML"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/869")
def test_object_lock_put_obj_lock_invalid_days():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -14470,8 +14468,7 @@ def test_object_lock_put_obj_lock_invalid_days():
assert error_code == "InvalidRetentionPeriod"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/869")
def test_object_lock_put_obj_lock_invalid_years():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -14491,8 +14488,7 @@ def test_object_lock_put_obj_lock_invalid_years():
assert error_code == "InvalidRetentionPeriod"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/869")
def test_object_lock_put_obj_lock_invalid_mode():
bucket_name = get_new_bucket_name()
client = get_client()
Expand Down Expand Up @@ -14526,8 +14522,7 @@ def test_object_lock_put_obj_lock_invalid_mode():
assert error_code == "MalformedXML"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/869")
def test_object_lock_put_obj_lock_invalid_status():
bucket_name = get_new_bucket_name()
client = get_client()
Expand Down Expand Up @@ -14615,7 +14610,6 @@ def test_object_lock_put_obj_retention():
)


@pytest.mark.skip(reason="Potential Bug")
def test_object_lock_put_obj_retention_invalid_bucket():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -14634,8 +14628,8 @@ def test_object_lock_put_obj_retention_invalid_bucket():
Retention=retention,
)
status, error_code = _get_status_and_error_code(e.response)
assert status == 400
assert error_code == "InvalidRequest"
assert status == 404
assert error_code == "ObjectLockConfigurationNotFoundError"


@pytest.mark.fails_on_dbstore
Expand Down Expand Up @@ -14722,7 +14716,6 @@ def test_object_lock_get_obj_retention_iso8601():
)


@pytest.mark.skip(reason="Potential Bug")
def test_object_lock_get_obj_retention_invalid_bucket():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -14733,8 +14726,8 @@ def test_object_lock_get_obj_retention_invalid_bucket():
ClientError, client.get_object_retention, Bucket=bucket_name, Key=key
)
status, error_code = _get_status_and_error_code(e.response)
assert status == 400
assert error_code == "InvalidRequest"
assert status == 404
assert error_code == "ObjectLockConfigurationNotFoundError"


@pytest.mark.fails_on_dbstore
Expand Down Expand Up @@ -15043,7 +15036,6 @@ def test_object_lock_put_legal_hold():
assert response["ResponseMetadata"]["HTTPStatusCode"] == 200


@pytest.mark.skip(reason="Potential Bug")
def test_object_lock_put_legal_hold_invalid_bucket():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -15059,8 +15051,8 @@ def test_object_lock_put_legal_hold_invalid_bucket():
LegalHold=legal_hold,
)
status, error_code = _get_status_and_error_code(e.response)
assert status == 400
assert error_code == "InvalidRequest"
assert status == 404
assert error_code == "ObjectLockConfigurationNotFoundError"


@pytest.mark.fails_on_dbstore
Expand All @@ -15083,7 +15075,7 @@ def test_object_lock_put_legal_hold_invalid_status():
assert error_code == "MalformedXML"


@pytest.mark.fails_on_dbstore
@pytest.mark.skip(reason="https://github.com/nspcc-dev/neofs-s3-gw/issues/868")
def test_object_lock_get_legal_hold():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -15100,7 +15092,6 @@ def test_object_lock_get_legal_hold():
assert response["LegalHold"] == legal_hold_off


@pytest.mark.skip(reason="Potential Bug")
def test_object_lock_get_legal_hold_invalid_bucket():
bucket_name = get_new_bucket_name()
client = get_client()
Expand All @@ -15111,8 +15102,8 @@ def test_object_lock_get_legal_hold_invalid_bucket():
ClientError, client.get_object_legal_hold, Bucket=bucket_name, Key=key
)
status, error_code = _get_status_and_error_code(e.response)
assert status == 400
assert error_code == "InvalidRequest"
assert status == 404
assert error_code == "ObjectLockConfigurationNotFoundError"


@pytest.mark.fails_on_dbstore
Expand Down Expand Up @@ -15218,7 +15209,6 @@ def test_object_lock_uploading_obj():
)


@pytest.mark.skip(reason="Potential Bug")
@pytest.mark.fails_on_dbstore
def test_object_lock_changing_mode_from_governance_with_bypass():
bucket_name = get_new_bucket_name()
Expand Down
Loading