Commit Graph
3390 Commits
Author SHA1 Message Date
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
John Chilton 8af243c176 Allow rule based operations on existing collections.
Allow the rules DSL & GUI component to operate on existing collections to allow filtering, sorting, modifying identifiers and general re-organization of existing collections (e.g. the outputs of tools). Implementing this as a collection operation tool so that it should be executable interactively in the tool form and in a batch fashion as part of workflow executions.

For this to be tracked properly as a tool execution and to work properly in the tool form, I've implemented a new tool framework and tool form parameter type called "rules".

This can thought of as a more GUI friendly alternative to my proposed collection operations that consumed JavaScript expressions.

This includes API tests for both tool and workflow execution of the new tool as well as Selenium tests for tool form execution, workflow editor interactions, and workflow running.
2018-04-24 11:10:43 -04:00
Martin Cech 13661adcad Merge pull request #5909 from jmchilton/rule_builder_styling
Rule builder styling fixes.
2018-04-20 10:40:05 -04:00
John Chilton fce2dd3ae8 Eliminate compressed datatype boiler plate.
Just annotate auto_compressed_types="gz|bz2|gz,bz2" in datatypes_conf.xml and get for free:

- The compressed datatype with correct extension, no need to have a class definition.
- Converters from the compressed datatype to the uncompressed datatype.
- A sniffer in the correct order.

Additionally, the hacky way we were controlling whether types would be sniffed or not has been improved. This can now be set in the datatypes_conf.xml file or read from a global Galaxy configuration option for options that haven't been explicitly set on a per-datatype basis in the configuration (sniff_compressed_dynamic_datatypes_default).

This should simplify all future datatypes moving in this direction and introduces the possibility of also just loading them in dynamically as needed based on what the tools in the tool panel annotate for inputs and outputs. See a tool with an input of type "genbank.gz" should be enough to trigger this someday I hope.
2018-04-19 14:10:33 -04:00
John Chilton 20c8260108 Redo footer inputs for rule builder.
Gives more space for name and genome - dynamically resizes to space given with some reasonable minimum and maximum widths for widgets.
2018-04-18 19:24:06 -04:00
John Chilton fe4bff1fb9 Merge pull request #5804 from guerler/workflow_import
Use vue and api to handle workflow imports
2018-04-18 15:53:16 -04:00
Dannon 60b5a9a52a Merge pull request #5886 from jmchilton/selenium_workflow_run
More, better workflow run Selenium tests.
2018-04-17 23:03:01 -04:00
Martin Cech 5d82c1a09f Merge pull request #5807 from dannon/bs4
Bootstrap 4 !!!!
2018-04-17 15:21:05 -04:00
Dannon 2ad87ac71b Merge pull request #5896 from jmchilton/selenium_fixes_42
Fix for Selenium workflow editor test not fully updating annotation.
2018-04-17 09:08:31 -04:00
John Chilton 43cd9335f1 Fix for Selenium workflow editor test not fully updating annotation.
Sometimes the last character of the annotation is missing - gotta wait for the last update of form listener I suppose.
2018-04-17 07:32:36 -04:00
Nicola Soranzo 1ff16ddfc4 Exclude only test_grt_export integration test
which takes 35' by itself.
2018-04-16 14:18:46 -04:00
John Chilton 19e05677fa Skip new script tests in dev branch, they are breaking integration suite. 2018-04-16 12:31:13 -04:00
Nicola Soranzo 6ea22bfe18 Exclude only test_grt_export integration test
which takes 35' by itself.
2018-04-16 17:25:49 +01:00
Dannon Baker 4ea51e9fc4 Merge remote-tracking branch 'upstream/dev' into bs4 2018-04-16 09:01:14 -04:00
Dannon a1d76681f6 Merge pull request #5888 from jmchilton/mocha_tests
Mocha/Chai test framework + Rules DSL specification w/tests.
2018-04-16 08:50:32 -04:00
John Chilton aafd9de76b Add more complicated workflow run test case.
Re-use test_data specification used by many of the API workflow tests and a workflow used by another test. Add abstractions and DOM element for mapping labeled test data to tool form inputs.
2018-04-13 13:23:22 -04:00
John Chilton 8f529d177a Improve a few workflow run API test cases.
Use the more abstract test_data specification that will translate to GUI testing.
2018-04-13 13:21:57 -04:00
John Chilton 54721122e7 Small fixes, enhancements for workflow run Selenium tests. 2018-04-13 13:21:57 -04:00
John Chilton b24a1b723d Small fix for workflow editor Selenium testing. 2018-04-13 13:21:57 -04:00
John Chilton 0ab89c9c7c Implement specification for rules DSL, useful for testing both Python and JS. 2018-04-13 12:21:27 -04:00
John Chilton b0d867efa3 Merge pull request #5821 from guerler/exact_version_handling
Avoid silent tool upgrades during workflow imports
2018-04-13 12:06:23 -04:00
Martin Cech eb67d422ef Merge pull request #5823 from jmchilton/rule_tweaks
Various Improvements for the Rule Builder Widget
2018-04-13 11:35:23 -04:00
Dannon Baker 54a2bea27c Fix tool describing tour test selectors. 2018-04-13 10:27:27 -04:00