An attempt for T2938
Details
Details
Diff Detail
Diff Detail
- Repository
- rDWAPPS Web applications
- Branch
- raw-extrinsic-metadata-endpoint
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 19611 Build 30429: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 30428: arc lint + arc unit
Event Timeline
Comment Actions
I am sorry if I did something stupid. I am new here and I am just trying to understand things from the codebase.
Comment Actions
===================================================================== FAILURES ======================================================================
______________________________________________________ test_api_origin_raw_extrinsic_metadata _______________________________________________________
api_client = <rest_framework.test.APIClient object at 0x7f8ab8f56150>
@given(origin())
> def test_api_origin_raw_extrinsic_metadata(api_client, origin):
swh/web/tests/api/views/test_origin.py:680:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
swh/web/tests/api/views/test_origin.py:685: in test_api_origin_raw_extrinsic_metadata
rv = check_api_get_responses(api_client, url, status_code=200)
swh/web/tests/utils.py:119: in check_api_get_responses
api_client, url, status_code, content_type="application/json"
swh/web/tests/utils.py:66: in check_http_get_response
content_type=content_type,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status_code=500, "application/json">, status_code = 200, content_type = 'application/json'
def _assert_http_response(
response: HttpResponse, status_code: int, content_type: str
) -> HttpResponse:
if isinstance(response, Response):
drf_response = cast(Response, response)
error_context = (
drf_response.data.pop("traceback")
if isinstance(drf_response.data, dict) and "traceback" in drf_response.data
else drf_response.data
)
elif isinstance(response, StreamingHttpResponse):
error_context = getattr(response, "traceback", response.streaming_content)
else:
error_context = getattr(response, "traceback", response.content)
> assert response.status_code == status_code, error_context
E AssertionError: Traceback (most recent call last):
E File "/home/krshivendu/.virtualenvs/swh/lib/python3.7/site-packages/rest_framework/views.py", line 506, in dispatch
E response = handler(request, *args, **kwargs)
E File "/home/krshivendu/.virtualenvs/swh/lib/python3.7/site-packages/rest_framework/decorators.py", line 50, in handler
E return func(*args, **kwargs)
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/api/apiurls.py", line 96, in api_view_f
E response = f(request, **kwargs)
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/api/apidoc.py", line 348, in documented_view
E raise exc
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/api/apidoc.py", line 345, in documented_view
E return {"data": f(request, **kwargs), "doc_data": doc_data}
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/api/views/origin.py", line 510, in api_origin_raw_extrinsic_metadata
E request=request,
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/api/views/utils.py", line 67, in api_lookup
E res = lookup_fn(*args)
E File "/home/krshivendu/Projects/GSoC21/software-heritage/swh-environment/swh-web/swh/web/common/archive.py", line 445, in lookup_origin_raw_extrinsic_metadata
E "origin", origin_url, authority=SWH_AUTHORITY
E TypeError: raw_extrinsic_metadata_get() got multiple values for argument 'authority'
E
E assert 500 == 200
E + where 500 = <Response status_code=500, "application/json">.status_code
swh/web/tests/utils.py:32: AssertionError
-------------------------------------------------------------------- Hypothesis ---------------------------------------------------------------------
Falsifying example: test_api_origin_raw_extrinsic_metadata(
api_client=<rest_framework.test.APIClient at 0x7f8ab8f56150>,
origin={'archives': ['libtess2.zip'],
'type': 'git',
'url': 'https://github.com/memononen/libtess2'},
)Comment Actions
Build has FAILED
Patch application report for D5181 (id=18532)
Rebasing onto 457f8f57c0...
First, rewinding head to replay your work on top of it... Applying: Attempt to add extrinsic metadata endpoint
Changes applied before test
commit c672c331c5efac6d02908be9fdad9ec2d6596e0e
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date: Tue Mar 2 20:29:58 2021 +0530
Attempt to add extrinsic metadata endpointLink to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/604/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/604/console