Commit Graph
3412 Commits
Author SHA1 Message Date
Nicola Soranzo ac3e1ca1d0 Use Crypto to generate SSH keys
Also remove key files in `stop_ssh_docker()`.
2018-10-10 16:22:05 +01:00
mvdbeek b08c6219c3 Simplify ssh key handling in integration test 2018-10-10 14:56:05 +02:00
mvdbeek 5e12e509bf Fix selection of job plugin and image
Thanks @nsoranzo.
2018-10-10 14:56:05 +02:00
mvdbeek 5844bdc7aa Add integration test for remote shell CLI runners
This tests both the SecureShell and Paramiko shell plugins and the
Slurm and Torque CLI runner.
2018-10-10 10:10:51 +02:00
John Chilton 4a345b99c3 Fix security problems when extracting untrusted tar files.
Fixes GX-2018-0006.
2018-10-04 11:32:52 -04:00
Dannon Baker cf62a1dafd Merge remote-tracking branch 'upstream/release_18.01' into release_18.05 2018-09-26 09:17:26 -04:00
Dannon 02c177152b Merge pull request #6740 from mvdbeek/backport_tool_version_select_fixes
[18.05] Backport tool version select fixes
2018-09-20 09:41:15 -04:00
mvdbeek f5dcf60561 Fix and test anonymous error reports
Fixes https://github.com/galaxyproject/galaxy/issues/6675
2018-09-19 21:00:50 +02:00
mvdbeek 3017568e77 Drop unnecessary history in test_show_with_wrong_tool_version_in_tool_id test 2018-09-19 16:40:59 +02:00
mvdbeek f6f526a0a5 Use tool_version instead of version parameter
To be consistent with other routes that accept this parameter.
2018-09-19 15:39:00 +02:00
mvdbeek 94082a878d Unit test that fails if we don't return the latest version upon version mismatch 2018-09-19 15:39:00 +02:00
mvdbeek 806beaca9b Test that newest version will be returned if tool id or version don't match 2018-09-19 15:39:00 +02:00
John Chilton b878835ea3 Add a legacy_job_state mode to restore 17.09 workflow invocation behavior. 2018-08-08 11:11:48 -04:00
John Chilton 272c6b071d Test case to clarify workflow API a bit in simple cases. 2018-08-08 11:11:47 -04:00
Dannon Baker d7959568f8 Merge branch 'release_18.01' into release_18.05 2018-08-06 20:19:18 -04:00
mvdbeek ba47188f5e Introduce test for auto-labelling subworkflow workflow outputs 2018-08-06 15:55:27 +02:00
John Chilton 5f19b8752d Fix empty handling rule. 2018-07-26 09:52:07 -04:00
John Chilton 9794d835e5 Fix to_dict with io_details=True for tools with collection outputs.
Fixes #6537 and includes a test case.
2018-07-25 12:32:38 -04:00
mvdbeek 647ba8531a Add test tool and workflow for mapping over with mapping output
This doesn't quite work because of the dynamic output collection,
which fails with:

```
galaxy.tools.parameters.output_collect DEBUG 2018-06-06 18:40:38,784 (3) Add dynamic collection datasets to history for output [reverse] (171.970 ms)
galaxy.tools.parameters.output_collect ERROR 2018-06-06 18:40:38,839 Problem gathering output collection.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/parameters/output_collect.py", line 340, in collect_dynamic_outputs
    collection_builder.populate()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 88, in populate
    elements = self.build_elements()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 59, in build_elements
    new_elements[identifier] = element.build()
AttributeError: 'HistoryDatasetAssociation' object has no attribute 'build'
```

