Acceptance tests using different clients concurrently. Environment deployed from packages.
Build: #3228 failed
Job: Spaces basic was successful
user fails to create file in the share root directory[1oz 1op 1oc-RESt]: Test case result
The below summarizes the result of the test " user fails to create file in the share root directory[1oz 1op 1oc-RESt]" in build 3,228 of Onedata Products - mixed acceptance pkg - Spaces basic.
- Description
- user fails to create file in the share root directory[1oz 1op 1oc-RESt]
- Test class
- mixed.scenarios.test_spaces_basic
- Method
- test_user_fails_to_create_file_in_the_share_root_directory[1oz_1op_1oc-REST]
- Jira Issue
-
- Duration
- 12 secs
- Status
- Failed (Existing Failure)
Error Log
AssertionError: Unexpected error occurred [400] Bad Request: {"error":{"id":"notSupported","description":"This operation is not supported."}} client = 'rest' users = {'admin': <tests.utils.user_utils.AdminUser object at 0x7fb11776f400>, 'admin2': <tests.utils.user_utils.User object a...s.user_utils.AdminUser object at 0x7fb1177b81c0>, 'user1': <tests.utils.user_utils.User object at 0x7fb117a2a040>, ...} user = 'user1' hosts = {'oneclient-1': {'container-id': 'cb6f958731309198b768df883a7c5c938eefd9be566bcbe6dcd76f3ae8806139', 'ip': '10.244.230...1d716e68088', 'hostname': 'dev-onezone.default.svc.cluster.local', 'ip': '10.244.230.181', 'name': 'dev-onezone', ...}} host = 'oneprovider-1' dir_id = '00000000008420187368617265477569642373706163655F323765613432623639363132396466323733313331623062616233306333616163683...3133316230626162333063336161636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932' file_name = 'some_name.txt' err_msg = 'File created in share root dir, but creation should have failed' def try_to_create_file_in_special_dir_by_id(client, users, user, hosts, host, dir_id, file_name, err_msg=''): if client.lower() == 'rest': try: > create_empty_file_in_dir_rest( users, user, hosts, host, dir_id, file_name) tests/mixed/steps/rest/onezone/special_dirs.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ users = {'admin': <tests.utils.user_utils.AdminUser object at 0x7fb11776f400>, 'admin2': <tests.utils.user_utils.User object a...s.user_utils.AdminUser object at 0x7fb1177b81c0>, 'user1': <tests.utils.user_utils.User object at 0x7fb117a2a040>, ...} user = 'user1' hosts = {'oneclient-1': {'container-id': 'cb6f958731309198b768df883a7c5c938eefd9be566bcbe6dcd76f3ae8806139', 'ip': '10.244.230...1d716e68088', 'hostname': 'dev-onezone.default.svc.cluster.local', 'ip': '10.244.230.181', 'name': 'dev-onezone', ...}} host = 'oneprovider-1' dir_id = '00000000008420187368617265477569642373706163655F323765613432623639363132396466323733313331623062616233306333616163683...3133316230626162333063336161636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932' name = 'some_name.txt' def create_empty_file_in_dir_rest(users, user, hosts, host, dir_id, name): > upload_file_rest(users, user, hosts, host, '', name, dir_id) tests/mixed/steps/rest/oneprovider/data.py:381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ users = {'admin': <tests.utils.user_utils.AdminUser object at 0x7fb11776f400>, 'admin2': <tests.utils.user_utils.User object a...s.user_utils.AdminUser object at 0x7fb1177b81c0>, 'user1': <tests.utils.user_utils.User object at 0x7fb117a2a040>, ...} user = 'user1' hosts = {'oneclient-1': {'container-id': 'cb6f958731309198b768df883a7c5c938eefd9be566bcbe6dcd76f3ae8806139', 'ip': '10.244.230...1d716e68088', 'hostname': 'dev-onezone.default.svc.cluster.local', 'ip': '10.244.230.181', 'name': 'dev-onezone', ...}} host = 'oneprovider-1', path = '', file_name = 'some_name.txt' parent_id = '00000000008420187368617265477569642373706163655F323765613432623639363132396466323733313331623062616233306333616163683...3133316230626162333063336161636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932' def upload_file_rest(users, user, hosts, host, path, file_name, parent_id): if path == '': data = None else: with open(path, 'rb') as f: data = f.read() provider_hostname = hosts[host]['hostname'] # standard urllib2 cannot handle streaming bytes > response = http_post( ip=provider_hostname, port=OP_REST_PORT, path=get_provider_rest_path('data', parent_id, f'children?name={file_name}'), headers={'X-Auth-Token': users[user].token, 'Content-Type': 'application/octet-stream'}, data=data) tests/mixed/steps/rest/oneprovider/data.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ip = 'dev-oneprovider-krakow.default.svc.cluster.local', port = 443 path = '/api/v3/oneprovider/data/00000000008420187368617265477569642373706163655F32376561343262363936313239646632373331333162...636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932/children?name=some_name.txt' use_ssl = True, data = None headers = {'Content-Type': 'application/octet-stream', 'X-Auth-Token': 'MDAzM2xvY2F00aW9uIGRldi1vbmV6b25lLmRlZmF1bHQuc3ZjLmNsdXN...U00YmM5NmNoOGYxMQowMDFhY2lkIHRpbWUgPCAxNzU3MDcwNDUzCjAwMmZzaWduYXR1cmUgMyVKGDWTwCNarF6IbBRBUVFGtdGsQujYv02vAqx01bIUUK'} verify = False, cert = None, auth = None, default_headers = True def http_post(ip, port, path, use_ssl=True, data=None, headers=None, verify=False, cert=None, auth=None, default_headers=True): > return http_request(requests.post, ip, port, path, use_ssl, headers, verify, cert, auth, data, default_headers=default_headers) tests/utils/rest_utils.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ http_method = <function post at 0x7fb11ab011f0> ip = 'dev-oneprovider-krakow.default.svc.cluster.local', port = 443 path = '/api/v3/oneprovider/data/00000000008420187368617265477569642373706163655F32376561343262363936313239646632373331333162...636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932/children?name=some_name.txt' use_ssl = True headers = {'Content-Type': 'application/octet-stream', 'X-Auth-Token': 'MDAzM2xvY2F00aW9uIGRldi1vbmV6b25lLmRlZmF1bHQuc3ZjLmNsdXN...U00YmM5NmNoOGYxMQowMDFhY2lkIHRpbWUgPCAxNzU3MDcwNDUzCjAwMmZzaWduYXR1cmUgMyVKGDWTwCNarF6IbBRBUVFGtdGsQujYv02vAqx01bIUUK'} verify = False, cert = None, auth = None, data = None, default_headers = True retries = 5 def http_request(http_method, ip, port, path, use_ssl=True, headers=None, verify=False, cert=None, auth=None, data=None, default_headers=True, retries=5): protocol = 'https' if use_ssl else 'http' request_headers = DEFAULT_HEADERS.copy() if default_headers else {} if headers: request_headers.update(headers) try: response = http_method('{0}://{1}:{2}{3}'.format(protocol, ip, port, path), verify=verify, headers=request_headers, timeout=40, cert=cert, auth=auth, data=data) if 200 <= response.status_code < 300: return response else: > raise_http_exception(response) tests/utils/rest_utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response [400]> def raise_http_exception(response): ex_cls = _exceptions.get(response.status_code, HTTPError) > raise ex_cls(response) E tests.utils.http_exceptions.HTTPBadRequest: [400] Bad Request: {"error":{"id":"notSupported","description":"This operation is not supported."}} tests/utils/http_exceptions.py:15: HTTPBadRequest During handling of the above exception, another exception occurred: request = <FixtureRequest for <Function 'test_user_fails_to_create_file_in_the_share_root_directory[1oz_1op_1oc-REST]'>> @pytest.mark.usefixtures(*function_args) def scenario_wrapper(request): > _execute_scenario(feature, scenario, request, encoding) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:189: in _execute_scenario _execute_step_function(request, scenario, step, step_func) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:130: in _execute_step_function step_func(**kwargs) tests/utils/bdd_utils.py:78: in wrapper return fun(*ba.args, **ba.kwargs) tests/mixed/steps/rest/onezone/special_dirs.py:167: in try_to_create_file_in_special_dir try_to_create_file_in_special_dir_by_id( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ client = 'rest' users = {'admin': <tests.utils.user_utils.AdminUser object at 0x7fb11776f400>, 'admin2': <tests.utils.user_utils.User object a...s.user_utils.AdminUser object at 0x7fb1177b81c0>, 'user1': <tests.utils.user_utils.User object at 0x7fb117a2a040>, ...} user = 'user1' hosts = {'oneclient-1': {'container-id': 'cb6f958731309198b768df883a7c5c938eefd9be566bcbe6dcd76f3ae8806139', 'ip': '10.244.230...1d716e68088', 'hostname': 'dev-onezone.default.svc.cluster.local', 'ip': '10.244.230.181', 'name': 'dev-onezone', ...}} host = 'oneprovider-1' dir_id = '00000000008420187368617265477569642373706163655F323765613432623639363132396466323733313331623062616233306333616163683...3133316230626162333063336161636831356139233433343161323431373031626237656437353234616430366331386433333031636861313932' file_name = 'some_name.txt' err_msg = 'File created in share root dir, but creation should have failed' def try_to_create_file_in_special_dir_by_id(client, users, user, hosts, host, dir_id, file_name, err_msg=''): if client.lower() == 'rest': try: create_empty_file_in_dir_rest( users, user, hosts, host, dir_id, file_name) raise Exception(err_msg) except (ApiException, HTTPBadRequest) as e: ex_err_msg = 'Operation failed with POSIX error: eperm.' > assert ex_err_msg in str(e), f'Unexpected error occurred {e}' E AssertionError: Unexpected error occurred [400] Bad Request: {"error":{"id":"notSupported","description":"This operation is not supported."}} tests/mixed/steps/rest/onezone/special_dirs.py:183: AssertionError