Commit Graph
416 Commits
Author SHA1 Message Date
Nicola Soranzo d2bab13fa9 Merge pull request #1119 from jmchilton/maxseconds
Revise and fix waiting for tool tests.
2015-11-19 10:54:10 +00:00
John Chilton b25b8c3f24 Revise and fix waiting for tool tests.
- maxseconds on test tag stopped being respected at some point, fix that.
- maxseconds on test tag stopped being parsed at some later point, fix that.
- Revise default behavior so it can be overridden with yet another testing environment variable GALAXY_TEST_DEFAULT_WAIT.
- Add test case to ensure there is no future regression of these behaviors.
2015-11-18 11:22:40 +00:00
Martin Cech 43dc7a52e5 add more API tests for data libraries 2015-11-12 12:34:57 -05:00
Martin Cech f2356ef819 extend API interactor to allow http PATCH and DELETE testing 2015-11-12 12:34:56 -05:00
Nate Coraor 433b79de2b Merge branch 'dev' of https://github.com/galaxyproject/galaxy into smash_eggs 2015-10-13 16:54:18 -04:00
guerler ee1136d5bf Fix test cases
Fix lint

Fix lint

Fix test messages

Remove unnecessary variable

Remove unused test helper functions

Fix lint

Fix error message in tests

Fix spaces
2015-10-06 19:12:06 -04:00
John Chilton 684be5f6a5 Functional test to verify RData is not decompressed in upload process. 2015-09-23 13:56:14 +01:00
Nate Coraor f334764627 Egg cleaning in test/ 2015-09-22 10:32:16 -04:00
John Chilton 311100ff9e Bugfix in test error reporting handling code.
The code for showing status of histories in error would fail if there are collections in the history. This fixes that and skips over collections.
2015-09-21 09:22:52 +01:00
John Chilton bd55650f06 Add testing environment variable GALAXY_TEST_LOGGING_CONFIG.
Unifies logging through the testing process. Requires adding a Galaxy option to disable its own attempts to configure a different root logger.
2015-09-16 16:24:53 +01:00
Nicola Soranzo c01cf85d45 Use __file__ when adding paths to sys.path instead of os.getcwd() .
Also insert additional paths in position 1 unless strictly necessary.
2015-09-11 19:05:37 +01:00
Nicola Soranzo 2fccd0c11f Finish flake8 of test/ . 2015-08-26 20:08:09 +01:00
Nicola Soranzo cc9b0bed85 Fix all E712 errors. Standardize sqlalchemy imports. 2015-07-14 20:49:34 +01:00
Nicola Soranzo 9805294f97 Revert "Revert "[WIP] Mega flake8 linting""
This reverts commit 37f1976d38.
2015-07-12 21:25:44 +01:00
Dannon Baker 37f1976d38 Revert "[WIP] Mega flake8 linting" 2015-07-11 13:17:38 -04:00
Bjoern Gruening 09775e058b sqlalchemy linting can be complicated 2015-07-05 18:17:35 +01:00
Nate Coraor 656d9bef50 Merge remote-tracking branch 'upstream/release_15.05' into dev
Conflicts:
	lib/galaxy/version.py
2015-05-14 11:11:46 -04:00
John Chilton 593d38fcf0 Fix a variety of tool shed tests broken with PR #75. 2015-05-11 11:56:26 -04:00
John Chilton bf9a2ab4ea Add env test option for disabling truncation of test diffs. 2015-05-10 17:41:33 -04:00
John Chilton f7ecd1c9d2 Allow testing tool outputs based on MD5 hashes.
This should not be considered the best practice for most text based files, but for binary files we cannot produce diffs anyway so this is probably better than storing the pointless binary blobs in repositories for instance. In particular Dan and I thought this would be useful for testing index files for data managers.

Includes test tool demonstrating this functionality, run test with

    ./run_tests.sh -framework -id md5sum
