def test_0025_uninstall_column_repository( self ):
     '''uninstall column_maker, verify same section'''
     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 )
     test_db_util.ga_refresh( installed_column_repository )
     self.check_galaxy_repository_tool_panel_section( installed_column_repository, 'column_maker' )
 def test_0070_uninstall_emboss_repository(self):
     '''Uninstall the emboss_5 repository.'''
     repository = test_db_util.get_installed_repository_by_name_owner(
         emboss_repository_name, common.test_user_1_name)
     self.uninstall_repository(repository, remove_from_disk=True)
     strings_not_displayed = [
         repository.name, repository.installed_changeset_revision
     ]
     self.display_galaxy_browse_repositories_page(
         strings_not_displayed=strings_not_displayed)
     test_db_util.ga_refresh(repository)
     self.check_galaxy_repository_tool_panel_section(
         repository, 'emboss_5_0050')
     # Now we have bismark, column_maker, and convert_chars installed, filtering and freebayes never installed, emboss_datatypes deactivated,
     # and emboss uninstalled.
     installed_repositories = [
         (column_repository_name, common.test_user_1_name),
         (convert_repository_name, common.test_user_1_name),
         (bismark_repository_name, common.test_user_1_name)
     ]
     uninstalled_repositories = [
         (emboss_datatypes_repository_name, common.test_user_1_name),
         (emboss_repository_name, common.test_user_1_name),
         (filtering_repository_name, common.test_user_1_name),
         (freebayes_repository_name, common.test_user_1_name)
     ]
     self.verify_installed_uninstalled_repositories(
         installed_repositories=installed_repositories,
         uninstalled_repositories=uninstalled_repositories)
Beispiel #3
0
 def test_0030_uninstall_convert_repository(self):
     installed_convert_repository = test_db_util.get_installed_repository_by_name_owner(
         convert_repository_name, common.test_user_1_name)
     self.uninstall_repository(installed_convert_repository,
                               remove_from_disk=True)
     test_db_util.ga_refresh(installed_convert_repository)
     self.check_galaxy_repository_tool_panel_section(
         installed_convert_repository, 'column_maker')
Beispiel #4
0
 def test_0045_uninstall_freebayes_repository( self ):
     '''Uninstall freebayes, verify tool panel section and missing repository dependency.'''
     installed_freebayes_repository = test_db_util.get_installed_repository_by_name_owner( freebayes_repository_name, common.test_user_1_name )
     installed_filtering_repository = test_db_util.get_installed_repository_by_name_owner( filtering_repository_name, common.test_user_1_name )
     self.uninstall_repository( installed_freebayes_repository, remove_from_disk=True )
     test_db_util.ga_refresh( installed_freebayes_repository )
     self.check_galaxy_repository_tool_panel_section( installed_freebayes_repository, 'freebayes' )
     strings_displayed = [ 'Missing repository', 'freebayes', 'filtering_0040', 'user1', "Galaxy's filtering tool for test 0040" ]
     self.display_installed_repository_manage_page( installed_filtering_repository, strings_displayed=strings_displayed )
     self.check_galaxy_repository_db_status( 'freebayes_0040', 
                                             'user1', 
                                             'Uninstalled' )
 def test_0040_uninstall_filtering_repository( self ):
     '''Uninstall filtering, verify tool panel section.'''
     installed_filtering_repository = test_db_util.get_installed_repository_by_name_owner( filtering_repository_name, common.test_user_1_name )
     installed_freebayes_repository = test_db_util.get_installed_repository_by_name_owner( freebayes_repository_name, common.test_user_1_name )
     self.uninstall_repository( installed_filtering_repository, remove_from_disk=True )
     test_db_util.ga_refresh( installed_filtering_repository )
     self.check_galaxy_repository_tool_panel_section( installed_filtering_repository, '' )
     strings_displayed = [ 'Missing repository', 'filtering' ]
     self.display_installed_repository_manage_page( installed_freebayes_repository, strings_displayed=strings_displayed )
     self.check_galaxy_repository_db_status( filtering_repository_name, 
                                             common.test_user_1_name, 
                                             'Uninstalled' )
 def test_0045_uninstall_and_verify_tool_panel_sections( self ):
     '''uninstall both and verify tool panel sections'''
     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 )
     self.uninstall_repository( installed_convert_repository, remove_from_disk=True )
     test_db_util.ga_refresh( installed_convert_repository )
     test_db_util.ga_refresh( installed_column_repository )
     self.check_galaxy_repository_tool_panel_section( installed_column_repository, 'new_column_maker' )
     self.check_galaxy_repository_tool_panel_section( installed_convert_repository, 'new_convert_chars' )
 def test_0085_uninstall_all_repositories( self ):
     '''Uninstall convert_chars and column_maker to verify that they are in the right tool panel sections.'''
     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 )
     self.uninstall_repository( installed_convert_repository, remove_from_disk=True )
     test_db_util.ga_refresh( installed_column_repository )
     test_db_util.ga_refresh( installed_convert_repository )
     self.check_galaxy_repository_tool_panel_section( installed_column_repository, 'convert_maker' )
     self.check_galaxy_repository_tool_panel_section( installed_convert_repository, 'convert_maker' )
 def test_0015_reset_metadata_on_all_repositories(self):
     """Reset metadata on all repositories, then verify that it has not changed."""
     repository_metadata = dict()
     repositories = test_db_util.get_all_installed_repositories(actually_installed=True)
     for repository in repositories:
         repository_metadata[self.security.encode_id(repository.id)] = repository.metadata
     self.reset_metadata_on_selected_installed_repositories(repository_metadata.keys())
     for repository in repositories:
         test_db_util.ga_refresh(repository)
         old_metadata = repository_metadata[self.security.encode_id(repository.id)]
         assert repository.metadata == old_metadata, (
             "Metadata for installed repository %s changed after reset." % repository.name
         )
