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

Develop markers for api tests according to credentials required FDS-1026 #1289

Merged
merged 4 commits into from
Sep 15, 2023

Conversation

GiaJordan
Copy link
Contributor

@GiaJordan GiaJordan commented Sep 8, 2023

PR adds markers for API tests the send synapse credentials in the request, and those that send a None value for the credentials in the request. Aside from the new markers, the code is the same as what is on develop.
7 of these tests are failing. These were probably among the ones identified before by @linglp

FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[None-True] - AssertionError: assert ['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] in [['syn23643259', 'schematic - ...
FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[None-False] - AssertionError: assert (['syn25705259', 'Boolean Test'] and ['syn23667202', 'DataTypeX_table'] in [['syn23643259', ...
FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[Sample_A.txt-True] - AssertionError: assert (['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] and ['syn24226530', 'schematic -...
FAILED tests/test_api.py::TestManifestOperation::test_download_access_restricted_manifest - assert 200 == 500
FAILED tests/test_api.py::TestManifestOperation::test_dataset_manifest_download[Test-None] - assert 500 == 200
FAILED tests/test_api.py::TestManifestOperation::test_dataset_manifest_download[Test-True] - assert 500 == 200
FAILED tests/test_api.py::TestManifestOperation::test_dataset_manifest_download[Test-False] - assert 500 == 200

@GiaJordan GiaJordan changed the title Develop api test cred markers Develop markers for api tests according to credentials required Sep 8, 2023
@GiaJordan GiaJordan changed the title Develop markers for api tests according to credentials required Develop markers for api tests according to credentials required FDS-1026 Sep 11, 2023
@GiaJordan
Copy link
Contributor Author

@mialy-defelice the full stack trace. one thing to note is that deleting the test.csv file did resolve the issue for one of the tests, so likely those aren't clearing out the file after use correctly. For the others I would think that the testing project may have changed since the tests were written. @AmyHeiser do you know if there's an issue for the failing API tests already?

====================================================== FAILURES =======================================================
________________________________ TestSynapseStorage.test_get_dataset_files[None-True] _________________________________

self = <tests.test_api.TestSynapseStorage object at 0x000001DC869CD960>, full_path = True, file_names = None
syn_token = '<xxx>'
client = <FlaskClient <Flask 'schematic_api.api'>>

    @pytest.mark.synapse_credentials_needed
    @pytest.mark.parametrize("full_path", [True, False])
    @pytest.mark.parametrize("file_names", [None, "Sample_A.txt"])
    def test_get_dataset_files(self,full_path, file_names, syn_token, client):
        params = {
            "access_token": syn_token,
            "asset_view": "syn23643253",
            "dataset_id": "syn23643250",
            "full_path": full_path,
        }

        if file_names:
            params["file_names"] = file_names

        response = client.get('http://localhost:3001/v1/storage/dataset/files', query_string=params)

        assert response.status_code == 200
        response_dt = json.loads(response.data)

        # would show full file path .txt in result
        if full_path:
            if file_names:
                assert ["syn23643255","schematic - main/DataTypeX/Sample_A.txt"] and ["syn24226530","schematic - main/TestDatasets/TestDataset-Annotations/Sample_A.txt"] and ["syn25057024","schematic - main/TestDatasets/TestDataset-Annotations-v2/Sample_A.txt"] in response_dt
            else:
>               assert   ["syn23643255","schematic - main/DataTypeX/Sample_A.txt"] in response_dt
E               AssertionError: assert ['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] in [['syn23643259', 'schematic - main\\Credentials/credentials.json'], ['syn25171627', 'schematic - main\\Credentials/schematic_service_account_creds.json'], ['syn23643255', 'schematic - main\\DataTypeX/Sample_A.txt'], ['syn23643257', 'schematic - main\\DataTypeX/Sample_B.txt'], ['syn23643256', 'schematic - main\\DataTypeX/Sample_C.txt'], ['syn34292104', 'schematic - main\\TestBlankAnnos/dummy_mock_data.txt'], ...]

tests\test_api.py:149: AssertionError
________________________________ TestSynapseStorage.test_get_dataset_files[None-False] ________________________________

self = <tests.test_api.TestSynapseStorage object at 0x000001DC869CDB10>, full_path = False, file_names = None
syn_token = '<xxx>'
client = <FlaskClient <Flask 'schematic_api.api'>>

    @pytest.mark.synapse_credentials_needed
    @pytest.mark.parametrize("full_path", [True, False])
    @pytest.mark.parametrize("file_names", [None, "Sample_A.txt"])
    def test_get_dataset_files(self,full_path, file_names, syn_token, client):
        params = {
            "access_token": syn_token,
            "asset_view": "syn23643253",
            "dataset_id": "syn23643250",
            "full_path": full_path,
        }

        if file_names:
            params["file_names"] = file_names

        response = client.get('http://localhost:3001/v1/storage/dataset/files', query_string=params)

        assert response.status_code == 200
        response_dt = json.loads(response.data)

        # would show full file path .txt in result
        if full_path:
            if file_names:
                assert ["syn23643255","schematic - main/DataTypeX/Sample_A.txt"] and ["syn24226530","schematic - main/TestDatasets/TestDataset-Annotations/Sample_A.txt"] and ["syn25057024","schematic - main/TestDatasets/TestDataset-Annotations-v2/Sample_A.txt"] in response_dt
            else:
                assert   ["syn23643255","schematic - main/DataTypeX/Sample_A.txt"] in response_dt
        else:
            if file_names:
                assert ["syn23643255","Sample_A.txt"] and ["syn24226530","Sample_A.txt"] and ["syn25057024","Sample_A.txt"] in response_dt
            else:
>               assert ["syn25705259","Boolean Test"] and ["syn23667202","DataTypeX_table"] in response_dt
E               AssertionError: assert (['syn25705259', 'Boolean Test'] and ['syn23667202', 'DataTypeX_table'] in [['syn23643259', 'credentials.json'], ['syn25171627', 'schematic_service_account_creds.json'], ['syn23643255', 'Sample_A.txt'], ['syn23643257', 'Sample_B.txt'], ['syn23643256', 'Sample_C.txt'], ['syn34292104', 'dummy_mock_data.txt'], ...])

tests\test_api.py:154: AssertionError
____________________________ TestSynapseStorage.test_get_dataset_files[Sample_A.txt-True] _____________________________

self = <tests.test_api.TestSynapseStorage object at 0x000001DC869CDBA0>, full_path = True, file_names = 'Sample_A.txt'
syn_token = '<xxx>'
client = <FlaskClient <Flask 'schematic_api.api'>>

    @pytest.mark.synapse_credentials_needed
    @pytest.mark.parametrize("full_path", [True, False])
    @pytest.mark.parametrize("file_names", [None, "Sample_A.txt"])
    def test_get_dataset_files(self,full_path, file_names, syn_token, client):
        params = {
            "access_token": syn_token,
            "asset_view": "syn23643253",
            "dataset_id": "syn23643250",
            "full_path": full_path,
        }

        if file_names:
            params["file_names"] = file_names

        response = client.get('http://localhost:3001/v1/storage/dataset/files', query_string=params)

        assert response.status_code == 200
        response_dt = json.loads(response.data)

        # would show full file path .txt in result
        if full_path:
            if file_names:
>               assert ["syn23643255","schematic - main/DataTypeX/Sample_A.txt"] and ["syn24226530","schematic - main/TestDatasets/TestDataset-Annotations/Sample_A.txt"] and ["syn25057024","schematic - main/TestDatasets/TestDataset-Annotations-v2/Sample_A.txt"] in response_dt
E               AssertionError: assert (['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] and ['syn24226530', 'schematic - main/TestDatasets/TestDataset-Annotations/Sample_A.txt'] and ['syn25057024', 'schematic - main/TestDatasets/TestDataset-Annotations-v2/Sample_A.txt'] in [['syn23643255', 'schematic - main\\DataTypeX/Sample_A.txt'], ['syn24226530', 'schematic - main\\TestDatasets\\TestDataset-Annotations/Sample_A.txt'], ['syn25057024', 'schematic - main\\TestDatasets\\TestDataset-Annotations-v2/Sample_A.txt'], ['syn25614636', 'schematic - main\\TestDatasets\\TestDataset-Annotations-v3/Sample_A.txt'], ['syn26008143', 'schematic - main\\TestDatasets\\TestDataset-FilenameAnnotation/Sample_A.txt'], ['syn24239835', 'schematic - main\\TestDatasets\\TestDataset-GetManifest-NoManifest/Sample_A.txt'], ...])

tests\test_api.py:147: AssertionError
___________________________ TestManifestOperation.test_download_access_restricted_manifest ____________________________

self = <tests.test_api.TestManifestOperation object at 0x000001DC86A048E0>
client = <FlaskClient <Flask 'schematic_api.api'>>
syn_token = '<xxx>'

    @pytest.mark.synapse_credentials_needed
    # test downloading a manifest with access restriction and see if the correct error message got raised
    def test_download_access_restricted_manifest(self, client, syn_token):
        params = {
            "access_token": syn_token,
            "manifest_id": "syn29862078"
        }

        response = client.get('http://localhost:3001/v1/manifest/download', query_string = params)
>       assert response.status_code == 500
E       assert 200 == 500
E        +  where 200 = <WrapperTestResponse streamed [200 OK]>.status_code

tests\test_api.py:719: AssertionError
___________________________ TestManifestOperation.test_dataset_manifest_download[Test-True] ___________________________

self = <tests.test_api.TestManifestOperation object at 0x000001DC86A07760>
client = <FlaskClient <Flask 'schematic_api.api'>>, as_json = True
syn_token = '<xxx>'
new_manifest_name = 'Test'

    @pytest.mark.synapse_credentials_needed
    @pytest.mark.parametrize("as_json", [None, True, False])
    @pytest.mark.parametrize("new_manifest_name", [None, "Test"])
    def test_dataset_manifest_download(self, client, as_json, syn_token, new_manifest_name):
        params = {
            "access_token": syn_token,
            "asset_view": "syn28559058",
            "dataset_id": "syn28268700",
            "as_json": as_json,
            "new_manifest_name": new_manifest_name
        }

        response = client.get('http://localhost:3001/v1/dataset/manifest/download', query_string = params)
>       assert response.status_code == 200
E       assert 500 == 200
E        +  where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code

tests\test_api.py:737: AssertionError
------------------------------------------------ Captured stderr call -------------------------------------------------
ERROR: [2023-09-14 10:57:33] schematic_api.api - Exception on /v1/dataset/manifest/download [GET]
Traceback (most recent call last):
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\decorator.py", line 68, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\uri_parsing.py", line 149, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\validation.py", line 399, in wrapper
    return function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\produces.py", line 41, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\parameter.py", line 120, in wrapper
    return function(**kwargs)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic_api\api\routes.py", line 587, in download_dataset_manifest    manifest_data = store.getDatasetManifest(datasetId=dataset_id, downloadFile=True, newManifestName=new_manifest_name)  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 510, in getDatasetManifest
    manifest_data = ManifestDownload.download_manifest(md, newManifestName=newManifestName, manifest_df=manifest)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 149, in download_manifest
    os.rename(manifest_data['path'], new_manifest_path_name)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\synapse_storage_manifest.csv' -> 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\Test.csv'
-------------------------------------------------- Captured log call --------------------------------------------------
ERROR    schematic_api.api:app.py:1449 Exception on /v1/dataset/manifest/download [GET]
Traceback (most recent call last):
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\decorator.py", line 68, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\uri_parsing.py", line 149, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\validation.py", line 399, in wrapper
    return function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\produces.py", line 41, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\parameter.py", line 120, in wrapper
    return function(**kwargs)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic_api\api\routes.py", line 587, in download_dataset_manifest    manifest_data = store.getDatasetManifest(datasetId=dataset_id, downloadFile=True, newManifestName=new_manifest_name)  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 510, in getDatasetManifest
    manifest_data = ManifestDownload.download_manifest(md, newManifestName=newManifestName, manifest_df=manifest)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 149, in download_manifest
    os.rename(manifest_data['path'], new_manifest_path_name)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\synapse_storage_manifest.csv' -> 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\Test.csv'
__________________________ TestManifestOperation.test_dataset_manifest_download[Test-False] ___________________________

self = <tests.test_api.TestManifestOperation object at 0x000001DC86A077F0>
client = <FlaskClient <Flask 'schematic_api.api'>>, as_json = False
syn_token = '<xxx>'
new_manifest_name = 'Test'

    @pytest.mark.synapse_credentials_needed
    @pytest.mark.parametrize("as_json", [None, True, False])
    @pytest.mark.parametrize("new_manifest_name", [None, "Test"])
    def test_dataset_manifest_download(self, client, as_json, syn_token, new_manifest_name):
        params = {
            "access_token": syn_token,
            "asset_view": "syn28559058",
            "dataset_id": "syn28268700",
            "as_json": as_json,
            "new_manifest_name": new_manifest_name
        }

        response = client.get('http://localhost:3001/v1/dataset/manifest/download', query_string = params)
>       assert response.status_code == 200
E       assert 500 == 200
E        +  where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code

tests\test_api.py:737: AssertionError
------------------------------------------------ Captured stderr call -------------------------------------------------
ERROR: [2023-09-14 10:57:39] schematic_api.api - Exception on /v1/dataset/manifest/download [GET]
Traceback (most recent call last):
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\decorator.py", line 68, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\uri_parsing.py", line 149, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\validation.py", line 399, in wrapper
    return function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\produces.py", line 41, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\parameter.py", line 120, in wrapper
    return function(**kwargs)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic_api\api\routes.py", line 587, in download_dataset_manifest    manifest_data = store.getDatasetManifest(datasetId=dataset_id, downloadFile=True, newManifestName=new_manifest_name)  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 510, in getDatasetManifest
    manifest_data = ManifestDownload.download_manifest(md, newManifestName=newManifestName, manifest_df=manifest)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 149, in download_manifest
    os.rename(manifest_data['path'], new_manifest_path_name)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\synapse_storage_manifest.csv' -> 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\Test.csv'
-------------------------------------------------- Captured log call --------------------------------------------------
ERROR    schematic_api.api:app.py:1449 Exception on /v1/dataset/manifest/download [GET]
Traceback (most recent call last):
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\flask\app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\decorator.py", line 68, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\uri_parsing.py", line 149, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\validation.py", line 399, in wrapper
    return function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\produces.py", line 41, in wrapper
    response = function(request)
  File "C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\decorators\parameter.py", line 120, in wrapper
    return function(**kwargs)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic_api\api\routes.py", line 587, in download_dataset_manifest    manifest_data = store.getDatasetManifest(datasetId=dataset_id, downloadFile=True, newManifestName=new_manifest_name)  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 510, in getDatasetManifest
    manifest_data = ManifestDownload.download_manifest(md, newManifestName=newManifestName, manifest_df=manifest)
  File "C:\Users\gjordan\Documents\GitHub\schematic\schematic\store\synapse.py", line 149, in download_manifest
    os.rename(manifest_data['path'], new_manifest_path_name)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\synapse_storage_manifest.csv' -> 'c:\\users\\gjordan\\documents\\github\\schematic\\manifests\\Test.csv'
================================================== warnings summary ===================================================
tests/test_api.py: 10 warnings
  C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\connexion\apis\flask_api.py:207: FutureWarning: Implicit (flask) JSON serialization will change in the next major version. This is triggered because a response body is being serialized as JSON even though the mimetype is not a JSON type. This will be replaced by something that is mimetype-specific and may raise an error instead of silently converting everything to JSON. Please make sure to specify media/mime types in your specs.
    warnings.warn(

tests/test_api.py::TestManifestOperation::test_submit_manifest_table_and_file_replace
tests/test_api.py::TestManifestOperation::test_submit_manifest_table_and_file_replace
tests/test_api.py::TestManifestOperation::test_submit_manifest_table_and_file_upsert
tests/test_api.py::TestManifestOperation::test_submit_manifest_table_and_file_upsert
  C:\Users\gjordan\anaconda3\envs\schematic\lib\site-packages\synapseclient\table.py:2066: FutureWarning: the 'line_terminator'' keyword is deprecated, use 'lineterminator' instead.
    df.to_csv(f,

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== short test summary info ===============================================
FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[None-True] - AssertionError: assert ['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] in [['syn23643259', 'schematic - ...
FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[None-False] - AssertionError: assert (['syn25705259', 'Boolean Test'] and ['syn23667202', 'DataTypeX_table'] in [['syn23643259', ...
FAILED tests/test_api.py::TestSynapseStorage::test_get_dataset_files[Sample_A.txt-True] - AssertionError: assert (['syn23643255', 'schematic - main/DataTypeX/Sample_A.txt'] and ['syn24226530', 'schematic -...
FAILED tests/test_api.py::TestManifestOperation::test_download_access_restricted_manifest - assert 200 == 500
FAILED tests/test_api.py::TestManifestOperation::test_dataset_manifest_download[Test-True] - assert 500 == 200
FAILED tests/test_api.py::TestManifestOperation::test_dataset_manifest_download[Test-False] - assert 500 == 200
======================== 6 failed, 33 passed, 277 deselected, 14 warnings in 750.79s (0:12:30) ========================

@AmyHeiser
Copy link

@GiaJordan Lingling opened this ticket, didn't mention a fail, but says they are outdated. https://sagebionetworks.jira.com/browse/FDS-973

@mialy-defelice
Copy link
Contributor

@AmyHeiser @GiaJordan I am trying to troubleshoot the test tests/test_api.py::TestSynapseStorage::test_get_dataset_files[None-False] I am not sure what the best solution is... rewrite the tests or fix the tests, but what is odd is that when looking at the returned response, all the folders, files, etc are not being returned when trying to get what I am sure is the fileview... its unclear (like Lingling mentioned) what the exact intent of this test is, I assume it has something to do with the API calls like get_storage_projects_datasets. This is why the failure is happening, its not an access issue, at least for that test.

@mialy-defelice
Copy link
Contributor

@GiaJordan these tests are failing on dev too?

@GiaJordan
Copy link
Contributor Author

@GiaJordan these tests are failing on dev too?

@mialy-defelice yes

@mialy-defelice
Copy link
Contributor

@GiaJordan I will approve this PR since the tests are failing on dev, but can you open a new ticket for addressing these tests?

@GiaJordan
Copy link
Contributor Author

@GiaJordan I will approve this PR since the tests are failing on dev, but can you open a new ticket for addressing these tests?

@mialy-defelice sure, I can

@GiaJordan GiaJordan merged commit 135cfb2 into develop Sep 15, 2023
@GiaJordan GiaJordan deleted the develop-api-test-cred-markers branch September 15, 2023 18:00
@andrewelamb andrewelamb mentioned this pull request Sep 20, 2023
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.

3 participants