1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6eed572a8bdc/ Changeset: 6eed572a8bdc User: inithello Date: 2013-04-25 18:23:04 Summary: Update tool functional test result mako template to reflect the new structure of the test results dict. Add compatibility with the stable branch to the functional tests' API updater. Affected #: 2 files diff -r 41d8cdde47297746aa82ce4858006bd2632331db -r 6eed572a8bdcd6dc9bf2fcd54360217c1f447f20 templates/webapps/tool_shed/repository/display_tool_functional_test_results.mako --- a/templates/webapps/tool_shed/repository/display_tool_functional_test_results.mako +++ b/templates/webapps/tool_shed/repository/display_tool_functional_test_results.mako @@ -56,15 +56,15 @@ # repository_metadata.tools_functionally_correct column is set to True. tool_test_results = repository_metadata.tool_test_results test_environment_dict = tool_test_results.get( 'test_environment', None ) - invalid_tests = tool_test_results.get( 'invalid_tests', [] ) - test_errors = tool_test_results.get( 'test_errors', [] ) - tests_passed = tool_test_results.get( 'tests_passed', [] ) + missing_test_components = tool_test_results.get( 'missing_test_components', [] ) + failed_tests = tool_test_results.get( 'failed_tests', [] ) + passed_tests = tool_test_results.get( 'passed_tests', [] ) else: tool_test_results = None test_environment_dict = {} - invalid_tests = [] - test_errors = [] - tests_passed = [] + missing_test_components = [] + failed_tests = [] + passed_tests = [] if can_push: browse_label = 'Browse or delete repository tip files' @@ -144,7 +144,7 @@ <b>Repository name:</b><br/> ${repository.name} %endif -%if invalid_tests or tool_test_results or tests_passed: +%if missing_test_components or tool_test_results or passed_tests: <p/><div class="toolForm"><div class="toolFormTitle">Tool functional test results</div> @@ -203,7 +203,7 @@ ${test_environment_dict.get( 'python_version', 'unknown' ) | h} <div style="clear: both"></div></div> - %if test_errors: + %if failed_tests: <div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%"><td><b>Tests that failed</td></tr> @@ -211,7 +211,7 @@ </div><div class="form-row"><table class="grid"> - %for test_results_dict in test_errors: + %for test_results_dict in failed_tests: <% test_id = test_results_dict.get( 'test_id', 'unknown' ) tool_id = test_results_dict.get( 'tool_id', 'unknown' ) @@ -244,7 +244,7 @@ <div style="clear: both"></div></div> %endif - %if tests_passed: + %if passed_tests: <div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%"><td><b>Tests that passed successfully</td></tr> @@ -252,7 +252,7 @@ </div><div class="form-row"><table class="grid"> - %for test_results_dict in tests_passed: + %for test_results_dict in passed_tests: <% test_id = test_results_dict.get( 'test_id', 'unknown' ) tool_id = test_results_dict.get( 'tool_id', 'unknown' ) @@ -274,7 +274,7 @@ </table></div> %endif - %if invalid_tests: + %if missing_test_components: <div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%"><td><b>Invalid tests</td></tr> @@ -282,22 +282,22 @@ </div><div class="form-row"><table class="grid"> - %for test_results_dict in invalid_tests: + %for test_results_dict in missing_test_components: <% guid = test_results_dict.get( 'tool_guid', None ) tool_id = test_results_dict.get( 'tool_id', None ) tool_version = test_results_dict.get( 'tool_version', None ) - reason_test_is_invalid = test_results_dict.get( 'reason_test_is_invalid', None ) + missing_components = test_results_dict.get( 'missing_components', None ) %> %if tool_id or tool_version: <tr><td colspan="2" bgcolor="#FFFFCC">Tool id: <b>${tool_id}</b> version: <b>${tool_version}</b></td></tr> %endif - %if reason_test_is_invalid: + %if missing_components: <tr><td><b>Reason test is invalid</b></td> - <td>${render_functional_test_text( reason_test_is_invalid )}</td> + <td>${render_functional_test_text( missing_components )}</td></tr> %endif %endfor diff -r 41d8cdde47297746aa82ce4858006bd2632331db -r 6eed572a8bdcd6dc9bf2fcd54360217c1f447f20 test/install_and_test_tool_shed_repositories/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/functional_tests.py @@ -291,6 +291,17 @@ params[ 'tools_functionally_correct' ] = 'false' params[ 'do_not_test' ] = 'false' params[ 'tool_test_results' ] = test_results_dict + # BEGIN compatibility code. + # TODO: The repository_revisions API controller ignores any received parameter that is not present in the database schema, + # but the compatibility code here should be removed when the main tool shed is updated with the new database migration version. + params[ 'tool_test_errors' ] = test_results_dict + if test_results_dict[ 'failed_tests' ]: + params[ 'tool_test_errors' ][ 'test_errors' ] = test_results_dict[ 'failed_tests' ] + if test_results_dict[ 'passed_tests' ]: + params[ 'tool_test_errors' ][ 'tests_passed' ] = test_results_dict[ 'passed_tests' ] + # Copying the missing_test_components key is not necessary, since the main tool shed is running its own version of the + # check repositories script, which correctly updates the invalid_tests key. + # END compatibility code. if '-info_only' in sys.argv: return {} else: @@ -636,7 +647,8 @@ repository_status[ 'test_environment' ] = test_environment repository_status[ 'passed_tests' ] = [] repository_status[ 'failed_tests' ] = [] - repository_status[ 'missing_test_components' ] = [] + if 'missing_test_components' not in repository_status: + repository_status[ 'missing_test_components' ] = [] if not has_test_data: log.error( 'Test data is missing for this repository. Updating repository and skipping functional tests.' ) # Record the lack of test data. 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.