Beispiel #9
0
 def test_0015_reset_metadata_on_all_repositories(self):
     '''Reset metadata on all repositories, then verify that it has not changed.'''
     repository_metadata = dict()
     repositories = test_db_util.get_all_installed_repositories(
         actually_installed=True)
     for repository in repositories:
         repository_metadata[self.security.encode_id(
             repository.id)] = repository.metadata
     self.reset_metadata_on_selected_installed_repositories(
         repository_metadata.keys())
     for repository in repositories:
         test_db_util.ga_refresh(repository)
         old_metadata = repository_metadata[self.security.encode_id(
             repository.id)]
         assert repository.metadata == old_metadata, 'Metadata for installed repository %s changed after reset.' % repository.name
 def test_0085_uninstall_all_repositories(self):
     '''Uninstall convert_chars and column_maker to verify that they are in the right tool panel sections.'''
     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)
     self.uninstall_repository(installed_convert_repository,
                               remove_from_disk=True)
     test_db_util.ga_refresh(installed_column_repository)
     test_db_util.ga_refresh(installed_convert_repository)
     self.check_galaxy_repository_tool_panel_section(
         installed_column_repository, 'convert_maker')
     self.check_galaxy_repository_tool_panel_section(
         installed_convert_repository, 'convert_maker')
Beispiel #11
0
 def test_0045_uninstall_and_verify_tool_panel_sections(self):
     '''uninstall both and verify tool panel sections'''
     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)
     self.uninstall_repository(installed_convert_repository,
                               remove_from_disk=True)
     test_db_util.ga_refresh(installed_convert_repository)
     test_db_util.ga_refresh(installed_column_repository)
     self.check_galaxy_repository_tool_panel_section(
         installed_column_repository, 'new_column_maker')
     self.check_galaxy_repository_tool_panel_section(
         installed_convert_repository, 'new_convert_chars')
 def test_0070_uninstall_emboss_repository( self ):
     '''Uninstall the emboss_5 repository.'''
     repository = test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name )
     self.uninstall_repository( repository, remove_from_disk=True )
     strings_not_displayed = [ repository.name, repository.installed_changeset_revision ]
     self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed )
     test_db_util.ga_refresh( repository )
     self.check_galaxy_repository_tool_panel_section( repository, 'emboss_5_0050' )
     # Now we have bismark, column_maker, and convert_chars installed, filtering and freebayes never installed, emboss_datatypes deactivated,
     # and emboss uninstalled.
     installed_repositories = [ ( column_repository_name, common.test_user_1_name ), 
                                ( convert_repository_name, common.test_user_1_name ), 
                                ( bismark_repository_name, common.test_user_1_name ) ]
     strings_displayed = [ 'column_maker_0050', 'convert_chars_0050', 'bismark_0050' ]
     strings_not_displayed = [ 'emboss_0050', 'emboss_datatypes_0050', 'filtering_0050', 'freebayes_0050' ]
     self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed )
     self.verify_installed_repositories( installed_repositories )
