1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7bf93ff108fe/ changeset: 7bf93ff108fe user: inithello date: 2013-02-19 22:01:18 summary: Enhancement to tool shed functional tests for repositories that only contain a workflow. affected #: 2 files diff -r 305680a482c3096b082daffa5ff665f5f60d1528 -r 7bf93ff108fe4a62ee3084d84a77fa9b71c8b1f7 test/tool_shed/functional/test_0060_workflows.py --- a/test/tool_shed/functional/test_0060_workflows.py +++ b/test/tool_shed/functional/test_0060_workflows.py @@ -4,11 +4,17 @@ repository_name = 'filtering_0060' repository_description="Galaxy's filtering tool for test 0060" repository_long_description="Long description of Galaxy's filtering tool for test 0060" + workflow_filename = 'Workflow_for_0060_filter_workflow_repository.ga' workflow_name = 'Workflow for 0060_filter_workflow_repository' + category_name = 'Test 0060 Workflow Features' category_description = 'Test 0060 for workflow features' +workflow_repository_name = 'filtering_workflow_0060' +workflow_repository_description="Workflow referencing the filtering tool for test 0060" +workflow_repository_long_description="Long description of the workflow for test 0060" + class TestToolShedWorkflowFeatures( ShedTwillTestCase ): '''Test valid and invalid workflows.''' def test_0000_initiate_users( self ): @@ -69,7 +75,41 @@ strings_displayed=[], strings_not_displayed=[] ) self.load_workflow_image_in_tool_shed( repository, workflow_name, strings_not_displayed=[ '#EBBCB2' ] ) - def test_0025_verify_repository_metadata( self ): + def test_0025_create_repository_with_only_workflow( self ): + """Create and populate the filtering_workflow_0060 repository""" + 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 ) + self.get_or_create_repository( name=workflow_repository_name, + description=workflow_repository_description, + long_description=workflow_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + workflow = file( self.get_filename( 'filtering_workflow/Workflow_for_0060_filter_workflow_repository.ga' ), 'r' ).read() + workflow = workflow.replace( '__TEST_TOOL_SHED_URL__', self.url.replace( 'http://', '' ) ) + workflow_filepath = self.generate_temp_path( 'test_0060', additional_paths=[ 'filtering_workflow_2' ] ) + if not os.path.exists( workflow_filepath ): + os.makedirs( workflow_filepath ) + file( os.path.join( workflow_filepath, workflow_filename ), 'w+' ).write( workflow ) + repository = test_db_util.get_repository_by_name_and_owner( workflow_repository_name, common.test_user_1_name ) + self.upload_file( repository, + filename=workflow_filename, + filepath=workflow_filepath, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Uploaded filtering workflow.', + strings_displayed=[], + strings_not_displayed=[] ) + self.load_workflow_image_in_tool_shed( repository, workflow_name, strings_displayed=[ '#EBBCB2' ] ) + def test_0030_check_workflow_repository( self ): + """Check for strings on the manage page for the filtering_workflow_0060 repository.""" + repository = test_db_util.get_repository_by_name_and_owner( workflow_repository_name, common.test_user_1_name ) + strings_displayed = [ 'Workflows', 'Workflow for 0060_filter', '0.1' ] + strings_not_displayed = [ 'Valid tools', 'Invalid tools' ] + self.display_manage_repository_page( repository, strings_displayed=strings_displayed, strings_not_displayed=strings_not_displayed ) + def test_0035_verify_repository_metadata( self ): '''Verify that resetting the metadata does not change it.''' repository = test_db_util.get_repository_by_name_and_owner( repository_name, common.test_user_1_name ) self.verify_unchanged_repository_metadata( repository ) diff -r 305680a482c3096b082daffa5ff665f5f60d1528 -r 7bf93ff108fe4a62ee3084d84a77fa9b71c8b1f7 test/tool_shed/functional/test_1060_install_repository_with_workflow.py --- a/test/tool_shed/functional/test_1060_install_repository_with_workflow.py +++ b/test/tool_shed/functional/test_1060_install_repository_with_workflow.py @@ -1,15 +1,21 @@ from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os import tool_shed.base.test_db_util as test_db_util -import logging -log = logging.getLogger(__name__) + repository_name = 'filtering_0060' repository_description="Galaxy's filtering tool for test 0060" repository_long_description="Long description of Galaxy's filtering tool for test 0060" + workflow_filename = 'Workflow_for_0060_filter_workflow_repository.ga' workflow_name = 'Workflow for 0060_filter_workflow_repository' +second_workflow_name = 'New workflow for 0060_filter_workflow_repository' + category_name = 'Test 0060 Workflow Features' category_description = 'Test 0060 for workflow features' +workflow_repository_name = 'filtering_workflow_0060' +workflow_repository_description="Workflow referencing the filtering tool for test 0060" +workflow_repository_long_description="Long description of the workflow for test 0060" + class ToolWithRepositoryDependencies( ShedTwillTestCase ): '''Test installing a repository with repository dependencies.''' def test_0000_initiate_users( self ): @@ -87,3 +93,61 @@ self.display_all_workflows( strings_not_displayed=[ 'Workflow for 0060_filter_workflow_repository' ] ) self.import_workflow( installed_repository, workflow_name ) self.display_all_workflows( strings_displayed=[ 'Workflow for 0060_filter_workflow_repository' ] ) + def test_0020_create_filter_workflow_repository( self ): + '''Create, if necessary, a filtering repository with only a workflow.''' + 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=workflow_repository_name, + description=workflow_repository_description, + long_description=workflow_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 ): + workflow = file( self.get_filename( 'filtering_workflow/Workflow_for_0060_filter_workflow_repository.ga' ), 'r' ).read() + workflow = workflow.replace( '__TEST_TOOL_SHED_URL__', self.url.replace( 'http://', '' ) ) + workflow = workflow.replace( 'Workflow for 0060_filter_workflow_repository', + 'New workflow for 0060_filter_workflow_repository' ) + workflow_filepath = self.generate_temp_path( 'test_0060', additional_paths=[ 'filtering_workflow_2' ] ) + if not os.path.exists( workflow_filepath ): + os.makedirs( workflow_filepath ) + file( os.path.join( workflow_filepath, workflow_filename ), 'w+' ).write( workflow ) + self.upload_file( repository, + filename=workflow_filename, + filepath=workflow_filepath, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Uploaded filtering workflow.', + strings_displayed=[], + strings_not_displayed=[] ) + self.load_workflow_image_in_tool_shed( repository, + 'New workflow for 0060_filter_workflow_repository', + strings_displayed=[ '#EBBCB2' ] ) + def test_0025_install_repository_with_workflow( self ): + """Browse the available tool sheds in this Galaxy instance and preview the filtering workflow repository.""" + self.preview_repository_in_tool_shed( workflow_repository_name, + common.test_user_1_name, + strings_displayed=[ 'filtering_workflow_0060', 'Workflows' ], + strings_not_displayed=[ 'Valid tools', 'Invalid tools' ] ) + self.galaxy_logout() + self.galaxy_login( email=common.admin_email, username=common.admin_username ) + self.install_repository( workflow_repository_name, + common.test_user_1_name, + 'Test 0060 Workflow Features', + install_tool_dependencies=False, + includes_tools=False ) + def test_0030_import_workflow_from_installed_repository( self ): + '''Import the workflow from the installed repository and verify that it appears in the list of all workflows.''' + installed_repository = test_db_util.get_installed_repository_by_name_owner( workflow_repository_name, common.test_user_1_name ) + self.display_installed_workflow_image( installed_repository, + 'New workflow for 0060_filter_workflow_repository', + strings_displayed=[ '#EBD9B2' ], + strings_not_displayed=[ '#EBBCB2' ] ) + self.display_all_workflows( strings_not_displayed=[ 'New workflow for 0060_filter_workflow_repository' ] ) + self.import_workflow( installed_repository, + 'New workflow for 0060_filter_workflow_repository', + strings_displayed=[ 'New workflow for 0060_filter_workflow_repository' ] ) + self.display_all_workflows( strings_displayed=[ 'New workflow for 0060_filter_workflow_repository' ] ) + 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.