This seems to happen because the inner collection is wrongly detected as
nested. In general I doubt that mapping over colleciton output works
with dynamically discovered output collections.
2018-06-20 09:54:40 -04:00
mvdbeek 7cfbb032f6 Break test by adding "list" to collection_type
This will break tests trying to map over list:pair collections,
for instance test_extract_workflows_with_dataset_collections.
2018-06-20 09:54:36 -04:00
mvdbeek 6b7ee55bac Test list collection mapping over multidata input 2018-06-20 09:54:01 -04:00
John Chilton c601a9d491 Fix collection mapping to allow mapping over multi-data inputs.
It is jarring to users that works for collection inputs but not multiple data inputs, especially because the IUC discourages collection inputs when multiple data inputs would work.
2018-06-20 09:53:41 -04:00
Nicola Soranzo 711070dc4c Merge branch 'release_18.01' into release_18.05 2018-06-07 10:28:42 +01:00
mvdbeek 3e22b0b11b Test case for mapping over inputs with output ftype determined via input extension 2018-06-04 07:00:41 -04:00
Nicola Soranzo ec45c970c5 Add test tool for empty optional select
To easily reproduce https://github.com/galaxyproject/galaxy/issues/6219 .
2018-05-25 18:33:51 +01:00
John Chilton 55f7280d79 More password encoding handling fixes.
Fix handling comparison of older hashes in Python 2 and fix the hanlding of both for Python 3.

The previous iteration gave me some errors in Python 3, I brought in and adapted @mvdbeek's Python 3 fixes to fix these:

```
======================================================================
ERROR: test_security_passwords.test_hash_and_check
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/workspace/galaxy-lib/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/john/workspace/galaxy-lib/tests/test_security_passwords.py", line 12, in test_hash_and_check
    simple_pass_hash = passwords.hash_password(simple_pass)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 21, in hash_password
    return hash_password_PBKDF2(password)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 44, in hash_password_PBKDF2
    hashed = pbkdf2_bin(smart_str(password), salt, COST_FACTOR, KEY_LENGTH, getattr(hashlib, HASH_FUNCTION))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 78, in pbkdf2_bin
    rv = u = _pseudorandom(salt + _pack_int(block))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 75, in _pseudorandom
    return [ord(_) for _ in h.digest()]
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 75, in <listcomp>
    return [ord(_) for _ in h.digest()]
TypeError: ord() expected string of length 1, but int found

======================================================================
ERROR: test_security_passwords.test_hash_consistent
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/workspace/galaxy-lib/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/john/workspace/galaxy-lib/tests/test_security_passwords.py", line 38, in test_hash_consistent
    assert passwords.check_password(simple_pass, simple_pass_hash)
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 30, in check_password
    if check_password_PBKDF2(guess, hashed):
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 53, in check_password_PBKDF2
    hashed_guess = pbkdf2_bin(smart_str(guess), salt, int(cost_factor), KEY_LENGTH, getattr(hashlib, hash_function))
  File "/Users/john/workspace/galaxy-lib/galaxy/security/passwords.py", line 78, in pbkdf2_bin
    rv = u = _pseudorandom(salt + _pack_int(block))
TypeError: Can't convert 'bytes' object to str implicitly
```

Added tests that all now pass in Python 3 - including generating some passwords in Python 3 and verifying they pass when checked in Python 2 and vice versa.
2018-05-23 13:01:05 -04:00
Nicola Soranzo 5d6bc5721a Merge branch 'release_18.01' into release_18.05 2018-05-18 10:29:53 +01:00
John Chilton 6cfe5880e1 [18.01] Fix structured_like unqualified references + test.
Update tool XSD to encourage using fully qualified inputs.

Reorganized the existing tests for consistency with other test tools I think.

