commit/galaxy-central: Dave Bouvier: When running the install and test framework, explicitly uninstall any tool dependency that is not in the state Installed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c70a6f517aa9/ Changeset: c70a6f517aa9 User: Dave Bouvier Date: 2013-11-13 20:46:25 Summary: When running the install and test framework, explicitly uninstall any tool dependency that is not in the state Installed. Affected #: 2 files diff -r e6b3faf87f026f03412ff7b1b133fa0872c8be45 -r c70a6f517aa96506b3245db857025f567aac0511 test/install_and_test_tool_shed_repositories/base/test_db_util.py --- a/test/install_and_test_tool_shed_repositories/base/test_db_util.py +++ b/test/install_and_test_tool_shed_repositories/base/test_db_util.py @@ -36,12 +36,17 @@ return role raise AssertionError( "Private role not found for user '%s'" % user.email ) -def get_tool_dependencies_for_installed_repository( repository_id, status=None ): +def get_tool_dependencies_for_installed_repository( repository_id, status=None, exclude_status=None ): if status is not None: return sa_session.query( model.ToolDependency ) \ .filter( and_( model.ToolDependency.table.c.tool_shed_repository_id == repository_id, model.ToolDependency.table.c.status == status ) ) \ .all() + elif exclude_status is not None: + return sa_session.query( model.ToolDependency ) \ + .filter( and_( model.ToolDependency.table.c.tool_shed_repository_id == repository_id, + model.ToolDependency.table.c.status != exclude_status ) ) \ + .all() else: return sa_session.query( model.ToolDependency ) \ .filter( model.ToolDependency.table.c.tool_shed_repository_id == repository_id ) \ diff -r e6b3faf87f026f03412ff7b1b133fa0872c8be45 -r c70a6f517aa96506b3245db857025f567aac0511 test/install_and_test_tool_shed_repositories/base/twilltestcase.py --- a/test/install_and_test_tool_shed_repositories/base/twilltestcase.py +++ b/test/install_and_test_tool_shed_repositories/base/twilltestcase.py @@ -150,10 +150,10 @@ else: strings_displayed.append( 'has been uninstalled' ) self.check_for_strings( strings_displayed, strings_not_displayed=[] ) - # Get all tool dependencies that are in an error state and uninstall them explicitly, so that the next installation attempt + # Get all tool dependencies that are not in an installed state and uninstall them explicitly, so that the next installation attempt # may succeed. - error_state = model.ToolDependency.installation_status.ERROR - tool_dependencies = test_db_util.get_tool_dependencies_for_installed_repository( installed_repository.id, status=error_state ) + installed_state = model.ToolDependency.installation_status.INSTALLED + tool_dependencies = test_db_util.get_tool_dependencies_for_installed_repository( installed_repository.id, exclude_status=installed_state ) if len( tool_dependencies ) > 0: encoded_tool_dependency_ids = [ self.security.encode_id( tool_dependency.id ) for tool_dependency in tool_dependencies ] self.uninstall_tool_dependencies( self.security.encode_id( installed_repository.id ), encoded_tool_dependency_ids ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org