2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/df20658ac499/ changeset: df20658ac499 user: inithello date: 2013-01-07 18:19:00 summary: Fix for encoded repo_info_dict being passed instead of decoded. affected #: 1 file diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r df20658ac4991d970bfd9d63feae73850db84bb7 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -848,8 +848,7 @@ tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ] else: tool_section = None - if isinstance( repo_info_dict, basestring ): - repo_info_dict = encoding_util.tool_shed_decode( repo_info_dict ) + repo_info_dict = encoding_util.tool_shed_decode( repo_info_dict ) # Clone each repository to the configured location. shed_util.update_tool_shed_repository_status( trans.app, tool_shed_repository, trans.model.ToolShedRepository.installation_status.CLONING ) repo_info_tuple = repo_info_dict[ tool_shed_repository.name ] @@ -1419,8 +1418,7 @@ repo_info_dicts = [] repo_info_dict = kwd.get( 'repo_info_dict', None ) if repo_info_dict: - if isinstance( repo_info_dict, basestring ): - repo_info_dict = encoding_util.tool_shed_decode( repo_info_dict ) + repo_info_dict = encoding_util.tool_shed_decode( repo_info_dict ) else: # Entering this else block used to happen only if the tool_shed_repository does not include any valid tools. After repository dependencies # were introduced, it may never happen, but we'll keep the block just in case. @@ -1442,12 +1440,9 @@ repository_metadata=None, metadata=metadata, repository_dependencies=repository_dependencies ) - repo_info_dict = encoding_util.tool_shed_encode( repo_info_dict ) repo_info_dicts.append( repo_info_dict ) # Make sure all tool_shed_repository records exist. if install_repository_dependencies: - # This is a bit screwy because filtered_repo_info_dicts in this block is a list of tool_shed_encoded dictionaries, but - # in the associated else block, it is a list of unencoded dictionaries - not sure if this should be corrected... created_or_updated_tool_shed_repositories, tool_panel_section_keys, repo_info_dicts, filtered_repo_info_dicts, message = \ shed_util.create_repository_dependency_objects( trans, tool_path, https://bitbucket.org/galaxy/galaxy-central/commits/395bfeb484ae/ changeset: 395bfeb484ae user: inithello date: 2013-01-07 18:21:46 summary: Tool shed functional test enhancements - more circular repository dependency tests. affected #: 7 files diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/base/test_db_util.py --- a/test/tool_shed/base/test_db_util.py +++ b/test/tool_shed/base/test_db_util.py @@ -43,6 +43,10 @@ galaxy.model.ToolShedRepository.table.c.owner == owner, galaxy.model.ToolShedRepository.table.c.changeset_revision == changeset_revision ) ) \ .first() +def get_installed_repository_by_id( repository_id ): + return ga_session.query( galaxy.model.ToolShedRepository ) \ + .filter( galaxy.model.ToolShedRepository.table.c.id == repository_id ) \ + .first() def get_installed_repository_by_name_owner( repository_name, owner ): return ga_session.query( galaxy.model.ToolShedRepository ) \ .filter( and_( galaxy.model.ToolShedRepository.table.c.name == repository_name, @@ -53,6 +57,10 @@ if role.name == user.email and role.description == 'Private Role for %s' % user.email: return role raise AssertionError( "Private role not found for user '%s'" % user.email ) +def get_repository_by_id( repository_id ): + return sa_session.query( model.Repository ) \ + .filter( model.Repository.table.c.id == repository_id ) \ + .first() def get_user( email ): return sa_session.query( model.User ) \ .filter( model.User.table.c.email==email ) \ diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -1,14 +1,16 @@ import galaxy.webapps.community.util.hgweb_config import galaxy.model as galaxy_model -import common, string, os, re, test_db_util, simplejson +import common, string, os, re, test_db_util, simplejson, logging, time import galaxy.util as util from base.twilltestcase import tc, from_json_string, TwillTestCase, security, urllib -from galaxy.tool_shed.encoding_util import tool_shed_encode +from galaxy.tool_shed.encoding_util import tool_shed_encode, tool_shed_decode from galaxy import eggs eggs.require('mercurial') from mercurial import hg, ui +log = logging.getLogger( __name__ ) + class ShedTwillTestCase( TwillTestCase ): def setUp( self ): # Security helper @@ -429,7 +431,7 @@ if workflow_name not in strings_displayed: strings_displayed.append( workflow_name ) self.check_for_strings( strings_displayed, strings_not_displayed ) - def initiate_installation_process( self ): + def initiate_installation_process( self, install_tool_dependencies=False, install_repository_dependencies=True ): html = self.last_page() # Since the installation process is by necessity asynchronous, we have to get the parameters to 'manually' initiate the # installation process. This regex will return the tool shed repository IDs in group(1), the encoded_kwd parameter in @@ -438,11 +440,20 @@ install_parameters = re.search( 'initiate_repository_installation\( "([^"]+)", "([^"]+)", "([^"]+)" \);', html ) if install_parameters: iri_ids = install_parameters.group(1) - encoded_kwd = install_parameters.group(2) + # In some cases, the returned iri_ids are of the form: "[u'<encoded id>', u'<encoded id>']" + # This ensures that non-hex characters are stripped out of the list, so that util.listify/decode_id will handle them correctly. + repository_ids = str( iri_ids ) + repository_ids = re.sub( '[^a-fA-F0-9,]+', '', repository_ids ) + decoded_kwd = tool_shed_decode( install_parameters.group(2) ) + if 'install_tool_dependencies' in decoded_kwd: + decoded_kwd[ 'install_tool_dependencies' ] = install_tool_dependencies + if 'install_repository_dependencies' in decoded_kwd: + decoded_kwd[ 'install_repository_dependencies' ] = install_repository_dependencies reinstalling = install_parameters.group(3) url = '/admin_toolshed/manage_repositories?operation=install&tool_shed_repository_ids=%s&encoded_kwd=%s&reinstalling=%s' % \ - ( iri_ids, encoded_kwd, reinstalling ) + ( ','.join( util.listify( repository_ids ) ), tool_shed_encode( decoded_kwd ), reinstalling ) self.visit_galaxy_url( url ) + return util.listify( repository_ids ) def install_repository( self, name, owner, category_name, install_tool_dependencies=False, changeset_revision=None, strings_displayed=[], strings_not_displayed=[], preview_strings_displayed=[], post_submit_strings_displayed=[], **kwd ): @@ -469,8 +480,8 @@ kwd[ 'shed_tool_conf' ] = self.shed_tool_conf self.submit_form( 1, 'select_tool_panel_section_button', **kwd ) self.check_for_strings( post_submit_strings_displayed, strings_not_displayed ) - self.initiate_installation_process() - self.wait_for_repository_installation( repository, changeset_revision ) + repository_ids = self.initiate_installation_process( install_tool_dependencies ) + self.wait_for_repository_installation( repository_ids ) def load_invalid_tool_page( self, repository, tool_xml, changeset_revision, strings_displayed=[], strings_not_displayed=[] ): url = '/repository/load_invalid_tool?repository_id=%s&tool_config=%s&changeset_revision=%s' % \ ( self.security.encode_id( repository.id ), tool_xml, changeset_revision ) @@ -510,12 +521,17 @@ self.visit_galaxy_url( url ) strings_displayed = [ installed_repository.name, 'repository has been activated' ] self.check_for_strings( strings_displayed, [] ) - def reinstall_repository( self, installed_repository ): - url = '/admin_toolshed/reinstall_repository?id=%s' % self.security.encode_id( installed_repository.id ) + def reinstall_repository( self, + installed_repository, + install_repository_dependencies='true', + install_tool_dependencies='false' ): + url = '/admin_toolshed/reselect_tool_panel_section?id=%s' % self.security.encode_id( installed_repository.id ) self.visit_galaxy_url( url ) - self.initiate_installation_process() - tool_shed_repository = test_db_util.get_repository_by_name_and_owner( installed_repository.name, installed_repository.owner ) - self.wait_for_repository_installation( tool_shed_repository, installed_repository.installed_changeset_revision ) + url = '/admin_toolshed/reinstall_repository?id=%s&install_repository_dependencies=%s&install_repository_dependencies=%s' % \ + ( self.security.encode_id( installed_repository.id ), install_repository_dependencies, install_repository_dependencies ) + self.visit_galaxy_url( url ) + repository_ids = self.initiate_installation_process( install_tool_dependencies, install_repository_dependencies ) + self.wait_for_repository_installation( repository_ids ) def repository_is_new( self, repository ): repo = hg.repository( ui.ui(), self.get_repo_path( repository ) ) tip_ctx = repo.changectx( repo.changelog.tip() ) @@ -636,22 +652,18 @@ def visit_galaxy_url( self, url ): url = '%s%s' % ( self.galaxy_url, url ) self.visit_url( url ) - def wait_for_repository_installation( self, repository, changeset_revision ): + def wait_for_repository_installation( self, repository_ids ): final_states = [ galaxy_model.ToolShedRepository.installation_status.ERROR, - galaxy_model.ToolShedRepository.installation_status.INSTALLED, - galaxy_model.ToolShedRepository.installation_status.UNINSTALLED, - galaxy_model.ToolShedRepository.installation_status.DEACTIVATED ] - repository_name = repository.name - owner = repository.user.username - if changeset_revision is None: - changeset_revision = self.get_repository_tip( repository ) - galaxy_repository = test_db_util.get_galaxy_repository_by_name_owner_changeset_revision( repository_name, owner, changeset_revision ) - timeout_counter = 0 - while galaxy_repository.status not in final_states: - ga_refresh( galaxy_repository ) - timeout_counter = timeout_counter + 1 - if timeout_counter > common.repository_installation_timeout: - raise AssertionError( 'Repository installation timed out, %d seconds elapsed, repository state is %s.' % \ - ( timeout_counter, repository.status ) ) - break - time.sleep( 1 ) + galaxy_model.ToolShedRepository.installation_status.INSTALLED ] + if repository_ids: + for repository_id in repository_ids: + galaxy_repository = test_db_util.get_installed_repository_by_id( self.security.decode_id( repository_id ) ) + timeout_counter = 0 + while galaxy_repository.status not in final_states: + test_db_util.ga_refresh( galaxy_repository ) + timeout_counter = timeout_counter + 1 + if timeout_counter > common.repository_installation_timeout: + raise AssertionError( 'Repository installation timed out, %d seconds elapsed, repository state is %s.' % \ + ( timeout_counter, repository.status ) ) + break + time.sleep( 1 ) diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/functional/test_0040_repository_circular_dependencies.py --- a/test/tool_shed/functional/test_0040_repository_circular_dependencies.py +++ b/test/tool_shed/functional/test_0040_repository_circular_dependencies.py @@ -2,8 +2,8 @@ import tool_shed.base.test_db_util as test_db_util freebayes_repository_name = 'freebayes_0040' -freebayes_repository_name_description = "Galaxy's freebayes tool" -freebayes_repository_name_long_description = "Long description of Galaxy's freebayes tool" +freebayes_repository_description = "Galaxy's freebayes tool" +freebayes_repository_long_description = "Long description of Galaxy's freebayes tool" filtering_repository_name = 'filtering_0040' filtering_repository_description = "Galaxy's filtering tool" @@ -31,8 +31,8 @@ self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) repository = self.get_or_create_repository( name=freebayes_repository_name, - description=freebayes_repository_name_description, - long_description=freebayes_repository_name_long_description, + description=freebayes_repository_description, + long_description=freebayes_repository_long_description, owner=common.test_user_1_name, categories=[ 'test_0040_repository_circular_dependencies' ], strings_displayed=[] ) diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/functional/test_0080_advanced_circular_dependencies.py --- /dev/null +++ b/test/tool_shed/functional/test_0080_advanced_circular_dependencies.py @@ -0,0 +1,89 @@ +from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os +import tool_shed.base.test_db_util as test_db_util + +column_repository_name = 'column_maker_0080' +column_repository_description = "Add column" +column_repository_long_description = "Compute an expression on every row" + +convert_repository_name = 'convert_chars_0080' +convert_repository_description = "Convert delimiters" +convert_repository_long_description = "Convert delimiters to tab" + +category_name = 'Test 0080 Advanced Circular Dependencies' +category_description = 'Test circular dependency features' + +class TestRepositoryCircularDependencies( ShedTwillTestCase ): + '''Verify that the code correctly handles circular dependencies.''' + def test_0000_initiate_users( self ): + """Create necessary user accounts.""" + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + test_user_1 = test_db_util.get_user( common.test_user_1_email ) + assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % test_user_1_email + test_user_1_private_role = test_db_util.get_private_role( test_user_1 ) + self.logout() + self.login( email=common.admin_email, username=common.admin_username ) + admin_user = test_db_util.get_user( common.admin_email ) + assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email + admin_user_private_role = test_db_util.get_private_role( admin_user ) + def test_0005_initiate_category_repositories( self ): + """Create a category for this test suite and add repositories to it.""" + category = self.create_category( name=category_name, description=category_description ) + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + repository = self.get_or_create_repository( name=column_repository_name, + description=column_repository_description, + long_description=column_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + self.upload_file( repository, + 'column_maker/column_maker.tar', + strings_displayed=[], + commit_message='Uploaded column_maker.tar.' ) + repository = self.get_or_create_repository( name=convert_repository_name, + description=convert_repository_description, + long_description=convert_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + self.upload_file( repository, + 'convert_chars/convert_chars.tar', + strings_displayed=[], + commit_message='Uploaded convert_chars.tar.' ) + def test_0020_create_repository_dependencies( self ): + '''Upload a repository_dependencies.xml file that specifies the current revision of freebayes to the filtering_0040 repository.''' + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + repository_dependencies_path = self.generate_temp_path( 'test_0080', additional_paths=[ 'convert' ] ) + self.generate_repository_dependency_xml( [ convert_repository ], + self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), + dependency_description='Column maker depends on the convert repository.' ) + self.upload_file( column_repository, + 'repository_dependencies.xml', + filepath=repository_dependencies_path, + commit_message='Uploaded dependency on convert' ) + def test_0025_create_dependency_on_filtering( self ): + '''Upload a repository_dependencies.xml file that specifies the current revision of filtering to the freebayes_0040 repository.''' + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + repository_dependencies_path = self.generate_temp_path( 'test_0080', additional_paths=[ 'convert' ] ) + self.generate_repository_dependency_xml( [ column_repository ], + self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), + dependency_description='Convert chars depends on the column_maker repository.' ) + self.upload_file( convert_repository, + 'repository_dependencies.xml', + filepath=repository_dependencies_path, + commit_message='Uploaded dependency on column' ) + def test_0030_verify_repository_dependencies( self ): + '''Verify that each repository can depend on the other without causing an infinite loop.''' + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + self.check_repository_dependency( convert_repository, column_repository, self.get_repository_tip( column_repository ) ) + self.check_repository_dependency( column_repository, convert_repository, self.get_repository_tip( convert_repository ) ) + def test_0035_verify_repository_metadata( self ): + '''Verify that resetting the metadata does not change it.''' + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + for repository in [ column_repository, convert_repository ]: + self.verify_unchanged_repository_metadata( repository ) diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/functional/test_1080_advanced_circular_dependency_installation.py --- /dev/null +++ b/test/tool_shed/functional/test_1080_advanced_circular_dependency_installation.py @@ -0,0 +1,314 @@ +from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os +import tool_shed.base.test_db_util as test_db_util + +column_repository_name = 'column_maker_0080' +column_repository_description = "Add column" +column_repository_long_description = "Compute an expression on every row" + +convert_repository_name = 'convert_chars_0080' +convert_repository_description = "Convert delimiters" +convert_repository_long_description = "Convert delimiters to tab" + +category_name = 'Test 0080 Advanced Circular Dependencies' +category_description = 'Test circular dependency features' + +class TestRepositoryDependencies( ShedTwillTestCase ): + '''Testing freebayes with tool data table entries, .loc files, and tool dependencies.''' + def test_0000_create_or_login_admin_user( self ): + """Create necessary user accounts and login as an admin user.""" + self.galaxy_logout() + self.galaxy_login( email=common.admin_email, username=common.admin_username ) + galaxy_admin_user = test_db_util.get_galaxy_user( common.admin_email ) + assert galaxy_admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email + galaxy_admin_user_private_role = test_db_util.get_galaxy_private_role( galaxy_admin_user ) + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + test_user_1 = test_db_util.get_user( common.test_user_1_email ) + assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % test_user_1_email + test_user_1_private_role = test_db_util.get_private_role( test_user_1 ) + self.logout() + self.login( email=common.admin_email, username=common.admin_username ) + admin_user = test_db_util.get_user( common.admin_email ) + assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email + admin_user_private_role = test_db_util.get_private_role( admin_user ) + def test_0005_initiate_test_data( self ): + """Create a category for this test suite and add repositories to it.""" + category = self.create_category( name=category_name, description=category_description ) + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + repository = self.get_or_create_repository( name=column_repository_name, + description=column_repository_description, + long_description=column_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + if self.repository_is_new( repository ): + self.upload_file( repository, + 'column_maker/column_maker.tar', + strings_displayed=[], + commit_message='Uploaded column_maker.tar.' ) + repository = self.get_or_create_repository( name=convert_repository_name, + description=convert_repository_description, + long_description=convert_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + self.upload_file( repository, + 'convert_chars/convert_chars.tar', + strings_displayed=[], + commit_message='Uploaded convert_chars.tar.' ) + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + repository_dependencies_path = self.generate_temp_path( 'test_1080', additional_paths=[ 'convert' ] ) + self.generate_repository_dependency_xml( [ convert_repository ], + self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), + dependency_description='Column maker depends on the convert repository.' ) + self.upload_file( column_repository, + 'repository_dependencies.xml', + filepath=repository_dependencies_path, + commit_message='Uploaded dependency on convert' ) + convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name ) + repository_dependencies_path = self.generate_temp_path( 'test_1080', additional_paths=[ 'convert' ] ) + self.generate_repository_dependency_xml( [ column_repository ], + self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), + dependency_description='Convert chars depends on the column_maker repository.' ) + self.upload_file( convert_repository, + 'repository_dependencies.xml', + filepath=repository_dependencies_path, + commit_message='Uploaded dependency on column' ) + def test_0010_install_repositories( self ): + '''Install convert_chars with repository dependencies check box - this should install both convert_chars and column_maker.''' + self.galaxy_logout() + self.galaxy_login( email=common.admin_email, username=common.admin_username ) + self.install_repository( convert_repository_name, + common.test_user_1_name, + category_name, + install_tool_dependencies=False, + install_repository_dependencies='Yes', + new_tool_panel_section='test_1080' ) + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + browse_strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision ] + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Installed' ] + self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed ) + strings_displayed.append( 'Installed repository dependencies' ) + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0015_deactivate_convert_repository( self ): + '''Deactivate convert_chars - this should display column_maker as installed but missing repository dependencies''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_convert_repository, remove_from_disk=False ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Deactivated' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + def test_0020_reactivate_convert_repository( self ): + '''Activate convert_chars - this should display both convert_chars and column_maker as installed with a green box''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.reactivate_repository( installed_convert_repository ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + def test_0025_deactivate_column_repository( self ): + '''Deactivate column_maker - this should display convert_chars installed but missing repository dependencies''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_column_repository, remove_from_disk=False ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Deactivated' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0030_deactivate_convert_repository( self ): + '''Deactivate convert_chars - both convert_chars and column_maker are deactivated''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_convert_repository, remove_from_disk=False ) + strings_not_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.installed_changeset_revision ] + self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) + def test_0035_reactivate_column_repository( self ): + '''Activate column_maker - this should not automatically activate convert_chars, so column_maker should be displayed as installed but missing repository dependencies''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.reactivate_repository( installed_column_repository ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Deactivated' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + def test_0040_reactivate_convert_repository( self ): + '''Activate convert_chars - this should display both convert_chars and column_maker as installed with a green box''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.reactivate_repository( installed_convert_repository ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0045_uninstall_column_repository( self ): + '''Uninstall column_maker - this should display convert_chars installed but missing repository dependencies''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_column_repository, remove_from_disk=True ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Uninstalled' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0050_reinstall_column_repository( self ): + '''Reinstall column_maker without repository dependencies, verify both convert_chars and column_maker are installed.''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.reinstall_repository( installed_column_repository, install_repository_dependencies=False ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0055_uninstall_convert_repository( self ): + '''Uninstall convert_chars, verify column_maker installed but missing repository dependencies''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_convert_repository, remove_from_disk=True ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Uninstalled' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + def test_0060_uninstall_column_repository( self ): + '''Uninstall column_maker - both convert_chars and column_maker are uninstalled''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.uninstall_repository( installed_column_repository, remove_from_disk=True ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Missing repository dependencies', + 'Activate or reinstall repository', + 'Uninstalled' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) + def test_0065_reinstall_convert_repository( self ): + '''Reinstall convert_chars and check the handle repository dependencies check box - this should install both convert_chars and column_maker ( make sure )''' + installed_convert_repository = test_db_util.get_installed_repository_by_name_owner( convert_repository_name, + common.test_user_1_name ) + installed_column_repository = test_db_util.get_installed_repository_by_name_owner( column_repository_name, + common.test_user_1_name ) + self.reinstall_repository( installed_convert_repository, install_repository_dependencies=True ) + strings_displayed = [ installed_column_repository.name, + installed_column_repository.description, + installed_column_repository.tool_shed, + installed_column_repository.installed_changeset_revision, + installed_convert_repository.name, + installed_convert_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_column_repository, + strings_displayed=strings_displayed ) + strings_displayed = [ installed_convert_repository.name, + installed_convert_repository.description, + installed_convert_repository.tool_shed, + installed_convert_repository.installed_changeset_revision, + installed_column_repository.name, + installed_column_repository.installed_changeset_revision, + 'Installed repository dependencies' ] + self.display_installed_repository_manage_page( installed_convert_repository, + strings_displayed=strings_displayed ) diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/test_data/column_maker/column_maker.tar Binary file test/tool_shed/test_data/column_maker/column_maker.tar has changed diff -r df20658ac4991d970bfd9d63feae73850db84bb7 -r 395bfeb484ae0f69bdd7be2115ed007b4c01dd90 test/tool_shed/test_data/convert_chars/convert_chars.tar Binary file test/tool_shed/test_data/convert_chars/convert_chars.tar has changed 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.