-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case to demonstrate disk usage update for work dir outputs is br…
…oken with celery_extended.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from galaxy_test.base.populators import ( | ||
DatasetPopulator, | ||
uses_test_history, | ||
) | ||
from galaxy_test.driver.integration_util import IntegrationTestCase | ||
|
||
|
||
class TestDiskUsageUpdateDefault(IntegrationTestCase): | ||
framework_tool_and_types = True | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor) | ||
|
||
@uses_test_history(require_new=False) | ||
def test_run_work_dir_glob(self, history_id): | ||
# Run a tool with a work dir glob and ensure content and disk usage is updated. | ||
self.dataset_populator.new_dataset(history_id, content="fwd1Test", wait=True) | ||
initial_disk_usage = self.dataset_populator.total_disk_usage() | ||
response = self.dataset_populator.run_tool("from_work_dir_glob", {}, history_id, assert_ok=True) | ||
self.dataset_populator.wait_for_job(job_id=response["jobs"][0]["id"]) | ||
final_disk_usage = self.dataset_populator.total_disk_usage() | ||
assert final_disk_usage == initial_disk_usage + 3 | ||
|
||
|
||
class TestDiskUsageCeleryExtended(TestDiskUsageUpdateDefault): | ||
@classmethod | ||
def handle_galaxy_config_kwds(cls, config): | ||
super().handle_galaxy_config_kwds(config) | ||
config["metadata_strategy"] = "celery_extended" |