1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/110a0aabd293/ Changeset: 110a0aabd293 User: inithello Date: 2014-01-09 14:49:22 Summary: Use separate methods to deactivate and uninstall repositories. Affected #: 18 files diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -383,7 +383,17 @@ except: pass return previously_created, username_taken, invalid_username - + + def deactivate_repository( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ): + url = '/admin_toolshed/deactivate_or_uninstall_repository?id=%s' % self.security.encode_id( installed_repository.id ) + self.visit_galaxy_url( url ) + self.check_for_strings( strings_displayed, strings_not_displayed ) + form = tc.browser.get_form( 'deactivate_or_uninstall_repository' ) + kwd = self.set_form_value( form, {}, 'remove_from_disk', False ) + tc.submit( 'deactivate_or_uninstall_repository_button' ) + strings_displayed = [ 'The repository named', 'has been deactivated' ] + self.check_for_strings( strings_displayed, strings_not_displayed=[] ) + def delete_files_from_repository( self, repository, filenames=[], strings_displayed=[ 'were deleted from the repository' ], strings_not_displayed=[] ): files_to_delete = [] basepath = self.get_repo_path( repository ) @@ -1204,18 +1214,14 @@ self.visit_url( url ) self.check_for_strings( strings_displayed, strings_not_displayed ) - def uninstall_repository( self, installed_repository, remove_from_disk=True, is_required=False, strings_displayed=[], strings_not_displayed=[] ): + def uninstall_repository( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ): url = '/admin_toolshed/deactivate_or_uninstall_repository?id=%s' % self.security.encode_id( installed_repository.id ) self.visit_galaxy_url( url ) self.check_for_strings( strings_displayed, strings_not_displayed ) form = tc.browser.get_form( 'deactivate_or_uninstall_repository' ) - kwd = self.set_form_value( form, {}, 'remove_from_disk', remove_from_disk ) + kwd = self.set_form_value( form, {}, 'remove_from_disk', True ) tc.submit( 'deactivate_or_uninstall_repository_button' ) - strings_displayed = [ 'The repository named' ] - if remove_from_disk and not is_required: - strings_displayed.append( 'has been uninstalled' ) - else: - strings_displayed.append( 'has been deactivated' ) + strings_displayed = [ 'The repository named', 'has been uninstalled' ] self.check_for_strings( strings_displayed, strings_not_displayed=[] ) def update_installed_repository( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ): diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_0490_export_import_repositories.py --- a/test/tool_shed/functional/test_0490_export_import_repositories.py +++ b/test/tool_shed/functional/test_0490_export_import_repositories.py @@ -65,7 +65,7 @@ global capsule_filepath repository = self.test_db_util.get_repository_by_name_and_owner( repository_name, common.test_user_1_name ) capsule_filepath = self.export_capsule( repository ) - log.debug( os.path.exists( capsule_filepath ) ) + assert os.path.exists( capsule_filepath ), 'Exported repository capsule file path %s not found.' % capsule_filepath def test_0015_verify_exported_capsule( self ): '''Verify the exported capsule contents.''' diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py --- a/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py +++ b/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py @@ -121,7 +121,7 @@ global base_datatypes_count installed_repository = self.test_db_util.get_installed_repository_by_name_owner( datatypes_repository_name, common.test_user_1_name ) old_datatypes_count = int( self.get_datatypes_count() ) - self.uninstall_repository( installed_repository, remove_from_disk=False ) + self.deactivate_repository( installed_repository ) current_datatypes = int( self.get_datatypes_count() ) assert current_datatypes < old_datatypes_count, 'Uninstalling emboss did not remove datatypes.' diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1040_install_repository_basic_circular_dependencies.py --- a/test/tool_shed/functional/test_1040_install_repository_basic_circular_dependencies.py +++ b/test/tool_shed/functional/test_1040_install_repository_basic_circular_dependencies.py @@ -109,7 +109,7 @@ installed_filtering_repository = self.test_db_util.get_installed_repository_by_name_owner( filtering_repository_name, common.test_user_1_name ) self.display_installed_repository_manage_page( installed_freebayes_repository ) self.display_installed_repository_manage_page( installed_filtering_repository ) - self.uninstall_repository( installed_filtering_repository, remove_from_disk=False ) + self.deactivate_repository( installed_filtering_repository ) self.test_db_util.ga_refresh( installed_filtering_repository ) self.check_galaxy_repository_tool_panel_section( installed_filtering_repository, '' ) strings_displayed = [ 'Missing repository', 'filtering', 'freebayes_0040', 'user1', "Galaxy's freebayes tool for test 0040" ] @@ -134,7 +134,7 @@ installed_filtering_repository = self.test_db_util.get_installed_repository_by_name_owner( filtering_repository_name, common.test_user_1_name ) self.display_installed_repository_manage_page( installed_freebayes_repository ) self.display_installed_repository_manage_page( installed_filtering_repository ) - self.uninstall_repository( installed_freebayes_repository, remove_from_disk=False ) + self.deactivate_repository( installed_freebayes_repository ) self.test_db_util.ga_refresh( installed_freebayes_repository ) self.check_galaxy_repository_tool_panel_section( installed_freebayes_repository, '' ) strings_displayed = [ 'Missing repository', 'freebayes', 'filtering_0040', 'user1', "Galaxy's filtering tool for test 0040" ] @@ -149,7 +149,7 @@ installed_freebayes_repository = self.test_db_util.get_installed_repository_by_name_owner( freebayes_repository_name, common.test_user_1_name ) self.display_installed_repository_manage_page( installed_freebayes_repository ) self.display_installed_repository_manage_page( installed_filtering_repository ) - self.uninstall_repository( installed_filtering_repository, remove_from_disk=False ) + self.deactivate_repository( installed_filtering_repository ) self.test_db_util.ga_refresh( installed_filtering_repository ) self.check_galaxy_repository_tool_panel_section( installed_filtering_repository, '' ) strings_displayed = [ 'Missing repository', 'filtering', 'freebayes_0040', 'user1', "Galaxy's freebayes tool for test 0040" ] diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1050_circular_dependencies_4_levels.py --- a/test/tool_shed/functional/test_1050_circular_dependencies_4_levels.py +++ b/test/tool_shed/functional/test_1050_circular_dependencies_4_levels.py @@ -315,7 +315,7 @@ '''Deactivate emboss_datatypes and verify that the datatypes count is reduced.''' original_datatypes = self.get_datatypes_count() repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_datatypes_repository_name, common.test_user_1_name ) - self.uninstall_repository( repository, remove_from_disk=False ) + self.deactivate_repository( repository ) assert original_datatypes > self.get_datatypes_count(), 'Deactivating emboss_datatypes did not remove datatypes.' # Now we have emboss, bismark, column_maker, and convert_chars installed, filtering and freebayes never installed, and emboss_datatypes deactivated. installed_repositories = [ ( column_repository_name, common.test_user_1_name ), @@ -330,7 +330,7 @@ def test_0070_uninstall_emboss_repository( self ): '''Uninstall the emboss_5 repository.''' repository = self.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 ) + self.uninstall_repository( repository ) strings_not_displayed = [ repository.name, repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) self.test_db_util.ga_refresh( repository ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1080_advanced_circular_dependency_installation.py --- a/test/tool_shed/functional/test_1080_advanced_circular_dependency_installation.py +++ b/test/tool_shed/functional/test_1080_advanced_circular_dependency_installation.py @@ -162,7 +162,7 @@ common.test_user_1_name ) installed_column_repository = self.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 ) + self.deactivate_repository( installed_convert_repository ) strings_displayed = [ 'column_maker_0080', 'Add column', self.url.replace( 'http://', '' ), @@ -199,7 +199,7 @@ common.test_user_1_name ) installed_column_repository = self.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 ) + self.deactivate_repository( installed_column_repository ) strings_displayed = [ 'convert_chars_0080', 'Convert delimiters', self.url.replace( 'http://', '' ), @@ -217,7 +217,7 @@ common.test_user_1_name ) installed_column_repository = self.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 ) + self.deactivate_repository( installed_convert_repository ) strings_not_displayed = [ 'column_maker_0080', installed_column_repository.installed_changeset_revision, 'convert_chars_0080', @@ -274,7 +274,7 @@ common.test_user_1_name ) installed_column_repository = self.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_column_repository ) strings_displayed = [ 'convert_chars_0080', 'Convert delimiters', self.url.replace( 'http://', '' ), @@ -320,7 +320,7 @@ common.test_user_1_name ) installed_column_repository = self.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 ) + self.deactivate_repository( installed_convert_repository ) strings_displayed = [ 'column_maker_0080', 'Add column', self.url.replace( 'http://', '' ), @@ -340,7 +340,7 @@ common.test_user_1_name ) installed_column_repository = self.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 ) + self.deactivate_repository( installed_column_repository ) strings_displayed = [ 'convert_chars_0080', 'Convert delimiters', self.url.replace( 'http://', '' ), @@ -387,8 +387,8 @@ common.test_user_1_name ) installed_column_repository = self.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 ) - self.uninstall_repository( installed_convert_repository, remove_from_disk=False ) + self.deactivate_repository( installed_column_repository ) + self.deactivate_repository( installed_convert_repository ) self.test_db_util.install_session.refresh( installed_column_repository ) self.test_db_util.install_session.refresh( installed_convert_repository ) self.check_galaxy_repository_tool_panel_section( installed_column_repository, '' ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1085_repository_dependency_handling.py --- a/test/tool_shed/functional/test_1085_repository_dependency_handling.py +++ b/test/tool_shed/functional/test_1085_repository_dependency_handling.py @@ -124,14 +124,14 @@ '''uninstall column_maker, verify same section''' installed_column_repository = self.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_column_repository ) self.test_db_util.ga_refresh( installed_column_repository ) self.check_galaxy_repository_tool_panel_section( installed_column_repository, 'column_maker' ) def test_0030_uninstall_convert_repository( self ): installed_convert_repository = self.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 ) + self.uninstall_repository( installed_convert_repository ) self.test_db_util.ga_refresh( installed_convert_repository ) self.check_galaxy_repository_tool_panel_section( installed_convert_repository, 'column_maker' ) @@ -173,8 +173,8 @@ common.test_user_1_name ) installed_column_repository = self.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 ) - self.uninstall_repository( installed_column_repository, remove_from_disk=True ) + self.uninstall_repository( installed_convert_repository ) + self.uninstall_repository( installed_column_repository ) self.test_db_util.ga_refresh( installed_convert_repository ) self.test_db_util.ga_refresh( installed_column_repository ) self.check_galaxy_repository_tool_panel_section( installed_column_repository, 'new_column_maker' ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1087_install_updated_repository_dependencies.py --- a/test/tool_shed/functional/test_1087_install_updated_repository_dependencies.py +++ b/test/tool_shed/functional/test_1087_install_updated_repository_dependencies.py @@ -89,7 +89,7 @@ new_tool_panel_section_label='column_maker', strings_not_displayed=[ 'install_repository_dependencies' ] ) installed_column_repository = self.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_column_repository ) def test_0020_upload_dependency_xml( self ): '''Upload a repository_dependencies.xml file to column_maker that specifies convert_chars.''' diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1090_install_tool_from_tool_search.py --- a/test/tool_shed/functional/test_1090_install_tool_from_tool_search.py +++ b/test/tool_shed/functional/test_1090_install_tool_from_tool_search.py @@ -251,7 +251,7 @@ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed ) self.verify_installed_repositories( installed_repositories ) filtering_repository = self.test_db_util.get_installed_repository_by_name_owner( filtering_repository_name, common.test_user_1_name ) - self.uninstall_repository( filtering_repository, remove_from_disk=False ) + self.deactivate_repository( filtering_repository ) strings_displayed = [ 'freebayes_0090' ] strings_not_displayed = [ 'filtering_0090', 'emboss_0090', 'emboss_datatypes_0090', 'bwa_color_0090', 'bwa_base_0090' ] self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed ) @@ -278,7 +278,7 @@ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed ) self.verify_installed_repositories( installed_repositories ) datatypes_repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_datatypes_repository_name, common.test_user_1_name ) - self.uninstall_repository( datatypes_repository, remove_from_disk=True ) + self.uninstall_repository( datatypes_repository ) strings_displayed = [ 'freebayes_0090' ] strings_not_displayed = [ 'emboss_datatypes_0090', 'filtering_0090', 'emboss_0090', 'bwa_color_0090', 'bwa_base_0090' ] self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py --- a/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py +++ b/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py @@ -278,7 +278,7 @@ ''' base_repository = self.test_db_util.get_installed_repository_by_name_owner( bwa_base_repository_name, common.test_user_1_name ) tool_repository = self.test_db_util.get_installed_repository_by_name_owner( bwa_package_repository_name, common.test_user_1_name ) - self.uninstall_repository( tool_repository, remove_from_disk=False ) + self.deactivate_repository( tool_repository ) env_sh_path = os.path.join( self.galaxy_tool_dependency_dir, 'bwa', '0.5.9', diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1130_datatype_converters.py --- a/test/tool_shed/functional/test_1130_datatype_converters.py +++ b/test/tool_shed/functional/test_1130_datatype_converters.py @@ -87,5 +87,5 @@ so we have to uninstall it first, then verify that it was not assigned a tool panel section. ''' repository = self.test_db_util.get_installed_repository_by_name_owner( repository_name, common.test_user_1_name ) - self.uninstall_repository( repository, remove_from_disk=True ) + self.uninstall_repository( repository ) self.verify_installed_repository_no_tool_panel_section( repository ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1160_circular_prior_installation_required.py --- a/test/tool_shed/functional/test_1160_circular_prior_installation_required.py +++ b/test/tool_shed/functional/test_1160_circular_prior_installation_required.py @@ -217,18 +217,16 @@ assert filter_repository.update_time > convert_repository.update_time, 'Error: convert_chars_0160 shows a later update time than filtering_0160' assert filter_repository.update_time > column_repository.update_time, 'Error: column_maker_0160 shows a later update time than filtering_0160' - def test_0040_uninstall_all_repositories( self ): + def test_0040_deactivate_all_repositories( self ): '''Uninstall convert_chars_0160, column_maker_0160, and filtering_0160.''' filter_repository = self.test_db_util.get_installed_repository_by_name_owner( filter_repository_name, common.test_user_1_name ) column_repository = self.test_db_util.get_installed_repository_by_name_owner( column_repository_name, common.test_user_1_name ) convert_repository = self.test_db_util.get_installed_repository_by_name_owner( convert_repository_name, common.test_user_1_name ) - # TODO: Tweak the uninstall_repository method by pulling out the stuff that deactivates a repository - # instead of uninstalling it and create a new deactivate_repository method. - self.uninstall_repository( filter_repository, remove_from_disk=False ) - self.uninstall_repository( column_repository, remove_from_disk=False ) - self.uninstall_repository( convert_repository, remove_from_disk=False ) + self.deactivate_repository( filter_repository ) + self.deactivate_repository( column_repository ) + self.deactivate_repository( convert_repository ) - def test_0045_reactivatel_filter_repository( self ): + def test_0045_reactivate_filter_repository( self ): '''Reinstall the filtering_0160 repository.''' filter_repository = self.test_db_util.get_installed_repository_by_name_owner( filter_repository_name, common.test_user_1_name ) self.reactivate_repository( filter_repository ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1200_uninstall_and_reinstall_basic_repository.py --- a/test/tool_shed/functional/test_1200_uninstall_and_reinstall_basic_repository.py +++ b/test/tool_shed/functional/test_1200_uninstall_and_reinstall_basic_repository.py @@ -1,7 +1,9 @@ from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os + class UninstallingAndReinstallingRepositories( ShedTwillTestCase ): '''Test uninstalling and reinstalling a basic repository.''' + def test_0000_initiate_users( self ): """Create necessary user accounts.""" self.logout() @@ -19,6 +21,7 @@ galaxy_admin_user = self.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 = self.test_db_util.get_galaxy_private_role( galaxy_admin_user ) + def test_0005_ensure_repositories_and_categories_exist( self ): '''Create the 0000 category and upload the filtering repository to the tool shed, if necessary.''' category = self.create_category( name='Test 0000 Basic Repository Features 1', description='Test 0000 Basic Repository Features 1' ) @@ -67,6 +70,7 @@ commit_message='Uploaded readme for 2.2.0', strings_displayed=[], strings_not_displayed=[] ) + def test_0010_install_filtering_repository( self ): '''Install the filtering repository into the Galaxy instance.''' self.galaxy_logout() @@ -82,14 +86,16 @@ self.url.replace( 'http://', '' ), installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed ) + def test_0015_uninstall_filtering_repository( self ): '''Uninstall the filtering repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=True ) + self.uninstall_repository( installed_repository ) strings_not_displayed = [ 'filtering_0000', "Galaxy's filtering tool for test 0000", installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) + def test_0020_reinstall_filtering_repository( self ): '''Reinstall the filtering repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name ) @@ -103,14 +109,16 @@ strings_displayed.extend( [ 'Installed tool shed repository', 'Valid tools', 'Filter1' ] ) self.display_installed_repository_manage_page( installed_repository, strings_displayed=strings_displayed ) self.verify_tool_metadata_for_installed_repository( installed_repository ) + def test_0025_deactivate_filtering_repository( self ): '''Deactivate the filtering repository without removing it from disk.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=False ) + self.deactivate_repository( installed_repository ) strings_not_displayed = [ 'filtering_0000', "Galaxy's filtering tool for test 0000", installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) + def test_0030_reactivate_filtering_repository( self ): '''Reactivate the filtering repository and verify that it now shows up in the list of installed repositories.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py --- a/test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py +++ b/test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py @@ -1,7 +1,9 @@ from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os + class UninstallingAndReinstallingRepositories( ShedTwillTestCase ): '''Test uninstalling and reinstalling a repository with tool dependencies.''' + def test_0000_initiate_users( self ): """Create necessary user accounts.""" self.galaxy_logout() @@ -19,6 +21,7 @@ admin_user = self.test_db_util.get_user( common.admin_email ) assert admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email admin_user_private_role = self.test_db_util.get_private_role( admin_user ) + def test_0005_ensure_repositories_and_categories_exist( self ): '''Create the 0010 category and upload the freebayes repository to the tool shed, if necessary.''' category = self.create_category( name='Test 0010 Repository With Tool Dependencies', description='Tests for a repository with tool dependencies.' ) @@ -84,6 +87,7 @@ commit_message='Uploaded valid tool dependency XML.', strings_displayed=[], strings_not_displayed=[] ) + def test_0010_install_freebayes_repository( self ): '''Install the freebayes repository into the Galaxy instance.''' self.galaxy_logout() @@ -101,12 +105,14 @@ self.url.replace( 'http://', '' ), installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed ) + def test_0015_uninstall_freebayes_repository( self ): '''Uninstall the freebayes repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=True ) + self.uninstall_repository( installed_repository ) strings_not_displayed = [ installed_repository.name, installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) + def test_0020_reinstall_freebayes_repository( self ): '''Reinstall the freebayes repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) @@ -120,12 +126,14 @@ strings_displayed.extend( [ 'Installed tool shed repository', 'Valid tools', 'FreeBayes' ] ) self.display_installed_repository_manage_page( installed_repository, strings_displayed=strings_displayed ) self.verify_tool_metadata_for_installed_repository( installed_repository ) + def test_0025_deactivate_freebayes_repository( self ): '''Deactivate the freebayes repository without removing it from disk.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=False ) + self.deactivate_repository( installed_repository ) strings_not_displayed = [ installed_repository.name, installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) + def test_0030_reactivate_freebayes_repository( self ): '''Reactivate the freebayes repository and verify that it now shows up in the list of installed repositories.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py --- a/test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py +++ b/test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py @@ -108,7 +108,7 @@ def test_0015_uninstall_emboss_repository( self ): '''Uninstall the emboss repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=True ) + self.uninstall_repository( installed_repository ) strings_not_displayed = [ installed_repository.name, installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) @@ -129,7 +129,7 @@ def test_0025_deactivate_emboss_repository( self ): '''Deactivate the emboss repository without removing it from disk.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=False ) + self.deactivate_repository( installed_repository ) strings_not_displayed = [ 'emboss_0020', installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py --- a/test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py +++ b/test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py @@ -144,7 +144,7 @@ def test_0015_uninstall_emboss_repository( self ): '''Uninstall the emboss repository.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=True ) + self.uninstall_repository( installed_repository ) strings_not_displayed = [ installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) @@ -165,7 +165,7 @@ def test_0025_deactivate_emboss_repository( self ): '''Deactivate the emboss repository without removing it from disk.''' installed_repository = self.test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) - self.uninstall_repository( installed_repository, remove_from_disk=False ) + self.deactivate_repository( installed_repository ) strings_not_displayed = [ installed_repository.installed_changeset_revision ] self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed ) diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1430_repair_installed_repository.py --- a/test/tool_shed/functional/test_1430_repair_installed_repository.py +++ b/test/tool_shed/functional/test_1430_repair_installed_repository.py @@ -146,10 +146,9 @@ installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filter_1430', common.test_user_1_name ) strings_displayed = [ 'This repository cannot be uninstalled' ] strings_not_displayed = [ 'Check to uninstall' ] - self.uninstall_repository( installed_repository, - remove_from_disk=False, - strings_displayed=strings_displayed, - strings_not_displayed=strings_not_displayed ) + self.deactivate_repository( installed_repository, + strings_displayed=strings_displayed, + strings_not_displayed=strings_not_displayed ) strings_not_displayed = [ 'filter_1430', "Galaxy's filter tool for test 1430", installed_repository.installed_changeset_revision ] diff -r ca11e10aa1a5b7318d3727816bf0c2fe6137c522 -r 110a0aabd293fd1393d1296cb220a0b153d69123 test/tool_shed/functional/test_1450_installing_datatypes_sniffers.py --- a/test/tool_shed/functional/test_1450_installing_datatypes_sniffers.py +++ b/test/tool_shed/functional/test_1450_installing_datatypes_sniffers.py @@ -119,7 +119,7 @@ global repository_datatypes_count global base_datatypes_count global base_sniffers_count - self.uninstall_repository( repository, remove_from_disk=False ) + self.deactivate_repository( repository ) new_datatypes_count = self.get_datatypes_count() assert new_datatypes_count == base_datatypes_count, 'Expected %d datatypes, got %d' % ( base_datatypes_count, new_datatypes_count ) current_sniffers = self.get_sniffers_count() @@ -157,7 +157,7 @@ repository = self.test_db_util.get_installed_repository_by_name_owner( repository_name, common.test_user_1_name ) global repository_datatypes_count global base_datatypes_count - self.uninstall_repository( repository, remove_from_disk=True ) + self.uninstall_repository( repository ) new_datatypes_count = self.get_datatypes_count() assert new_datatypes_count == base_datatypes_count, 'Expected %d datatypes, got %d' % ( base_datatypes_count, new_datatypes_count ) current_sniffers = self.get_sniffers_count() 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.