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
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
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
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
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
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
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
John Davis
fd7179273a
Move+test get_users_by_ids
2024-06-10 15:48:10 -04:00
John Davis
0c840d025f
Add first user data access tests
2024-06-10 15:48:10 -04:00
John Davis
71b9e4b971
Add first library data access tests
...
- factor out db access from lib manager;
- add unit tests
- move data access functions from managers.libraries to model.db.libraries
2024-06-10 15:48:10 -04:00
John Davis
1c90246606
Improve model fixtures
...
We can't pass make_foo fixture functions as the default argument to
kwd.get("foo", make_foo()) because make_foo is executed in any case,
which creates a side effect by loading a new foo row into the database,
which leads to failing tests since the number of foo records becomes off
by one.
2024-06-10 15:48:10 -04:00
John Davis
7f83b903cb
Add history pruner + test
...
Add __init__.py to test.unit.data.model.db
2024-05-02 14:12:35 -04:00
John Davis
1773dca37a
Add model fixtures
2024-05-02 14:12:35 -04:00
John Davis
2652ec6510
Add conftest.py for db tests
2024-05-02 14:12:35 -04:00
John Davis
76c8003d4f
Drop unused mapping testing utilities and fixtures
2024-05-02 14:12:35 -04:00
mvdbeek
0456ff1cfd
Merge branch 'release_24.0' into dev
2024-05-02 11:32:44 +02:00
davelopez
b7eda89485
Add test to verify export dataset without hid works
2024-04-25 12:06:28 +02:00
John Davis
09fee6aaad
Remove future, autocommit args from session and engine creation
2024-04-05 13:54:39 -04:00
John Davis
f52d35bf7f
Use NullPool for sqlite engines
...
This restores the behavior under SQLAlchemy 1.4
(Note that we set the pool for sqlite only if it's not an in-memory db
2024-04-02 10:08:53 -04:00
John Davis
78a77d934a
Mypy: typing errors, misc. fixes
2024-04-02 10:08:53 -04:00