Beispiel #13
0
 def test_0040_uninstall_filtering_repository(self):
     '''Uninstall filtering, verify tool panel section.'''
     installed_filtering_repository = test_db_util.get_installed_repository_by_name_owner(
         filtering_repository_name, common.test_user_1_name)
     installed_freebayes_repository = test_db_util.get_installed_repository_by_name_owner(
         freebayes_repository_name, common.test_user_1_name)
     self.uninstall_repository(installed_filtering_repository,
                               remove_from_disk=True)
     test_db_util.ga_refresh(installed_filtering_repository)
     self.check_galaxy_repository_tool_panel_section(
         installed_filtering_repository, '')
     strings_displayed = ['Missing repository', 'filtering']
     self.display_installed_repository_manage_page(
         installed_freebayes_repository,
         strings_displayed=strings_displayed)
     self.check_galaxy_repository_db_status(filtering_repository_name,
                                            common.test_user_1_name,
                                            'Uninstalled')
Beispiel #14
0
 def test_0035_verify_tool_panel_section( self ):
     '''Check the tool panel section after repairing.'''
     '''
     This is step 4 - Make sure the filter_1430 repository is reinstalled and the tool is loaded into the tool panel
     in the same section specified in step 1.
     '''
     filter_repository = test_db_util.get_installed_repository_by_name_owner( 'filter_1430', common.test_user_1_name )
     strings_displayed = [ 'filter_1430',
                           "Galaxy's filter tool for test 1430",
                           filter_repository.installed_changeset_revision ]
     self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
     # Uninstall the filter repository again, so that the tool panel section metadata gets populated.
     self.uninstall_repository( filter_repository, remove_from_disk=True )
     test_db_util.ga_refresh( filter_repository )
     tool_panel_section_metadata = filter_repository.metadata[ 'tool_panel_section' ]
     for tool_id in tool_panel_section_metadata:
         for panel_section in tool_panel_section_metadata[ tool_id ]:
             assert panel_section[ 'name' ] == 'repair', 'Tool %s in tool panel section %s after repair, expected %s.' % \
                 ( tool_id, panel_section[ 'name' ], 'repair' )
 def test_0015_reset_metadata_on_all_repositories(self):
     """Reset metadata on all repositories, then verify that it has not changed."""
     repository_metadata = dict()
     repositories = test_db_util.get_all_installed_repositories(actually_installed=True)
     for repository in repositories:
         repository_metadata[self.security.encode_id(repository.id)] = repository.metadata
     self.reset_metadata_on_selected_installed_repositories(repository_metadata.keys())
     for repository in repositories:
         test_db_util.ga_refresh(repository)
         old_metadata = repository_metadata[self.security.encode_id(repository.id)]
         # When a repository with tools to be displayed in a tool panel section is deactivated and reinstalled,
         # the tool panel section remains in the repository metadata. However, when the repository's metadata
         # is subsequently reset, the tool panel section is removed from the repository metadata. While this
         # is normal and expected behavior, the functional tests assume that repository metadata will not change
         # in any way after a reset. A workaround is to remove the tool panel section from the stored repository
         # metadata dict, in order to eliminate the misleading detection of changed metadata.
         if "tool_panel_section" in old_metadata and "tool_panel_section" not in repository.metadata:
             del old_metadata["tool_panel_section"]
         assert repository.metadata == old_metadata, (
             "Metadata for %s repository %s changed after reset. \nOld: %s\nNew: %s"
             % (repository.status, repository.name, old_metadata, repository.metadata)
         )
Beispiel #16
0
 def test_0015_reset_metadata_on_all_repositories(self):
     '''Reset metadata on all repositories, then verify that it has not changed.'''
     repository_metadata = dict()
     repositories = test_db_util.get_all_installed_repositories(
         actually_installed=True)
     for repository in repositories:
         repository_metadata[self.security.encode_id(
             repository.id)] = repository.metadata
     self.reset_metadata_on_selected_installed_repositories(
         repository_metadata.keys())
     for repository in repositories:
         test_db_util.ga_refresh(repository)
         old_metadata = repository_metadata[self.security.encode_id(
             repository.id)]
         # When a repository with tools to be displayed in a tool panel section is deactivated and reinstalled,
         # the tool panel section remains in the repository metadata. However, when the repository's metadata
         # is subsequently reset, the tool panel section is removed from the repository metadata. While this
         # is normal and expected behavior, the functional tests assume that repository metadata will not change
         # in any way after a reset. A workaround is to remove the tool panel section from the stored repository
         # metadata dict, in order to eliminate the misleading detection of changed metadata.
         if 'tool_panel_section' in old_metadata and 'tool_panel_section' not in repository.metadata:
             del old_metadata['tool_panel_section']
         assert repository.metadata == old_metadata, 'Metadata for %s repository %s changed after reset. \nOld: %s\nNew: %s' % \
             ( repository.status, repository.name, old_metadata, repository.metadata )