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

[24.0] Fix test_storage_show API test #19522

Conversation

nsoranzo
Copy link
Member

@nsoranzo nsoranzo commented Feb 3, 2025

Pass hda id instead of dataset id to dataset_storage_info().

Fix the following traceback:

    def test_storage_show(self, history_id):
        hda = self.dataset_populator.new_dataset(history_id, wait=True)
        hda_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=hda)
        dataset_id = hda_details["dataset_id"]
>       storage_info_dict = self.dataset_populator.dataset_storage_info(dataset_id)

...

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:9129/api/datasets/9a58064fb2c43d99/storage

http_error_msg = ('404 Client Error: Not Found for url: '
 'http://127.0.0.1:9129/api/datasets/9a58064fb2c43d99/storage')
reason     = 'Not Found'
self       = <Response [404]>

Broken since the test was introduced in commit c5bf63b .

Started failing after #19506 , but probably just because of database ids changing.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Pass hda id instead of dataset id to ``dataset_storage_info()``.

Fix the following traceback:

```
    def test_storage_show(self, history_id):
        hda = self.dataset_populator.new_dataset(history_id, wait=True)
        hda_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=hda)
        dataset_id = hda_details["dataset_id"]
>       storage_info_dict = self.dataset_populator.dataset_storage_info(dataset_id)

...

        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:9129/api/datasets/9a58064fb2c43d99/storage

http_error_msg = ('404 Client Error: Not Found for url: '
 'http://127.0.0.1:9129/api/datasets/9a58064fb2c43d99/storage')
reason     = 'Not Found'
self       = <Response [404]>
```

Broken since the test was introduced in commit c5bf63b .

Started failing after galaxyproject#19506 ,
but probably just because of database ids changing.
Copy link
Contributor

@davelopez davelopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing! Also thanks for removing the unused requires_new_history leftover 👍

@mvdbeek mvdbeek merged commit 062cdda into galaxyproject:release_24.0 Feb 3, 2025
43 of 53 checks passed
@nsoranzo nsoranzo deleted the release_24.0_fix_test_storage_show branch February 3, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants