John Chilton
7f7710d392
Implement recovering normalized workflow request from invocation.
2024-10-15 09:12:05 -04:00
John Davis
00bebee7c7
Add test exposing bug
...
After user's email has been modified, we can't retrieve sharing roles
for that user
2024-10-04 14:44:41 -04:00
Marius van den Beek
2ead0c41e9
Merge pull request #18807 from jmchilton/landing
2024-10-01 21:44:50 +02:00
Nicola Soranzo
136747e766
Type annotations and fixes
...
- Use `galaxy.util.path.StrPath` everywhere
2024-09-30 21:33:44 +01:00
John Chilton
93f2af6a44
Allow dataset and source checksum validation during materialization.
2024-09-30 13:25:02 -04:00
John Chilton
80aaff8d23
Plumbing for dereferencing URLs into datasets.
2024-09-30 13:25:02 -04:00
John Chilton
813ed02d53
Merge pull request #18886 from jdavcs/dev_db_test_update
...
Refactor migration testing setup code
2024-09-25 10:49:27 -04:00
Matthias Bernt
7dd606a6b2
Merge branch 'release_24.1' into dev
...
# Conflicts:
# lib/galaxy/version.py
# packages/app/HISTORY.rst
# packages/app/setup.cfg
# packages/auth/HISTORY.rst
# packages/auth/setup.cfg
# packages/config/HISTORY.rst
# packages/config/setup.cfg
# packages/data/HISTORY.rst
# packages/data/setup.cfg
# packages/files/HISTORY.rst
# packages/files/setup.cfg
# packages/job_execution/HISTORY.rst
# packages/job_execution/setup.cfg
# packages/job_metrics/HISTORY.rst
# packages/job_metrics/setup.cfg
# packages/navigation/HISTORY.rst
# packages/navigation/setup.cfg
# packages/objectstore/HISTORY.rst
# packages/objectstore/setup.cfg
# packages/schema/HISTORY.rst
# packages/schema/setup.cfg
# packages/selenium/HISTORY.rst
# packages/selenium/setup.cfg
# packages/test_api/HISTORY.rst
# packages/test_api/setup.cfg
# packages/test_base/HISTORY.rst
# packages/test_base/setup.cfg
# packages/test_driver/HISTORY.rst
# packages/test_driver/setup.cfg
# packages/tool_shed/HISTORY.rst
# packages/tool_shed/setup.cfg
# packages/tool_util/HISTORY.rst
# packages/tool_util/setup.cfg
# packages/tours/HISTORY.rst
# packages/tours/setup.cfg
# packages/util/HISTORY.rst
# packages/util/setup.cfg
# packages/web_apps/HISTORY.rst
# packages/web_apps/setup.cfg
# packages/web_framework/HISTORY.rst
# packages/web_framework/setup.cfg
# packages/web_stack/HISTORY.rst
# packages/web_stack/setup.cfg
2024-09-25 14:29:37 +02:00
John Davis
b57ec18991
Refactor migration testing setup code
...
- Do not explicitly import fixtures (a little duplication is safer/cleaner)
- Move dangerous fixture into module to prevent accidental usage from other modules
- Ensure only one database is used for all tests in module
2024-09-24 20:47:09 -04:00
John Davis
03641a98fa
Fix migration data fixes tests
...
When upgrading back to a valid revision, upgrade to head, not the
revision under test: we need the latest version of the model definition
in the database for the test to cleanup correctly.
2024-09-24 16:16:05 -04:00
John Davis
5524ea77a7
Add tests for migration fixes
2024-09-23 23:52:05 -04:00
John Davis
2fc21f9962
Do not pass unnecessary arguments
2024-09-23 17:05:15 -04:00
John Davis
6c4ddeb91d
Test that private roles are not assignable
2024-09-23 17:05:15 -04:00
John Davis
8c4a90010a
Add tests for user and history default permissions
2024-09-23 17:05:15 -04:00
John Davis
19d76e9580
Fix mypy: statements are reachable
2024-09-23 17:05:15 -04:00
John Davis
4fb1c704d6
Rename verify_items helper to have_same_elements
...
Improves readability of test code
2024-09-23 15:49:01 -04:00
John Davis
004d46c7a4
Fix test database handling for db tests
2024-09-23 14:22:59 -04:00
John Davis
7739134485
Add unit tests for user/group/role associations
2024-09-23 14:22:59 -04:00
John Davis
bef3888683
Refactor for testability: pass only session
...
We don't need a ModelMapping instance here; without it we can
easily write unit tests.
2024-09-23 14:22:59 -04:00
mvdbeek
69a3cda018
Fix history import when parent_hda not serialized
...
and make sure we include the parent_hda when exporting histories.
Fixes
https://sentry.galaxyproject.org/share/issue/20ee27f675ef476588bbe8ff273eaee7/ :
```
KeyError: '31e7840b5aedca43523bfcc8e2e9e56f'
File "galaxy/jobs/__init__.py", line 2039, in finish
task_wrapper = self.tool.exec_after_process(
File "galaxy/tools/__init__.py", line 3100, in exec_after_process
JobImportHistoryArchiveWrapper(self.app, job.id).cleanup_after_job()
File "galaxy/tools/imp_exp/__init__.py", line 81, in cleanup_after_job
model_store.perform_import(new_history, job=job, new_history=True)
File "galaxy/model/store/__init__.py", line 416, in perform_import
self._import_implicit_dataset_conversions(object_import_tracker)
File "galaxy/model/store/__init__.py", line 1280, in _import_implicit_dataset_conversions
idc.parent_hda = object_import_tracker.hdas_by_key[idc_attrs["parent_hda"]]
```
2024-09-23 11:07:20 +02:00
John Davis
87573ee617
Add tests for migration data fixes
2024-09-21 00:18:02 -04:00
John Davis
4471c6a851
Refactor tests to reduce duplication
2024-09-21 00:17:20 -04:00
John Davis
600523b773
Fix test_galaxy_mapping to respect constraint
2024-09-20 17:24:20 -04:00
John Davis
11a25ae199
Fix test_quota to respect constraint
2024-09-20 17:24:20 -04:00
John Davis
b261dea43a
Randomize test user email to respect unique constraint
2024-09-20 17:24:20 -04:00
Nicola Soranzo
e61f2e8999
Fix new E721 and F811 errors from ruff 0.5.0
2024-07-03 16:57:52 +01:00
John Davis
0712fbf538
Add test_history_update
2024-06-10 15:48:10 -04:00
John Davis
fd29aab55d
Drop test_tasks
...
Tests SQLAlchemy (create foo + set foo.bar + load foo + check bar)
2024-06-10 15:48:10 -04:00
John Davis
1d7d65568b
Convert + improve test_job/task_metrics
2024-06-10 15:48:10 -04:00
John Davis
65530c9d59
Drop unused fixture arg
2024-06-10 15:48:10 -04:00
John Davis
5123c39298
Convert test_metadata_spec
2024-06-10 15:48:10 -04:00
John Davis
e7d4270321
Drop test_basic
...
Tests SQLAlchemy, user-history relationship mapping
2024-06-10 15:48:10 -04:00
John Davis
83e124f4d1
Drop incomplete test
...
No assert (only TODO); but would test SQLAlchemy
2024-06-10 15:48:10 -04:00
John Davis
47a8bf7675
Drop test_tags
...
Tests SQLAlchemy:
1. Create tag
2. Verify there's no FooTagAssociation with this tag
3. Add new FooTagAssociation to Foo and save to db
4. Verify there is one FooTagAssociation with this tag
2024-06-10 15:48:10 -04:00
John Davis
c8df2fdf30
Convert test_get_display_name
2024-06-10 15:48:10 -04:00
John Davis
23ae962bbf
Convert hid tests
2024-06-10 15:48:10 -04:00
John Davis
2d4a65d915
Convert test_current_galaxy_sesssion
2024-06-10 15:48:10 -04:00
John Davis
da3c885800
Convert test_history_contents
2024-06-10 15:48:10 -04:00
John Davis
1a4d6e651f
Drop test_jobs
...
Tested SQLAlchemy:
- create job
- set job.tool_id
- save, load job by id, verify job.tool_id
2024-06-10 15:48:10 -04:00
John Davis
706079188d
Drop test_dataset_job_relationship
...
This tested SQLAlchemy:
1. create: dataset, job
2. set: dataset.job = job
3. save, then load dataset by dataset.id; verify that dataset.job = job
2024-06-10 15:48:10 -04:00
John Davis
9572a93ac4
Convert test_ratings
2024-06-10 15:48:10 -04:00
John Davis
51ffbfd432
Convert test_default_disk_usage
2024-06-10 15:48:10 -04:00
John Davis
558d8364e9
More test-galaxy-mapping conversions
2024-06-10 15:48:10 -04:00
John Davis
bc6fb8953d
Improve test: enable db triggers; do not verify HistoryAudit table
...
We do not verify the counts of rows in the HistoryAudit table because
with the db trigger enabled, those rows are created automatically.
Although it is possible to calculate the expected counts, those numbers
would be dependend on previous db statements executed in the same test,
and that calculation would be not straightforward, making the test
brittle and confusing.
2024-06-10 15:48:10 -04:00
John Davis
7ad6d43418
Start replacing test_galaxy_mapping w/data access tests
2024-06-10 15:48:10 -04:00
John Davis
4aaed3e2c9
Move+test get_roles_by_ids
2024-06-10 15:48:10 -04:00
John Davis
f91bd11052
Test User.username model definition (unique constraint)
2024-06-10 15:48:10 -04:00
John Davis
4329a5e603
webapps.galaxy.services.user.get_users_for_index: test + factor out
2024-06-10 15:48:10 -04:00
John Davis
fabce5bdc4
security.get_private_user_role: test + factor out
2024-06-10 15:48:10 -04:00
John Davis
b8e05af3be
security.get_npns_roles: test + factor out
2024-06-10 15:48:10 -04:00