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

S3 Tests fail against aws #489

Closed
AronJ66 opened this issue Feb 16, 2023 · 0 comments · Fixed by #490
Closed

S3 Tests fail against aws #489

AronJ66 opened this issue Feb 16, 2023 · 0 comments · Fixed by #490

Comments

@AronJ66
Copy link

AronJ66 commented Feb 16, 2023

I am getting the same error for any test I try to run against aws

============================================================= test session starts =============================================================
platform linux -- Python 3.10.6, pytest-7.2.1, pluggy-1.0.0
cachedir: .tox/py/.pytest_cache
rootdir: /opt/s3-test/s3-tests-master, configfile: pytest.ini
collected 1 item

s3tests_boto3/functional/test_s3.py .E [100%]

=================================================================== ERRORS ====================================================================
_____________________________________________ ERROR at teardown of test_object_put_authenticated ______________________________________________

configfile = <class 'munch.Munch'>

@pytest.fixture(autouse=True)
def setup_teardown(configfile):
    yield
  teardown()

s3tests_boto3/functional/init.py:320:


s3tests_boto3/functional/init.py:290: in teardown
nuke_prefixed_buckets(prefix=prefix)
s3tests_boto3/functional/init.py:164: in nuke_prefixed_buckets
raise err
s3tests_boto3/functional/init.py:155: in nuke_prefixed_buckets
nuke_bucket(client, bucket_name)
s3tests_boto3/functional/init.py:108: in nuke_bucket
for objects in list_versions(client, bucket, batch_size):
s3tests_boto3/functional/init.py:89: in list_versions
listing = client.list_object_versions(
.tox/py/lib/python3.10/site-packages/botocore/client.py:514: in _api_call
return self._make_api_call(operation_name, kwargs)


self = <botocore.client.S3 object at 0x7fd6843d9f30>, operation_name = 'ListObjectVersions'
api_params = {'Bucket': 'sg-ak-test-1', 'EncodingType': 'url', 'KeyMarker': '', 'MaxKeys': 128, ...}

def _make_api_call(self, operation_name, api_params):
    operation_model = self._service_model.operation_model(operation_name)
    service_name = self._service_model.service_name
    history_recorder.record(
        'API_CALL',
        {
            'service': service_name,
            'operation': operation_name,
            'params': api_params,
        },
    )
    if operation_model.deprecated:
        logger.debug(
            'Warning: %s.%s() is deprecated', service_name, operation_name
        )
    request_context = {
        'client_region': self.meta.region_name,
        'client_config': self.meta.config,
        'has_streaming_input': operation_model.has_streaming_input,
        'auth_type': operation_model.auth_type,
    }
    request_dict = self._convert_to_request_dict(
        api_params, operation_model, context=request_context
    )
    resolve_checksum_context(request_dict, operation_model, api_params)

    service_id = self._service_model.service_id.hyphenize()
    handler, event_response = self.meta.events.emit_until_response(
        'before-call.{service_id}.{operation_name}'.format(
            service_id=service_id, operation_name=operation_name
        ),
        model=operation_model,
        params=request_dict,
        request_signer=self._request_signer,
        context=request_context,
    )

    if event_response is not None:
        http, parsed_response = event_response
    else:
        apply_request_checksum(request_dict)
        http, parsed_response = self._make_request(
            operation_model, request_dict, request_context
        )

    self.meta.events.emit(
        'after-call.{service_id}.{operation_name}'.format(
            service_id=service_id, operation_name=operation_name
        ),
        http_response=http,
        parsed=parsed_response,
        model=operation_model,
        context=request_context,
    )

    if http.status_code >= 300:
        error_code = parsed_response.get("Error", {}).get("Code")
        error_class = self.exceptions.from_code(error_code)
      raise error_class(parsed_response, operation_name)

E botocore.exceptions.ClientError: An error occurred (InvalidArgument) when calling the ListObjectVersions operation: A version-id marker cannot be empty.

.tox/py/lib/python3.10/site-packages/botocore/client.py:938: ClientError
------------------------------------------------------------ Captured stdout setup ------------------------------------------------------------
Done with cleanup of buckets in tests.
Done with cleanup of buckets in tests.
Done with cleanup of buckets in tests.
=========================================================== short test summary info ===========================================================
ERROR s3tests_boto3/functional/test_s3.py::test_object_put_authenticated - botocore.exceptions.ClientError: An error occurred (InvalidArgument) when calling the ListObjectVersions operation: A version-id marker ca...
========================================================= 1 passed, 1 error in 2.03s ==========================================================
ERROR: InvocationError for command /opt/s3-test/s3-tests-master/.tox/py/bin/pytest -m 'not fails_on_aws' s3tests_boto3/functional/test_s3.py::test_object_put_authenticated (exited with code 1)
___________________________________________________________________ summary ___________________________________________________________________
ERROR: py: commands failed

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 a pull request may close this issue.

1 participant