2015-04-16 14:19:36 -04:00
John Chilton 1f6ee2fa8f Refactor collection test def objects out of galaxy.tools.
Part of ongoing effort to isolate the galaxy.tools.parser and not have it depend on things in galaxy.tools outside that module.
2015-03-25 14:43:53 -04:00
John Chilton 8cb06d7fc2 More informative error message for bam conversion errors.
Hopefully this will help debug this issue (https://trello.com/c/TL0IdLlG) reported by @peterjc.
2015-03-23 09:35:21 -04:00
Dannon Baker f22ef12467 Fix xml.etree relative import error happening in test/asserts/xml.py 2015-02-17 15:18:08 -05:00
John Chilton d8179ae64f Fix incorrect constant pointed out by Nicola.
https://bitbucket.org/galaxy/galaxy-central/pull-request/664/remove-test-data-only-used-by-remaining/diff#comment-5083073.
2015-02-11 13:15:21 -05:00
John Chilton 38679a0d32 Dynamically fetch and cache test-data from git repositories if needed...
... for tool tests. Longer term this functionality should be dropped (i.e. after all the tools are out of Galaxy) and the test-data always lives next to the tool - but for now it decreases the size of the repository ahead of a potential move to github.
2015-02-09 21:43:42 -05:00
John Chilton 7b5e5c6eec Refactor toward supporting multiple test data resolver types. 2015-02-09 21:43:42 -05:00
John Chilton da67d35e60 Allow GALAXY_TEST_FILE_DIR to a comma-separate list. 2015-02-09 21:43:42 -05:00
Dannon Baker dba89dff83 Convert everything from elementtree to stdlib xml module. 2015-01-29 16:10:56 -05:00
John Chilton 44f7317fa5 Allow tools to output collections with static or determinable structure.
By "static" I mean tools such as a FASTQ de-interlacer that would produce a "paired" collection with two datasets everytime. By "determinable" I mean tools that perform N->N operations within the same job - such as a tool that needs to normalize a bunch of datasets all at once and not in separate jobs. (For N->N collection operations that should or can be done in N separate jobs tool authors should just write tools that operate over a dataset and produce a dataset and let the end-user 'map over' that operation.)

There are still large classes of operations where the structure of the output collection cannot be pre-determined - such as splitting files (e.g. bam files by read group) - that are not implemented in this commit.

Model:

The models have been updated to do a more thorough job of tracking collection outputs. Jobs just producing HistoryDatasetCollectionAssociations works fine for simple jobs producing collections - but you don't want to map a list over a tool that produces a pair and produce a bunch of pairs HDCAs and a list:pair HDCA- you just want a bunch of pieces and the one list:pair at that the top.

Workflow:

Workflows containing such operations can be executed - but the workflow editor has not been updated to handle this complexity (and it will require a significant overhaul) so such tools are not available in the workflow editor.

Tool Testing:

This commit also introduces a new tool XML syntax for describing tests on output collections. See files test/functional/tools/collection_creates_list.xml and test/functional/tools/collection_creates_pair.xml for examples.

Tests:

Includes two tools to test this - one that uses explicit pair output names and one that iterates over the structure of input list to produce an output list.

Includes several new tools API tests that test the tools described above via the API and implicit mapping over such tools. Includes two new workflow API tests - one that verifies a simple workflow with output collections works and one that verifies mapping over workflow steps in collections works.
2015-01-15 09:30:00 -05:00
John Chilton 20519095b4 Remove unused load_cookies function in TwillTestCase. 2015-01-14 21:03:12 -05:00
John Chilton 65083bd97b Remove unused method tool_shed_util...
... it has a PEP-8 detected bug (undefined reference) so it would fail even if it was used.
2015-01-14 21:03:12 -05:00
John Chilton 6f115a7d5c PEP-8 fixes for install_and_test scripts. 2015-01-14 21:03:12 -05:00
John Chilton 285896dfe1 Increase consistency between job index and show.
Add tests for new date range and history filtering as well as to ensure only admins get to see external_id and command_line and that users cannot see each other's jobs.

Always allow admins to views all jobs on index (instead of only when user_details is specified) and show. Add user_email and external_id to show (for admins) to bring it inline with index and add command_line to index (for admins) to bring it in line with show.

Show still allow more details including job standard error and output as well as job metrics.
2014-12-18 21:50:15 -05:00
John Chilton ec24396140 Refactoring: Start abstracting XML processing out of Tool and param classes.
Long term this could allow Galaxy to support - multiple tooling formats (Galaxy-like YAML, CWL http://bit.ly/cwltooldesc, etc...). But I think it is also important from a purely design perspective - this is a core logic class integrating different components - they should not also be doing XML parsing.

To verify the interface for parsing tools is expressive enough to allow multiple useful implementations, I built a test YAML tool description that implements many of the same features as Galaxy but smooths out rough edges (uses exit codes for job failure by default for instance). Loading these tools is disabled by default and it is not documented how to enable them because they are not intended to be part of Galaxy's public API.
2014-12-11 00:26:13 -05:00
Daniel Blankenberg 137ade3786 HTML escape user-settable values in Data Libraries. Update tests to reflect that e.g. quotes are now html escaped within pages. Eliminate the unnecessary use of Params() object for these controllers. 2014-12-08 12:27:48 -05:00
John Chilton 887bc44a41 Implement structured tool test data.
Rather than relying solely on exceptions back to nose/test framework - add option (--structured_data_report_file) to run_tests.sh that causes a bunch of detailed data to be dumped to the specified file in a very structured way. Includes full to_dict of the job from the API which in turn includes job metrics, command-line, job's standard error and outputs (instead of the test frameworks), as well as the tool inputs, and exceptions broken out for tool execution versus output checking.

Its all indexed in the file by the test id (without the actual test toolbox depending on knowing the test id) - so one could pair this information with the XUnit output to produce much more detailed breakdowns of the tests.
2014-12-08 00:21:47 -05:00
John Chilton 76b534f438 Slightly improved error message for tool tests if job submission fails. 2014-12-08 00:21:47 -05:00
John Chilton f3cd402d28 Remove unused method now that twill interactor is gone. 2014-12-08 00:21:47 -05:00
John Chilton b7ddf97561 Reduce some duplication related to nose running. 2014-12-08 00:21:47 -05:00
John Chilton 3d779623b7 Twill interactor for tests is broken - so I am deleting.
It wasn't long for this world with a JavaScript tool form anyway - would be nice to implement a casperjs driven interactor though so the UI could be exercised for tests.
2014-12-05 23:35:44 -05:00
John Chilton 02fb0bae3b Break up a couple test methods for reuse downstream.
Remove duplication related to verifying a single dataset in tests - allows reuse in downstream when verifying the content of explicitly defined tool output collections.

Refactor out waiting for jobs - seems wrong place to put that logic this should allow easier moving.
2014-12-01 21:18:56 -05:00
John Chilton 421ee93140 Rearrange verify method to make duplication more obvious. 2014-12-01 21:18:56 -05:00
John Chilton 4cdbd53a5a Rename variable for clarity.
This method does not just return datasets.
2014-12-01 21:18:56 -05:00
John Chilton 8814d94e60 PEP-8 fixes for test.base.asserts.
Some of the first Python code I ever wrote - and one can tell :).
2014-11-25 20:57:56 -05:00
John Chilton 8bdcab103e Remove unused code. 2014-11-19 12:46:56 -05:00
John Chilton c97fd47654 Bug fix for 21e3d69. 2014-11-19 12:42:17 -05:00
John Chilton 08a93fe039 Remove unused code. 2014-11-19 12:42:17 -05:00
Dave Bouvier 4e9850b3d2 Fix getting job streams in functional tests. 2014-10-24 16:23:18 -04:00
Dave Bouvier bb3c895e51 Add optional display of stdout/stderr to the jobs API return value, defaulting to not displayed. Rework the test API interactor to wait for jobs instead of histories and get the stdout and stderr from the API. 2014-10-23 10:34:17 -04:00
John Chilton d36ab8e22a Add ability to disable asynchronous data uploads in tool tests.
Honestly - need to find a way to make this the default if sqlite is the target.
2014-10-14 15:25:55 -04:00