(Rebased with fixes, including XSD fixes from @nsoranzo.)
2018-05-17 16:50:40 -04:00
Martin Cech fe37996de3 rename the config option to enable_gdpr_beta
to reflect the information that we do not guarantee compliance
2018-05-16 12:38:46 -05:00
Nicola Soranzo b114b1d6ba Merge branch 'release_18.01' into release_18.05 2018-05-16 11:27:16 +01:00
Martin Cech 3a9a46f772 Merge pull request #6069 from erasche/gdpr
[18.05] GDPR Compliance Mode
2018-05-15 20:40:20 -05:00
John Chilton cdbae706e6 Respect auto_decompress in fetch API, synchronize upload APIs. 2018-05-15 07:39:14 -04:00
Nicola Soranzo efb0f02d34 Hide replacement datasets when rerunning a failed dataset in a mapped-over collection 2018-05-14 19:36:18 +01:00
Nicola Soranzo 85e5d7fcd3 Fix required tools to run workflow API tests 2018-05-14 19:28:57 +01:00
Nicola Soranzo effd5f92f2 Lint job_properties test tool 2018-05-14 19:27:20 +01:00
Helena Rasche ff007c4b72 rename main variable 2018-05-14 15:33:05 +02:00
John Chilton 35b96475a1 Missing upload tests.
Lots of upload and datatype behavior changes conflicting in 18.05 - these tests would have helped a lot.
2018-05-11 16:23:35 -04:00
Martin Cech 80e0ffccb2 add mock config to fix unittests; fix lint 2018-05-11 13:36:56 -04:00
John Chilton f52028f400 Fixes at least 4 more bugs related to sniffing of compressed datatypes.
- Incorrect parsing of default auto sniff flag value.
- Not respecting flag value when adding to dict of compressed sniffers.
- Not checking the right value when checking for compressed datatype instances to add to sniff order.
- Not filtering out the sniffers from being automatically added during the default stage of sniffer handling where all types with sniff are added at the end.

This last point is the most complicated. I added a hack with #6091 so that the compressed sniffers would only return True if in validation mode or explicitly enabled. I'm not convinced that approached worked and I'm definitely convinced it was a bad approach.

The better, cleaner approach is to just always let the sniffer return its truth regardless of validation mode or not and instead only add it to the list of sniffers if it should be enabled. This is what I was assuming would happen but I found this method append_to_sniff_order that was adding sniffers back in that I didn't want added.
2018-05-10 18:35:26 -04:00
John Chilton 148d56a9c9 Many more matches_any tests, better categorization of them with comments.
Some of these suggested by @nsoranzo.
2018-05-10 14:17:41 -04:00
Helena Rasche 3cfe8040b6 allow tests to pass 2018-05-10 18:36:59 +02:00
John Chilton 9bc73824a5 [18.05] Fix matches_any() checks for dynamic compressed types.
See huge conversation on #6093.
2018-05-10 09:47:53 -04:00
John Chilton 19d06cb971 Rules - test case and bug fixes for adding cols for regex groups. 2018-05-04 13:39:53 -04:00
Martin Cech 618de018b9 Merge pull request #6029 from jmchilton/release_18.05_broken_tests
[18.05] Docker fixes - release 18.05 edition.
2018-05-02 15:04:12 -04:00
Dannon Baker 808686cd60 Merge branch 'release_18.01' into release_18.05 2018-05-02 09:32:07 -04:00
John Chilton 23762f48a3 Docker fixes - release 18.05 edition.
- Rev to new container with 18.05 dependencies pre-installed.
- Enable caching of Yarn stuffs to enable
- Redo fix for git not working in node container - was mounting /etc/passwd but that wasn't compat. with Mac OS X, setting these environment variables are.
- Rearrange startup script a bit to make it load faster (wait for Selenium right before the tests not before waiting for DB).
- Fix random error in logs related to Selenium trying to read something in /root by passing -H to set the Selenium user's home directory.
2018-05-01 23:47:27 -04:00
John Chilton fad0392166 Disable broken tests. 2018-05-01 10:36:39 -04:00
John Chilton 740c4c9344 ToolBuildOptimize - do not fetch hidden datasets for inclusion.
Only fetch visible datasets into big, cached list of history datasets under consideration. Hidden datasets don't seem to be used by the fetcher or initial value stuff so it seems fine to exclude them. The advantage should be clear for histories with a large number of datasets hidden below a signficantly smaller number collections.
2018-04-27 10:16:21 -04:00
John Chilton 2eea566c10 ToolBuildOptimize - Add SummaryDatasetCollectionMatcher.
Use summary data pulled from the database for collections when possible instead of loading potentially hundreds of thousands of individual datasets.
2018-04-27 10:16:21 -04:00
John Chilton cf2f6d7dcf Fix selenium tests failing because APPLY_RULES appears twice in panel. 2018-04-24 14:17:52 -04:00